@mseva/digit-ui-module-ptr 1.1.25 → 1.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +5 -0
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19214,6 +19214,7 @@ const PetApplication = _ref => {
|
|
|
19214
19214
|
}]);
|
|
19215
19215
|
const checkRenewTime = data === null || data === void 0 ? void 0 : (_data$PetService = data.PetService) === null || _data$PetService === void 0 ? void 0 : (_data$PetService$Appl = _data$PetService.ApplicationType) === null || _data$PetService$Appl === void 0 ? void 0 : _data$PetService$Appl.filter(item => item.code == "RENEWAPPLICATION");
|
|
19216
19216
|
const checkTimeRenew = checkRenewTime === null || checkRenewTime === void 0 ? void 0 : (_checkRenewTime$ = checkRenewTime[0]) === null || _checkRenewTime$ === void 0 ? void 0 : _checkRenewTime$.renewalPeriod;
|
|
19217
|
+
console.log("checkTimeRenew", checkTimeRenew);
|
|
19217
19218
|
const parseDate = rawDate => {
|
|
19218
19219
|
if (!rawDate) return null;
|
|
19219
19220
|
if (!isNaN(rawDate)) {
|
|
@@ -19223,11 +19224,15 @@ const PetApplication = _ref => {
|
|
|
19223
19224
|
return new Date(rawDate);
|
|
19224
19225
|
}
|
|
19225
19226
|
};
|
|
19227
|
+
console.log("application", application === null || application === void 0 ? void 0 : application.validityDate);
|
|
19226
19228
|
const validToObj = parseDate(application === null || application === void 0 ? void 0 : application.validityDate);
|
|
19227
19229
|
const currentDateObj = new Date();
|
|
19228
19230
|
const duration = validToObj && currentDateObj ? validToObj.getTime() - currentDateObj.getTime() : null;
|
|
19231
|
+
console.log("duration", duration);
|
|
19229
19232
|
const checkDuration = duration !== null && duration <= checkTimeRenew;
|
|
19230
19233
|
const checkRenewal = (application === null || application === void 0 ? void 0 : application.status) == "APPROVED" || (application === null || application === void 0 ? void 0 : application.status) == "EXPIRED";
|
|
19234
|
+
console.log("checkRenewal", checkRenewal);
|
|
19235
|
+
console.log("checkDuration", checkDuration);
|
|
19231
19236
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
|
|
19232
19237
|
keyValue: t("PDF_STATIC_LABEL_APPLICATION_NUMBER_LABEL"),
|
|
19233
19238
|
note: application === null || application === void 0 ? void 0 : application.applicationNumber
|