Merged PR 812: 「oderLicense」や「CardLicense」を開いて閉じるとパンくずリストがおかしくなる
## 概要 [Task3771: 対応](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3771) ポップアップを×で閉じた際に、パンくずリストを保持したまま、`dispatch(getMyAccountAsync()`しており画面を初期化していた。 画面を更新するのかしないのかあいまいな挙動になっていた。 対応としては、他のポップアップと同様、×で閉じた場合は画面は更新しないように修正。 追加でパンくずリストを初期化する処理を作成し、ポップアップ側でAPIを呼び出した場合のみそれを実行する。 ## レビューポイント - 特筆する点はなし ## UIの変更 - スクショ置き場 https://ndstokyo.sharepoint.com/:f:/r/sites/Piranha/Shared%20Documents/General/OMDS/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88/Task3771?csf=1&web=1&e=USf40m ## 動作確認状況 - ローカルで確認 ## 補足 - 相談、参考資料などがあれば
This commit is contained in:
parent
e448e8d249
commit
f265d0ff45
@ -61,6 +61,9 @@ export const partnerLicenseSlice = createSlice({
|
|||||||
const { deleteCount } = action.payload;
|
const { deleteCount } = action.payload;
|
||||||
state.apps.hierarchicalElements.splice(-deleteCount);
|
state.apps.hierarchicalElements.splice(-deleteCount);
|
||||||
},
|
},
|
||||||
|
clearHierarchicalElement: (state) => {
|
||||||
|
state.apps.hierarchicalElements = [];
|
||||||
|
},
|
||||||
changeSelectedRow: (
|
changeSelectedRow: (
|
||||||
state,
|
state,
|
||||||
action: PayloadAction<{ value?: PartnerLicenseInfo }>
|
action: PayloadAction<{ value?: PartnerLicenseInfo }>
|
||||||
@ -110,6 +113,7 @@ export const {
|
|||||||
pushHierarchicalElement,
|
pushHierarchicalElement,
|
||||||
popHierarchicalElement,
|
popHierarchicalElement,
|
||||||
spliceHierarchicalElement,
|
spliceHierarchicalElement,
|
||||||
|
clearHierarchicalElement,
|
||||||
changeSelectedRow,
|
changeSelectedRow,
|
||||||
savePageInfo,
|
savePageInfo,
|
||||||
} = partnerLicenseSlice.actions;
|
} = partnerLicenseSlice.actions;
|
||||||
|
|||||||
@ -2,6 +2,10 @@ import React, { useState, useCallback, useEffect } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { AppDispatch } from "app/store";
|
import { AppDispatch } from "app/store";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
|
import {
|
||||||
|
clearHierarchicalElement,
|
||||||
|
getMyAccountAsync,
|
||||||
|
} from "features/license/partnerLicense";
|
||||||
import styles from "../../styles/app.module.scss";
|
import styles from "../../styles/app.module.scss";
|
||||||
import { getTranslationID } from "../../translation";
|
import { getTranslationID } from "../../translation";
|
||||||
import close from "../../assets/images/close.svg";
|
import close from "../../assets/images/close.svg";
|
||||||
@ -92,6 +96,8 @@ export const CardLicenseIssuePopup: React.FC<CardLicenseIssuePopupProps> = (
|
|||||||
setIsPushCreateButton(false);
|
setIsPushCreateButton(false);
|
||||||
|
|
||||||
if (meta.requestStatus === "fulfilled") {
|
if (meta.requestStatus === "fulfilled") {
|
||||||
|
dispatch(getMyAccountAsync());
|
||||||
|
dispatch(clearHierarchicalElement());
|
||||||
closePopup();
|
closePopup();
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
|
|||||||
@ -14,6 +14,10 @@ import {
|
|||||||
cleanupApps,
|
cleanupApps,
|
||||||
selectIsLoading,
|
selectIsLoading,
|
||||||
} from "features/license/licenseOrder";
|
} from "features/license/licenseOrder";
|
||||||
|
import {
|
||||||
|
clearHierarchicalElement,
|
||||||
|
getMyAccountAsync,
|
||||||
|
} from "features/license/partnerLicense";
|
||||||
import close from "../../assets/images/close.svg";
|
import close from "../../assets/images/close.svg";
|
||||||
import progress_activit from "../../assets/images/progress_activit.svg";
|
import progress_activit from "../../assets/images/progress_activit.svg";
|
||||||
|
|
||||||
@ -90,6 +94,8 @@ export const LicenseOrderPopup: React.FC<LicenseOrderPopupProps> = (props) => {
|
|||||||
setIsPushOrderButton(false);
|
setIsPushOrderButton(false);
|
||||||
|
|
||||||
if (meta.requestStatus === "fulfilled") {
|
if (meta.requestStatus === "fulfilled") {
|
||||||
|
dispatch(getMyAccountAsync());
|
||||||
|
dispatch(clearHierarchicalElement());
|
||||||
closePopup();
|
closePopup();
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
|
|||||||
@ -216,13 +216,11 @@ const PartnerLicense: React.FC = (): JSX.Element => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* 表示確認用の仮画面 */}
|
|
||||||
{/* isPopupOpenがfalseの場合はポップアップのhtmlを生成しないように対応。これによりポップアップは都度生成されて初期化の考慮が減る */}
|
{/* isPopupOpenがfalseの場合はポップアップのhtmlを生成しないように対応。これによりポップアップは都度生成されて初期化の考慮が減る */}
|
||||||
{isCardLicenseIssuePopupOpen && (
|
{isCardLicenseIssuePopupOpen && (
|
||||||
<CardLicenseIssuePopup
|
<CardLicenseIssuePopup
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
setIsCardLicenseIssuePopupOpen(false);
|
setIsCardLicenseIssuePopupOpen(false);
|
||||||
dispatch(getMyAccountAsync());
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@ -230,7 +228,6 @@ const PartnerLicense: React.FC = (): JSX.Element => {
|
|||||||
<LicenseOrderPopup
|
<LicenseOrderPopup
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
setIslicenseOrderPopupOpen(false);
|
setIslicenseOrderPopupOpen(false);
|
||||||
dispatch(getMyAccountAsync());
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user