diff --git a/.docker/wiremock/fbs/mappings/external_agencyid_patron_patronid_fees_v2-bd783b91-b464-4137-9575-b093008866df.json b/.docker/wiremock/fbs/mappings/external_agencyid_patron_patronid_fees_v2-bd783b91-b464-4137-9575-b093008866df.json index 5d55732c32..b88169000a 100644 --- a/.docker/wiremock/fbs/mappings/external_agencyid_patron_patronid_fees_v2-bd783b91-b464-4137-9575-b093008866df.json +++ b/.docker/wiremock/fbs/mappings/external_agencyid_patron_patronid_fees_v2-bd783b91-b464-4137-9575-b093008866df.json @@ -1,23 +1,23 @@ { - "id": "bd783b91-b464-4137-9575-b093008866df", - "name": "Fees (v2)", - "request": { - "url": "/external/agencyid/patron/patronid/fees/v2", - "method": "GET" + "id" : "bd783b91-b464-4137-9575-b093008866df", + "name" : "Fees (v2)", + "request" : { + "url" : "/external/agencyid/patron/patronid/fees/v2?includepaid=false&includenonpayable=true", + "method" : "GET" }, - "response": { - "status": 200, - "body": "[\n {\n \"feeId\": 434536,\n \"type\": \"fee\",\n \"reasonMessage\": \"Gebyr (for sent)\",\n \"amount\": 70,\n \"dueDate\": \"2022-05-08\",\n \"creationDate\": \"2022-04-06\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"5237124059\",\n \"recordId\": \"48724566\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n },\n {\n \"materialItemNumber\": \"5119382558\",\n \"recordId\": \"52518563\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n },\n {\n \"materialItemNumber\": \"5324175956\",\n \"recordId\": \"38540335\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n },\n {\n \"feeId\": 434537,\n \"type\": \"fee\",\n \"reasonMessage\": \"Gebyr (for sent)\",\n \"amount\": 70,\n \"dueDate\": \"2022-05-08\",\n \"creationDate\": \"2022-04-06\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"3275348197\",\n \"recordId\": \"23790823\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n },\n {\n \"materialItemNumber\": \"5218297864\",\n \"recordId\": \"45951685\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n },\n {\n \"feeId\": 434538,\n \"type\": \"fee\",\n \"reasonMessage\": \"Gebyr (for sent)\",\n \"amount\": 120,\n \"dueDate\": \"2022-05-08\",\n \"creationDate\": \"2022-04-06\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"5136106556\",\n \"recordId\": \"53067034\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n },\n {\n \"materialItemNumber\": \"5232011841\",\n \"recordId\": \"54058969\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n },\n {\n \"feeId\": 306404,\n \"type\": \"fee\",\n \"reasonMessage\": \"Gebyr (for sent)\",\n \"amount\": 2.56,\n \"dueDate\": \"2020-04-15\",\n \"creationDate\": \"2019-10-18\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"3839631447\",\n \"recordId\": \"26285283\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n },\n {\n \"feeId\": 377242,\n \"type\": \"compensation\",\n \"reasonMessage\": \"Erstatning (test)\",\n \"amount\": 1,\n \"dueDate\": \"2021-08-10\",\n \"creationDate\": \"2021-02-11\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"271358741\",\n \"recordId\": \"01484524\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n },\n {\n \"feeId\": 411199,\n \"type\": \"compensation\",\n \"reasonMessage\": \"Gebyr (for sent)\",\n \"amount\": 1.5,\n \"dueDate\": \"2021-12-24\",\n \"creationDate\": \"2021-11-24\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"262088571\",\n \"recordId\": \"06964206\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n }\n]", - "headers": { - "content-type": "application/json; charset=utf-8", - "date": "{{now format='yyyy-MM-dd HH:mm:ssZ'}}", - "strict-transport-security": "max-age=15552000" + "response" : { + "status" : 200, + "body" : "[\n {\n \"feeId\": 434536,\n \"type\": \"fee\",\n \"reasonMessage\": \"Gebyr (for sent)\",\n \"amount\": 70,\n \"dueDate\": \"2022-05-08\",\n \"creationDate\": \"2022-04-06\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"5237124059\",\n \"recordId\": \"48724566\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n },\n {\n \"materialItemNumber\": \"5119382558\",\n \"recordId\": \"52518563\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n },\n {\n \"materialItemNumber\": \"5324175956\",\n \"recordId\": \"38540335\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n },\n {\n \"feeId\": 434537,\n \"type\": \"fee\",\n \"reasonMessage\": \"Gebyr (for sent)\",\n \"amount\": 70,\n \"dueDate\": \"2022-05-08\",\n \"creationDate\": \"2022-04-06\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"3275348197\",\n \"recordId\": \"23790823\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n },\n {\n \"materialItemNumber\": \"5218297864\",\n \"recordId\": \"45951685\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n },\n {\n \"feeId\": 434538,\n \"type\": \"fee\",\n \"reasonMessage\": \"Gebyr (for sent)\",\n \"amount\": 120,\n \"dueDate\": \"2022-05-08\",\n \"creationDate\": \"2022-04-06\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"5136106556\",\n \"recordId\": \"53067034\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n },\n {\n \"materialItemNumber\": \"5232011841\",\n \"recordId\": \"54058969\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n },\n {\n \"feeId\": 306404,\n \"type\": \"fee\",\n \"reasonMessage\": \"Gebyr (for sent)\",\n \"amount\": 2.56,\n \"dueDate\": \"2020-04-15\",\n \"creationDate\": \"2019-10-18\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"3839631447\",\n \"recordId\": \"26285283\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n },\n {\n \"feeId\": 377242,\n \"type\": \"compensation\",\n \"reasonMessage\": \"Erstatning (test)\",\n \"amount\": 1,\n \"dueDate\": \"2021-08-10\",\n \"creationDate\": \"2021-02-11\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"271358741\",\n \"recordId\": \"01484524\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n },\n {\n \"feeId\": 411199,\n \"type\": \"compensation\",\n \"reasonMessage\": \"Gebyr (for sent)\",\n \"amount\": 1.5,\n \"dueDate\": \"2021-12-24\",\n \"creationDate\": \"2021-11-24\",\n \"paidDate\": null,\n \"payableByClient\": true,\n \"materials\": [\n {\n \"materialItemNumber\": \"262088571\",\n \"recordId\": \"06964206\",\n \"periodical\": null,\n \"materialGroup\": {\n \"name\": \"standard\",\n \"description\": \"31 dages lånetid til alm lånere\"\n }\n }\n ]\n }\n]", + "headers" : { + "content-type" : "application/json; charset=utf-8", + "date" : "{{now format='yyyy-MM-dd HH:mm:ssZ'}}", + "strict-transport-security" : "max-age=15552000" }, - "transformers": ["response-template"] + "transformers" : [ "response-template" ] }, - "uuid": "bd783b91-b464-4137-9575-b093008866df", - "persistent": true, - "priority": 5, - "insertionIndex": 13, - "postServeActions": [] -} + "uuid" : "bd783b91-b464-4137-9575-b093008866df", + "persistent" : true, + "priority" : 5, + "insertionIndex" : 18, + "postServeActions" : [ ] +} \ No newline at end of file diff --git a/src/apps/fee-list/FeeList.dev.tsx b/src/apps/fee-list/FeeList.dev.tsx index d70683c51c..680d151d03 100644 --- a/src/apps/fee-list/FeeList.dev.tsx +++ b/src/apps/fee-list/FeeList.dev.tsx @@ -163,7 +163,12 @@ export default { defaultValue: "https://unsplash.com/photos/yjI3ozta2Zk", // Open source image of a fluffy floofer control: { type: "text" } }, - materialNumberText: { + feeListAlreadyPaidInfoText: { + defaultValue: + "Already paid? It can take up to 72 hours to register the transaction.", + control: { type: "text" } + }, + feeListMaterialNumberText: { defaultValue: "# @materialNumber", control: { type: "text" } } diff --git a/src/apps/fee-list/FeeList.tsx b/src/apps/fee-list/FeeList.tsx index 745c60c5b5..bb98428659 100644 --- a/src/apps/fee-list/FeeList.tsx +++ b/src/apps/fee-list/FeeList.tsx @@ -10,10 +10,7 @@ import FeeDetailsModal from "./modal/fee-details-modal"; import MyPaymentOverviewModal from "./modal/my-payment-overview-modal"; import FeeDetailsContent from "./stackable-fees/fee-details-content"; import modalIdsConf from "../../core/configuration/modal-ids.json"; -import { - getFeeObjectByFaustId, - getFeesInRelationToPaymentChangeDate -} from "./utils/helper"; +import { getFeeObjectByFaustId } from "./utils/helper"; import ListHeader from "../../components/list-header/list-header"; import EmptyList from "../../components/empty-list/empty-list"; @@ -21,22 +18,14 @@ const FeeList: FC = () => { const t = useText(); const u = useUrls(); const viewFeesAndCompensationRatesUrl = u("viewFeesAndCompensationRatesUrl"); - const [feeDetailsModalId, setFeeDetailsModalId] = useState(""); const { open } = useModalButtonHandler(); - const { data: fbsFees = [] } = useGetFeesV2(); - const [itemsPrePaymentChange, setItemsPrePaymentChange] = useState< - FeeV2[] | null - >(null); - const [totalFeePrePaymentChange, setTotalFeePrePaymentChange] = - useState(0); - const [itemsPostPaymentChange, setItemsPostPaymentChange] = useState< - FeeV2[] | null - >(null); - const [totalFeePostPaymentChange, setTotalFeePostPaymentChange] = - useState(0); + const { data: fbsFees = [] } = useGetFeesV2({ + includepaid: false, + includenonpayable: true + }); + const [totalFeeAmount, setTotalFeeAmount] = useState(0); const [feeDetailsData, setFeeDetailsData] = useState(); - const openDetailsModalClickEvent = useCallback( (faustId: string) => { if (faustId) { @@ -51,58 +40,21 @@ const FeeList: FC = () => { ); useEffect(() => { - if (fbsFees) { - const feesPrePaymentChange = getFeesInRelationToPaymentChangeDate( - fbsFees, - true - ).length; - if (feesPrePaymentChange > 0) { - setItemsPrePaymentChange( - getFeesInRelationToPaymentChangeDate(fbsFees, true) - ); - } - const feesPostPaymentChange = getFeesInRelationToPaymentChangeDate( - fbsFees, - false - ).length; - if (feesPostPaymentChange > 0) { - setItemsPostPaymentChange( - getFeesInRelationToPaymentChangeDate(fbsFees, false) - ); - } - } - }, [fbsFees]); - - useEffect(() => { - if (totalFeePrePaymentChange > 0) { - return; - } - const totalFee = itemsPrePaymentChange?.reduce( - (accumulator, { amount }) => accumulator + amount, - 0 - ); - if (totalFee) { - setTotalFeePrePaymentChange(totalFee); - } - }, [itemsPrePaymentChange, totalFeePrePaymentChange]); - - useEffect(() => { - if (totalFeePostPaymentChange > 0) { + if (totalFeeAmount > 0 || !fbsFees.length) { return; } - const totalFee = itemsPostPaymentChange?.reduce( + const totalFee = fbsFees.reduce( (accumulator, { amount }) => accumulator + amount, 0 ); - if (totalFee) { - setTotalFeePostPaymentChange(totalFee); + setTotalFeeAmount(totalFee); } - }, [itemsPostPaymentChange, totalFeePostPaymentChange]); + }, [fbsFees, totalFeeAmount]); return ( <> -
+

{t("feeListHeadlineText")}

@@ -112,7 +64,7 @@ const FeeList: FC = () => { {t("viewFeesAndCompensationRatesText")} - {!itemsPrePaymentChange && !itemsPostPaymentChange && ( + {!fbsFees.length && ( <> {t("unpaidFeesFirstHeadlineText")}} @@ -125,21 +77,12 @@ const FeeList: FC = () => { )} -
diff --git a/src/apps/fee-list/fee-list.test.ts b/src/apps/fee-list/fee-list.test.ts index eec068f2fc..9495e03d80 100644 --- a/src/apps/fee-list/fee-list.test.ts +++ b/src/apps/fee-list/fee-list.test.ts @@ -115,7 +115,7 @@ describe("Fee list", () => { it("Fee list basics (physical loans)", () => { // 2. System shows: // 2.a. Headline "Fees & Replacement costs" - cy.get(".fee-list-page") + cy.getBySel("fee-list-page") .getBySel("fee-list-headline") .should("exist") .should("have.text", "Fees & Replacement costs"); @@ -130,7 +130,7 @@ describe("Fee list", () => { cy.getBySel("list-header").should("contain.text", "Unsettled debt"); // 2.d link “See our fees and replacement costs” - cy.get(".fee-list-page") + cy.getBySel("fee-list-page") .find("[data-cy='fee-list-body']") .find(".link-tag") .should("exist") @@ -138,11 +138,14 @@ describe("Fee list", () => { .should("have.text", "See our fees and replacement costs"); // 3.b list of intermediates - cy.get(".fee-list-page").find(".list-reservation").eq(0).should("exist"); + cy.getBySel("fee-list-page") + .find(".list-reservation") + .eq(0) + .should("exist"); // 3.c metadata // 3.c.a material type - cy.get(".fee-list-page") + cy.getBySel("fee-list-page") .find(".list-reservation") .eq(0) .should("exist") @@ -154,7 +157,7 @@ describe("Fee list", () => { .should("have.text", "Dummy bog"); // 3.c.b title - cy.get("[data-cy='fee-list-before']") + cy.getBySel("fee-list") .find(".list-reservation") .eq(0) .should("exist") @@ -163,7 +166,7 @@ describe("Fee list", () => { .should("have.text", "Dummy Some Title"); // 3.c.c author - cy.get(".fee-list-page") + cy.getBySel("fee-list-page") .find(".list-reservation") .eq(0) .should("exist") @@ -178,7 +181,7 @@ describe("Fee list", () => { ); // 3. d fees charged dd.mm.yyyy - cy.get(".fee-list-page") + cy.getBySel("fee-list-page") .find(".list-reservation") .eq(0) .should("exist") @@ -187,10 +190,10 @@ describe("Fee list", () => { .find(".list-reservation__deadline") .find(".text-small-caption") .should("exist") - .should("have.text", "Fees charged 18. 10. 2019"); + .should("have.text", "Fees charged 06. 04. 2022"); // 3. e Label: reason - cy.get(".fee-list-page") + cy.getBySel("fee-list-page") .find(".list-reservation") .eq(0) .should("exist") @@ -202,7 +205,7 @@ describe("Fee list", () => { .should("have.text", "Gebyr (for sent)"); // 3. e Label: fee amount - cy.get(".fee-list-page") + cy.getBySel("fee-list-page") .find(".list-reservation") .eq(0) .should("exist") @@ -210,35 +213,10 @@ describe("Fee list", () => { .find(".list-reservation__fee") .find(".text-body-medium-regular") .should("exist") - .should("have.text", "Fee 2.56,-"); - - // 4. a List after date - // Title - cy.get("[data-cy='fee-list-after']") - .find(".list-reservation") - .eq(0) - .should("exist") - .find(".text-header-h4") - .should("exist") - .should("have.text", "Dummy Some Title"); - - // Author && year - cy.get(".fee-list-page") - .find(".list-reservation") - .eq(1) - .should("exist") - .find(".list-reservation__material") - .find(".list-reservation__information") - .find(".list-reservation__about") - .find(".text-small-caption") - .should("exist") - .should( - "have.text", - "By Dummy Jens Jensen and Dummy Some Corporation (2006)" - ); + .should("have.text", "Fee 70,-"); // 4.b +x other materials - cy.get(".fee-list-page") + cy.getBySel("fee-list-page") .find(".list-reservation") .eq(1) .should("exist") @@ -246,7 +224,7 @@ describe("Fee list", () => { .should("exist") .should("have.text", "+ 2 other materials"); - cy.get(".fee-list-page") + cy.getBySel("fee-list-page") .find(".list-reservation") .eq(1) .should("exist") @@ -258,7 +236,7 @@ describe("Fee list", () => { .find("div") .find(".modal-loan__title") .should("exist") - .should("have.text", "Turned in 6. April 2022"); + .should("have.text", "Turned in 18. October 2019"); // book list cy.get(".modal-loan__list-materials") diff --git a/src/apps/fee-list/list.tsx b/src/apps/fee-list/list.tsx index c530593a4d..a9d2d78d57 100644 --- a/src/apps/fee-list/list.tsx +++ b/src/apps/fee-list/list.tsx @@ -3,6 +3,7 @@ import ListHeader from "../../components/list-header/list-header"; import { FeeV2 } from "../../core/fbs/model"; import StackableFees from "./stackable-fees/stackable-fees"; import { FaustId } from "../../core/utils/types/ids"; +import { useText } from "../../core/utils/text"; interface ListProps { openDetailsModalClickEvent: (faustId: string) => void; @@ -18,6 +19,8 @@ const List: FC = ({ dataCy, totalText }) => { + const t = useText(); + return (
{fees && ( @@ -36,7 +39,10 @@ const List: FC = ({
-

{totalText}

+

+ {t("feeListAlreadyPaidInfoText")} +

+

{totalText}

diff --git a/src/apps/fee-list/stackable-fees/fee-info.tsx b/src/apps/fee-list/stackable-fees/fee-info.tsx index 6bb35bb5f4..9025a76881 100644 --- a/src/apps/fee-list/stackable-fees/fee-info.tsx +++ b/src/apps/fee-list/stackable-fees/fee-info.tsx @@ -3,6 +3,7 @@ import AuthorYear from "../../../components/author-year/authorYear"; import { Cover } from "../../../components/cover/cover"; import { BasicDetailsType } from "../../../core/utils/types/basic-details-type"; import { Pid } from "../../../core/utils/types/ids"; +import { useText } from "../../../core/utils/text"; interface FeeInfoProps { material: BasicDetailsType; @@ -23,7 +24,7 @@ const FeeInfo: FC = ({ pid, series = "" } = material; - + const t = useText(); return (
@@ -50,7 +51,9 @@ const FeeInfo: FC = ({

- {materialItemNumber} + {t("feeListMaterialNumberText", { + placeholders: { "@materialNumber": materialItemNumber } + })}

{children}
diff --git a/src/apps/fee-list/stackable-fees/stackable-fees-list.tsx b/src/apps/fee-list/stackable-fees/stackable-fees-list.tsx index 4703447e6a..79be60fc18 100644 --- a/src/apps/fee-list/stackable-fees/stackable-fees-list.tsx +++ b/src/apps/fee-list/stackable-fees/stackable-fees-list.tsx @@ -30,14 +30,14 @@ const StackableFeeList: FC = ({ key={recordId} statusMessageComponentMobile={
- {t("materialNumberText", { + {t("feeListMaterialNumberText", { placeholders: { "@materialNumber": materialItemNumber } })}
} statusMessageComponentDesktop={
- {t("materialNumberText", { + {t("feeListMaterialNumberText", { placeholders: { "@materialNumber": materialItemNumber } })}
diff --git a/src/apps/fee-list/stackable-fees/stackable-fees.tsx b/src/apps/fee-list/stackable-fees/stackable-fees.tsx index 558545c9ec..e59435fc18 100644 --- a/src/apps/fee-list/stackable-fees/stackable-fees.tsx +++ b/src/apps/fee-list/stackable-fees/stackable-fees.tsx @@ -48,7 +48,7 @@ const StackableFees: FC = ({ {stackSize > 0 && (

{t("plusXOtherMaterialsText", { diff --git a/src/apps/fee-list/utils/helper.ts b/src/apps/fee-list/utils/helper.ts index cff26d21e0..106bce85d8 100644 --- a/src/apps/fee-list/utils/helper.ts +++ b/src/apps/fee-list/utils/helper.ts @@ -1,34 +1,5 @@ import dayjs from "dayjs"; import { FeeV2 } from "../../../core/fbs/model"; -import configuration, { getConf } from "../../../core/configuration"; - -const paymentConf = getConf("payment", configuration); -const { - paymentChangeDate -}: // paymentChangeDate should never be undefined, but the config system requires -// us to handle that case -{ paymentChangeDate?: `${number}-${number}-${number}` } = paymentConf; - -export const getFeesInRelationToPaymentChangeDate = ( - feeObj: FeeV2[], - beforePaymentChangeDate: boolean -) => { - const paymentMethodChangeDate = dayjs(paymentChangeDate); // The Date fee-payment-method changed - return feeObj.filter((fee) => { - const { dueDate } = fee; - if (dueDate) { - const feeDate = dayjs(dueDate); - if (beforePaymentChangeDate) { - if (feeDate < paymentMethodChangeDate) { - return fee; - } - } else if (feeDate > paymentMethodChangeDate) { - return fee; - } - } - return false; - }); -}; export const getFeeObjectByFaustId = (feeObj: FeeV2[], faustId: string) => { return feeObj.filter((item) => { diff --git a/src/apps/menu/menu.dev.tsx b/src/apps/menu/menu.dev.tsx index e85ae0cf5c..f0ccf2a2ef 100644 --- a/src/apps/menu/menu.dev.tsx +++ b/src/apps/menu/menu.dev.tsx @@ -51,7 +51,7 @@ export default { }, menuNavigationDataConfig: { defaultValue: - '[{"name": "Loans","link": "","dataId": "1"},{"name": "Reservations","link": "","dataId": "2"},{"name": "My list","link": "","dataId": "3"},{"name": "Fees & Replacement costs","link": "","dataId": "4"},{"name": "My account","link": "","dataId": "5"}]', + '[{"name":"Dashboard","link":"/user/me/dashboard","dataId":"40"},{"name":"Loans","link":"/user/me/loans","dataId":"1"},{"name":"Reservations","link":"/user/me/reservations","dataId":"2"},{"name":"My list","link":"/user/me/favorites","dataId":"20"},{"name":"Fees & Replacement costs","link":"/user/me/fees","dataId":"4"}]', control: { type: "text" } }, menuNotificationLoansExpiredText: {