@mseva/digit-ui-module-ptr 1.1.90 → 1.1.91

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.
@@ -1,5 +1,5 @@
1
- import { LabelFieldPair, CardLabel, Dropdown, CardLabelError, TextInput, Toast, MobileNumber, CardSectionHeader, ActionBar, SubmitBar, Loader as Loader$1, UploadFile, TickMark, FormStep, TextArea, RadioOrSelect, Card, CardHeader, CardText, CardSubHeader, Modal, FormComposer, CheckPoint, ConnectingCheckPoints, Menu, AppContainer, BackButton, PrivateRoute, StatusTable, Row, CheckBox, LinkButton, Banner, KeyNote, Header, MultiLink, TelePhone, DisplayPhotos, Table, PropertyHouse, CloseSvg, Label, LinkLabel, DatePicker, RadioButtons, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, SearchForm, SearchField, BreadCrumb, PTRIcon, EmployeeModuleCard, OTPInput, Rating, CitizenHomeCard } from '@mseva/digit-ui-react-components';
2
- import React, { useState, useEffect, useMemo, useRef, useCallback, Fragment as Fragment$1 } from 'react';
1
+ import { LabelFieldPair, CardLabel, Dropdown, CardLabelError, TextInput, Toast, MobileNumber, CardSectionHeader, ActionBar, SubmitBar, Loader as Loader$1, UploadFile, TickMark, FormStep, TextArea, RadioOrSelect, Card, CardHeader, CardText, CardSubHeader, Modal, FormComposer, Menu, AppContainer, BackButton, PrivateRoute, StatusTable, Row, CheckBox, LinkButton, Banner, KeyNote, Header, MultiLink, TelePhone, DisplayPhotos, Table, PropertyHouse, CloseSvg, Label, LinkLabel, DatePicker, RadioButtons, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, SearchForm, SearchField, BreadCrumb, PTRIcon, EmployeeModuleCard, OTPInput, Rating, CitizenHomeCard } from '@mseva/digit-ui-react-components';
2
+ import React, { useState, useEffect, useMemo, useRef, Fragment as Fragment$1, useCallback } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { useLocation, useRouteMatch, useHistory, Switch, Route, Redirect, Link, useParams } from 'react-router-dom';
5
5
  import { useForm, Controller } from 'react-hook-form';
@@ -18426,101 +18426,9 @@ const PTRModal = ({
18426
18426
  }));
18427
18427
  };
18428
18428
 
18429
- const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles = {}, t) => {
18430
- var _workflowDetails$data, _workflowDetails$data2, _processInstances$, _processInstances$2, _processInstances$3, _timeline$, _timeline$2, _timeline$3, _timeline$4;
18431
- console.log('pdfFiles', pdfFiles);
18432
- const timeline = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.timeline) || [];
18433
- const processInstances = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.processInstances) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.processInstances) || [];
18434
- const businessId = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$ = processInstances[0]) === null || _processInstances$ === void 0 ? void 0 : _processInstances$.businessId) || "N/A";
18435
- const businessService = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$2 = processInstances[0]) === null || _processInstances$2 === void 0 ? void 0 : _processInstances$2.businessService) || "N/A";
18436
- const moduleName = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$3 = processInstances[0]) === null || _processInstances$3 === void 0 ? void 0 : _processInstances$3.moduleName) || "N/A";
18437
- const pdfDownloadLink = (documents, fileStoreId) => {
18438
- var _downloadLink$split;
18439
- const downloadLink = (documents === null || documents === void 0 ? void 0 : documents[fileStoreId]) || "";
18440
- const formats = (downloadLink === null || downloadLink === void 0 ? void 0 : (_downloadLink$split = downloadLink.split(",")) === null || _downloadLink$split === void 0 ? void 0 : _downloadLink$split.filter(Boolean)) || [];
18441
- return (formats === null || formats === void 0 ? void 0 : formats.find(link => !(link !== null && link !== void 0 && link.includes("large")) && !(link !== null && link !== void 0 && link.includes("medium")) && !(link !== null && link !== void 0 && link.includes("small")))) || (formats === null || formats === void 0 ? void 0 : formats[0]) || "";
18442
- };
18443
- const timelineRows = timeline.map((item, index) => {
18444
- var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
18445
- const createdDate = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created) || "N/A";
18446
- const timing = (item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.timing) || "N/A";
18447
- const assignerName = (item === null || item === void 0 ? void 0 : (_item$assigner = item.assigner) === null || _item$assigner === void 0 ? void 0 : _item$assigner.name) || "N/A";
18448
- const assignerType = (item === null || item === void 0 ? void 0 : (_item$assigner2 = item.assigner) === null || _item$assigner2 === void 0 ? void 0 : _item$assigner2.type) || "N/A";
18449
- const mobileNumber = (item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.mobileNumber) || "N/A";
18450
- const action = (item === null || item === void 0 ? void 0 : item.performedAction) || "N/A";
18451
- const status = (item === null || item === void 0 ? void 0 : item.status) || (item === null || item === void 0 ? void 0 : item.state) || "N/A";
18452
- const comment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
18453
- const documents = (item === null || item === void 0 ? void 0 : item.wfDocuments) || [];
18454
- return {
18455
- sNo: index + 1,
18456
- action: t ? t(action) : action,
18457
- status: t ? t(status) : status,
18458
- assignerName,
18459
- assignerType,
18460
- mobileNumber,
18461
- designation: assignerType,
18462
- date: createdDate,
18463
- time: timing,
18464
- dateTime: `${createdDate} ${timing !== "N/A" ? timing : ""}`.trim(),
18465
- comment,
18466
- documents: documents.map(doc => ({
18467
- name: (doc === null || doc === void 0 ? void 0 : doc.fileName) || (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
18468
- type: (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
18469
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
18470
- link: pdfDownloadLink(pdfFiles, doc === null || doc === void 0 ? void 0 : doc.fileStoreId)
18471
- })),
18472
- hasDocuments: documents.length > 0
18473
- };
18474
- });
18475
- return {
18476
- t,
18477
- tenantId: (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code) || "",
18478
- tenantName: (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.name) || (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.i18nKey) || "Government Department",
18479
- name: t ? t("TIMELINE_PDF_TITLE") : "Application Timeline",
18480
- heading: t ? t("TIMELINE_PDF_HEADING") : "File Movement Report",
18481
- businessId,
18482
- businessService: t ? t(`CS_COMMON_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}`) : businessService,
18483
- moduleName,
18484
- currentStatus: t ? t((timeline === null || timeline === void 0 ? void 0 : (_timeline$ = timeline[0]) === null || _timeline$ === void 0 ? void 0 : _timeline$.status) || (timeline === null || timeline === void 0 ? void 0 : (_timeline$2 = timeline[0]) === null || _timeline$2 === void 0 ? void 0 : _timeline$2.state) || "N/A") : (timeline === null || timeline === void 0 ? void 0 : (_timeline$3 = timeline[0]) === null || _timeline$3 === void 0 ? void 0 : _timeline$3.status) || (timeline === null || timeline === void 0 ? void 0 : (_timeline$4 = timeline[0]) === null || _timeline$4 === void 0 ? void 0 : _timeline$4.state) || "N/A",
18485
- generatedDate: new Date().toLocaleDateString("en-IN", {
18486
- day: "2-digit",
18487
- month: "long",
18488
- year: "numeric"
18489
- }),
18490
- generatedDateTime: new Date().toLocaleString("en-IN", {
18491
- day: "2-digit",
18492
- month: "2-digit",
18493
- year: "numeric",
18494
- hour: "2-digit",
18495
- minute: "2-digit",
18496
- hour12: true
18497
- }),
18498
- timelineRows,
18499
- totalSteps: timelineRows.length
18500
- };
18501
- };
18502
-
18503
- const parseDate = dateStr => {
18504
- if (!dateStr || dateStr === "N/A") return null;
18505
- if (typeof dateStr === "string" && dateStr !== null && dateStr !== void 0 && dateStr.includes("/")) {
18506
- const [day, month, year] = dateStr === null || dateStr === void 0 ? void 0 : dateStr.split("/");
18507
- return new Date(year, month - 1, day);
18508
- }
18509
- return new Date(dateStr);
18510
- };
18511
- const calculateDays = (start, end) => {
18512
- if (!start || !end) return "N/A";
18513
- const startDate = parseDate(start);
18514
- const endDate = parseDate(end);
18515
- if (!startDate || !endDate || isNaN(startDate === null || startDate === void 0 ? void 0 : startDate.getTime()) || isNaN(endDate === null || endDate === void 0 ? void 0 : endDate.getTime())) {
18516
- return "N/A";
18517
- }
18518
- const diffDays = Math.floor((endDate - startDate) / 86400000);
18519
- return diffDays < 0 ? "N/A" : diffDays === 0 ? "0 Days" : `${diffDays} Days`;
18520
- };
18521
18429
  const PDFSvg$1 = React.memo(({
18522
- width: _width = 85,
18523
- height: _height = 100,
18430
+ width: _width = 20,
18431
+ height: _height = 20,
18524
18432
  style
18525
18433
  }) => /*#__PURE__*/React.createElement("svg", {
18526
18434
  style: style,
@@ -18558,7 +18466,10 @@ const TimelineDocument = React.memo(({
18558
18466
  }, [value, Code]);
18559
18467
  if (isLoading) return /*#__PURE__*/React.createElement(Loader$1, null);
18560
18468
  return /*#__PURE__*/React.createElement("div", {
18561
- className: "timeline-docs-wrapper"
18469
+ style: {
18470
+ display: "inline-block",
18471
+ marginRight: "10px"
18472
+ }
18562
18473
  }, documents === null || documents === void 0 ? void 0 : documents.map((document, idx) => {
18563
18474
  const documentLink = pdfDownloadLink$1(data === null || data === void 0 ? void 0 : data.pdfFiles, document === null || document === void 0 ? void 0 : document.fileStoreId);
18564
18475
  if (!documentLink) return null;
@@ -18567,143 +18478,163 @@ const TimelineDocument = React.memo(({
18567
18478
  target: "_blank",
18568
18479
  rel: "noopener noreferrer",
18569
18480
  href: documentLink,
18570
- className: "timeline-doc-link"
18571
- }, /*#__PURE__*/React.createElement(PDFSvg$1, {
18572
- className: "timeline-doc-icon"
18573
- }));
18481
+ style: {
18482
+ display: "inline-flex",
18483
+ alignItems: "center",
18484
+ gap: "4px",
18485
+ color: "#2563eb",
18486
+ textDecoration: "none"
18487
+ }
18488
+ }, /*#__PURE__*/React.createElement(PDFSvg$1, null), /*#__PURE__*/React.createElement("span", {
18489
+ style: {
18490
+ fontSize: "14px",
18491
+ fontWeight: "600"
18492
+ }
18493
+ }, (document === null || document === void 0 ? void 0 : document.fileName) || "Document"));
18574
18494
  }));
18575
18495
  });
18576
- const normalizeTimeline = workflowDetails => {
18577
- var _workflowDetails$data;
18578
- const rawTimeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline;
18579
- if (!rawTimeline || !Array.isArray(rawTimeline)) return [];
18580
- return rawTimeline === null || rawTimeline === void 0 ? void 0 : rawTimeline.map((item, index) => {
18581
- var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$wfComment;
18582
- const createdDate = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created) || "N/A";
18583
- const lastModified = (item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.lastModified) || "N/A";
18584
- return {
18585
- id: index,
18586
- state: item === null || item === void 0 ? void 0 : item.state,
18587
- assignerName: (item === null || item === void 0 ? void 0 : (_item$assigner = item.assigner) === null || _item$assigner === void 0 ? void 0 : _item$assigner.name) || "N/A",
18588
- performedAction: item === null || item === void 0 ? void 0 : item.performedAction,
18589
- comment: (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "",
18590
- documents: (item === null || item === void 0 ? void 0 : item.wfDocuments) || [],
18591
- createdDate,
18592
- lastModified,
18593
- noOfDays: calculateDays(createdDate, lastModified)
18594
- };
18595
- });
18596
- };
18597
- const HEADER_FIELDS = [{
18598
- label: "CM_TIMELINE_NAME",
18599
- key: "assignerName"
18600
- }, {
18601
- label: "CM_TIMELINE_ACTION_TAKEN",
18602
- key: "performedAction"
18603
- }, {
18604
- label: "CM_TIMELINE_ACTION_TAKEN_ON",
18605
- key: "lastModified"
18606
- }, {
18607
- label: "CM_TIMELINE_DATE_RECEIVED",
18608
- key: "createdDate"
18609
- }, {
18610
- label: "CM_TIMELINE_NO_OF_DAYS",
18611
- key: "noOfDays"
18612
- }];
18613
- const TimelineCaption = React.memo(({
18614
- checkpoint,
18615
- t,
18616
- onDownloadPDF
18617
- }) => {
18618
- var _checkpoint$documents, _checkpoint$documents2;
18619
- return /*#__PURE__*/React.createElement("div", {
18620
- className: "timeline-card"
18621
- }, /*#__PURE__*/React.createElement("div", {
18622
- className: "timeline-header"
18623
- }, HEADER_FIELDS === null || HEADER_FIELDS === void 0 ? void 0 : HEADER_FIELDS.map(({
18624
- label,
18625
- key
18626
- }) => /*#__PURE__*/React.createElement("div", {
18627
- key: key,
18628
- className: "timeline-header-item"
18629
- }, /*#__PURE__*/React.createElement("span", {
18630
- className: "timeline-label"
18631
- }, t(label), ":"), /*#__PURE__*/React.createElement("span", {
18632
- className: "timeline-value"
18633
- }, t(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint[key]) || "N/A")))), /*#__PURE__*/React.createElement("div", {
18634
- className: "timeline-note"
18635
- }, /*#__PURE__*/React.createElement("span", {
18636
- className: "timeline-label"
18637
- }, t("CM_TIMELINE_NOTE"), ":"), /*#__PURE__*/React.createElement("div", {
18638
- className: "note-box"
18639
- }, (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment) || t("CM_TIMELINE_NO_COMMENTS"))), (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$documents = checkpoint.documents) === null || _checkpoint$documents === void 0 ? void 0 : _checkpoint$documents.length) > 0 && /*#__PURE__*/React.createElement("div", {
18640
- className: "timeline-docs"
18641
- }, /*#__PURE__*/React.createElement("span", {
18642
- className: "timeline-label"
18643
- }, t("CM_TIMELINE_DOCUMENT_ATTACHED"), ":"), checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$documents2 = checkpoint.documents) === null || _checkpoint$documents2 === void 0 ? void 0 : _checkpoint$documents2.map((doc, index) => /*#__PURE__*/React.createElement(TimelineDocument, {
18644
- key: `${doc === null || doc === void 0 ? void 0 : doc.documentType}-${index}`,
18645
- value: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.documents,
18646
- Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
18647
- index: index
18648
- }))));
18649
- });
18650
- const ApplicationTimeline = ({
18496
+ function NewApplicationTimeline({
18651
18497
  workflowDetails,
18652
18498
  t
18653
- }) => {
18654
- var _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _timeline$;
18655
- const details = (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data) || workflowDetails;
18656
- const timeline = useMemo(() => normalizeTimeline({
18657
- data: details
18658
- }), [details]);
18659
- const currentState = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : (_workflowDetails$data3 = _workflowDetails$data2.timeline) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3[0]) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.state;
18660
- const {
18661
- isLoading,
18662
- data
18663
- } = Digit.Hooks.ads.useADSDocumentSearch({
18664
- value: (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data5 = workflowDetails.data) === null || _workflowDetails$data5 === void 0 ? void 0 : (_workflowDetails$data6 = _workflowDetails$data5.timeline) === null || _workflowDetails$data6 === void 0 ? void 0 : _workflowDetails$data6.flatMap(item => item === null || item === void 0 ? void 0 : item.wfDocuments)) || []
18665
- }, {
18666
- value: (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data7 = workflowDetails.data) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.timeline) === null || _workflowDetails$data8 === void 0 ? void 0 : _workflowDetails$data8.flatMap(item => item === null || item === void 0 ? void 0 : item.wfDocuments)) || []
18667
- }, null, 0);
18668
- console.log('data of doc hook', data);
18669
- const handleDownloadPDF = useCallback(() => {
18670
- if (!isLoading) {
18671
- const tenantInfo = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY") || {};
18672
- const acknowledgementData = getTimelineAcknowledgementData(workflowDetails, tenantInfo, (data === null || data === void 0 ? void 0 : data.pdfFiles) || {}, t);
18673
- Digit.Utils.pdf.generateTimelinePDF(acknowledgementData);
18674
- }
18675
- }, [workflowDetails, data, t]);
18676
- if (!(timeline !== null && timeline !== void 0 && timeline.length)) return null;
18677
- if (isLoading) return /*#__PURE__*/React.createElement(Loader$1, null);
18678
- return /*#__PURE__*/React.createElement("div", {
18679
- className: "timeline-hoc-container"
18499
+ }) {
18500
+ const normalizeTimeline = workflowDetails => {
18501
+ const details = (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data) || workflowDetails;
18502
+ const rawTimeline = details === null || details === void 0 ? void 0 : details.timeline;
18503
+ if (!rawTimeline || !Array.isArray(rawTimeline)) return [];
18504
+ return rawTimeline === null || rawTimeline === void 0 ? void 0 : rawTimeline.map(item => {
18505
+ var _item$auditDetails, _item$auditDetails2, _dateObj, _dateObj2;
18506
+ let dateObj = null;
18507
+ const dateStr = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.lastModified) || (item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.created);
18508
+ if (dateStr) {
18509
+ if (typeof dateStr === "string" && dateStr !== null && dateStr !== void 0 && dateStr.includes("/")) {
18510
+ const [day, month, year] = dateStr === null || dateStr === void 0 ? void 0 : dateStr.split("/");
18511
+ dateObj = new Date(year, month - 1, day);
18512
+ } else {
18513
+ dateObj = new Date(dateStr);
18514
+ }
18515
+ }
18516
+ const createdDate = dateObj ? (_dateObj = dateObj) === null || _dateObj === void 0 ? void 0 : _dateObj.toLocaleDateString("en-GB", {
18517
+ day: "2-digit",
18518
+ month: "long",
18519
+ year: "numeric"
18520
+ }) : "N/A";
18521
+ const createdTime = dateObj ? (_dateObj2 = dateObj) === null || _dateObj2 === void 0 ? void 0 : _dateObj2.toLocaleTimeString([], {
18522
+ hour: "2-digit",
18523
+ minute: "2-digit",
18524
+ hour12: true
18525
+ }) : "";
18526
+ return {
18527
+ ...item,
18528
+ auditDetails: {
18529
+ ...(item === null || item === void 0 ? void 0 : item.auditDetails),
18530
+ created: createdDate,
18531
+ timing: createdTime
18532
+ },
18533
+ status: item === null || item === void 0 ? void 0 : item.state,
18534
+ performedAction: item === null || item === void 0 ? void 0 : item.performedAction,
18535
+ assignes: item !== null && item !== void 0 && item.assignes ? item === null || item === void 0 ? void 0 : item.assignes : item !== null && item !== void 0 && item.assigner ? [item === null || item === void 0 ? void 0 : item.assigner] : [],
18536
+ wfComment: (item === null || item === void 0 ? void 0 : item.wfComment) || (item !== null && item !== void 0 && item.comment ? [item === null || item === void 0 ? void 0 : item.comment] : []),
18537
+ wfDocuments: (item === null || item === void 0 ? void 0 : item.wfDocuments) || []
18538
+ };
18539
+ });
18540
+ };
18541
+ const data = useMemo(() => normalizeTimeline(workflowDetails), [workflowDetails]);
18542
+ const sortedData = data || [];
18543
+ console.log("sortedData", sortedData);
18544
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
18545
+ className: "custom-timeline-container"
18680
18546
  }, /*#__PURE__*/React.createElement("div", {
18681
- className: "timeline-header-wrapper"
18682
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
18683
- className: "timeline-subheader"
18684
- }, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), /*#__PURE__*/React.createElement("span", {
18685
- onClick: handleDownloadPDF,
18686
- className: "download-button"
18687
- }, t("CS_COMMON_DOWNLOAD"))), (timeline === null || timeline === void 0 ? void 0 : timeline.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
18688
- isCompleted: true,
18689
- label: t(timeline === null || timeline === void 0 ? void 0 : (_timeline$ = timeline[0]) === null || _timeline$ === void 0 ? void 0 : _timeline$.state),
18690
- customChild: /*#__PURE__*/React.createElement(TimelineCaption, {
18691
- checkpoint: timeline === null || timeline === void 0 ? void 0 : timeline[0],
18692
- t: t,
18693
- onDownloadPDF: handleDownloadPDF
18694
- })
18695
- }) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, timeline === null || timeline === void 0 ? void 0 : timeline.map(checkpoint => /*#__PURE__*/React.createElement(CheckPoint, {
18696
- key: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.id,
18697
- keyValue: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.id,
18698
- isCompleted: (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.state) === currentState,
18699
- label: t(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.state),
18700
- customChild: /*#__PURE__*/React.createElement(TimelineCaption, {
18701
- checkpoint: checkpoint,
18702
- t: t,
18703
- onDownloadPDF: handleDownloadPDF
18704
- })
18547
+ className: "custom-timeline-header"
18548
+ }, /*#__PURE__*/React.createElement("div", {
18549
+ className: "custom-tracking-status-header"
18550
+ }, /*#__PURE__*/React.createElement("div", {
18551
+ className: "custom-tracking-line"
18552
+ }), /*#__PURE__*/React.createElement("span", {
18553
+ className: "custom-tracking-status-text"
18554
+ }, "TRACKING STATUS"), /*#__PURE__*/React.createElement("div", {
18555
+ className: "custom-tracking-line"
18556
+ })), /*#__PURE__*/React.createElement("div", {
18557
+ className: "custom-title-bar-row"
18558
+ }, /*#__PURE__*/React.createElement("h2", {
18559
+ className: "custom-timeline-title"
18560
+ }, "Application History"), /*#__PURE__*/React.createElement("div", {
18561
+ className: "custom-blue-bar"
18562
+ }))), /*#__PURE__*/React.createElement("div", {
18563
+ className: "custom-timeline-entries"
18564
+ }, sortedData === null || sortedData === void 0 ? void 0 : sortedData.map((item, index) => {
18565
+ var _item$auditDetails3, _item$auditDetails4, _item$assignes, _item$assignes2, _item$assignes2$, _item$assignes3, _item$assignes3$, _item$assignes4, _item$assignes4$, _item$wfComment, _item$wfComment2, _item$wfComment3, _item$wfDocuments, _item$wfDocuments2;
18566
+ return /*#__PURE__*/React.createElement("div", {
18567
+ key: index,
18568
+ className: "custom-timeline-entry"
18569
+ }, /*#__PURE__*/React.createElement("div", {
18570
+ className: "custom-vertical-line"
18571
+ }), /*#__PURE__*/React.createElement("div", {
18572
+ className: "custom-date-badge"
18573
+ }, item === null || item === void 0 ? void 0 : (_item$auditDetails3 = item.auditDetails) === null || _item$auditDetails3 === void 0 ? void 0 : _item$auditDetails3.created, " ", item === null || item === void 0 ? void 0 : (_item$auditDetails4 = item.auditDetails) === null || _item$auditDetails4 === void 0 ? void 0 : _item$auditDetails4.timing), /*#__PURE__*/React.createElement("div", {
18574
+ className: "custom-entry-content"
18575
+ }, /*#__PURE__*/React.createElement("div", {
18576
+ className: "custom-icon-container"
18577
+ }, /*#__PURE__*/React.createElement("div", {
18578
+ className: "custom-circular-icon"
18579
+ }, /*#__PURE__*/React.createElement("svg", {
18580
+ className: "custom-mail-icon",
18581
+ viewBox: "0 0 24 24"
18582
+ }, /*#__PURE__*/React.createElement("rect", {
18583
+ x: "3",
18584
+ y: "5",
18585
+ width: "18",
18586
+ height: "14",
18587
+ rx: "2"
18588
+ }), /*#__PURE__*/React.createElement("path", {
18589
+ d: "M3 7l9 6 9-6"
18590
+ })))), /*#__PURE__*/React.createElement("div", {
18591
+ className: "custom-content-card"
18592
+ }, /*#__PURE__*/React.createElement("div", {
18593
+ className: "custom-card-top"
18594
+ }, /*#__PURE__*/React.createElement("div", {
18595
+ className: "custom-card-left"
18596
+ }, /*#__PURE__*/React.createElement("h3", {
18597
+ className: "custom-action-title"
18598
+ }, "Action taken by"), (item === null || item === void 0 ? void 0 : item.assignes) && (item === null || item === void 0 ? void 0 : (_item$assignes = item.assignes) === null || _item$assignes === void 0 ? void 0 : _item$assignes.length) > 0 && /*#__PURE__*/React.createElement("div", {
18599
+ className: "custom-officer-info"
18600
+ }, /*#__PURE__*/React.createElement("div", {
18601
+ className: "custom-officer-name"
18602
+ }, (item === null || item === void 0 ? void 0 : (_item$assignes2 = item.assignes) === null || _item$assignes2 === void 0 ? void 0 : (_item$assignes2$ = _item$assignes2[0]) === null || _item$assignes2$ === void 0 ? void 0 : _item$assignes2$.name) || t("CS_COMMON_NA")), (item === null || item === void 0 ? void 0 : (_item$assignes3 = item.assignes) === null || _item$assignes3 === void 0 ? void 0 : (_item$assignes3$ = _item$assignes3[0]) === null || _item$assignes3$ === void 0 ? void 0 : _item$assignes3$.emailId) && /*#__PURE__*/React.createElement("div", {
18603
+ className: "custom-officer-email"
18604
+ }, /*#__PURE__*/React.createElement("span", {
18605
+ className: "custom-email-label"
18606
+ }, "Email:"), " ", item === null || item === void 0 ? void 0 : (_item$assignes4 = item.assignes) === null || _item$assignes4 === void 0 ? void 0 : (_item$assignes4$ = _item$assignes4[0]) === null || _item$assignes4$ === void 0 ? void 0 : _item$assignes4$.emailId))), /*#__PURE__*/React.createElement("div", {
18607
+ className: "custom-card-right"
18608
+ }, /*#__PURE__*/React.createElement("div", {
18609
+ className: "custom-actions-label"
18610
+ }, "Action"), /*#__PURE__*/React.createElement("div", {
18611
+ className: "custom-status-text"
18612
+ }, t((item === null || item === void 0 ? void 0 : item.performedAction) || "CS_COMMON_NA")))), (item === null || item === void 0 ? void 0 : item.wfComment) && (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment.length) > 0 && (item === null || item === void 0 ? void 0 : (_item$wfComment2 = item.wfComment) === null || _item$wfComment2 === void 0 ? void 0 : _item$wfComment2.some(c => c === null || c === void 0 ? void 0 : c.trim())) && /*#__PURE__*/React.createElement("div", {
18613
+ className: "custom-comments-section"
18614
+ }, /*#__PURE__*/React.createElement("h4", {
18615
+ className: "custom-comments-title"
18616
+ }, "Officer Comments"), /*#__PURE__*/React.createElement("div", {
18617
+ className: "custom-comment-text"
18618
+ }, item === null || item === void 0 ? void 0 : (_item$wfComment3 = item.wfComment) === null || _item$wfComment3 === void 0 ? void 0 : _item$wfComment3.map((comment, idx) => /*#__PURE__*/React.createElement("p", {
18619
+ key: idx
18620
+ }, comment)))), (item === null || item === void 0 ? void 0 : item.wfDocuments) && (item === null || item === void 0 ? void 0 : (_item$wfDocuments = item.wfDocuments) === null || _item$wfDocuments === void 0 ? void 0 : _item$wfDocuments.length) > 0 && /*#__PURE__*/React.createElement("div", {
18621
+ className: "custom-comments-section",
18622
+ style: {
18623
+ borderTop: "none",
18624
+ paddingTop: "0"
18625
+ }
18626
+ }, /*#__PURE__*/React.createElement("h4", {
18627
+ className: "custom-comments-title"
18628
+ }, "Document Attached:"), /*#__PURE__*/React.createElement("div", {
18629
+ className: "custom-comment-text"
18630
+ }, item === null || item === void 0 ? void 0 : (_item$wfDocuments2 = item.wfDocuments) === null || _item$wfDocuments2 === void 0 ? void 0 : _item$wfDocuments2.map((doc, index) => /*#__PURE__*/React.createElement(TimelineDocument, {
18631
+ key: `${doc === null || doc === void 0 ? void 0 : doc.documentType}-${index}`,
18632
+ value: item === null || item === void 0 ? void 0 : item.wfDocuments,
18633
+ Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
18634
+ index: index
18635
+ })))))));
18705
18636
  }))));
18706
- };
18637
+ }
18707
18638
 
18708
18639
  const PTRWFApplicationTimeline = props => {
18709
18640
  var _props$application2, _props$application3, _props$application4, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user$info, _user$info$roles, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _props$application0, _props$application1, _actions$, _props$application10, _props$application11, _props$application13, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11;
@@ -18896,7 +18827,7 @@ const PTRWFApplicationTimeline = props => {
18896
18827
  fetchWorkflowService();
18897
18828
  }
18898
18829
  }, [tenantId]);
18899
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(ApplicationTimeline, {
18830
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(NewApplicationTimeline, {
18900
18831
  workflowDetails: workflowDetails,
18901
18832
  t: t
18902
18833
  }), (((_props$application0 = props.application) === null || _props$application0 === void 0 ? void 0 : _props$application0.status) != "CITIZENACTIONREQUIRED" || ((_props$application1 = props.application) === null || _props$application1 === void 0 ? void 0 : _props$application1.status) != "INITIATED") && actions && ((_actions$ = actions[0]) === null || _actions$ === void 0 ? void 0 : _actions$.action) != "PAY" && !isCitizen && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
@@ -19460,7 +19391,19 @@ const PTRMyApplications = () => {
19460
19391
  color: "#333"
19461
19392
  }
19462
19393
  };
19463
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, null, `${t("CS_TITLE_MY_APPLICATIONS")} ${applicationsList ? `(${applicationsList.length})` : ""}`), /*#__PURE__*/React.createElement("div", null, loadingPage ? /*#__PURE__*/React.createElement(Loader$1, null) : (applicationsList === null || applicationsList === void 0 ? void 0 : applicationsList.length) > 0 && currentItems.map((application, index) => /*#__PURE__*/React.createElement("div", {
19394
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, null, `${t("CS_TITLE_MY_APPLICATIONS")} ${applicationsList ? `(${applicationsList.length})` : ""}`), /*#__PURE__*/React.createElement("p", {
19395
+ style: {
19396
+ marginLeft: "16px",
19397
+ marginTop: "16px"
19398
+ }
19399
+ }, t("PTR_TEXT_NOT_ABLE_TO_FIND_THE_APPLICATION"), " ", /*#__PURE__*/React.createElement("span", {
19400
+ className: "link",
19401
+ style: {
19402
+ display: "block"
19403
+ }
19404
+ }, /*#__PURE__*/React.createElement(Link, {
19405
+ to: "/digit-ui/citizen/ptr/petservice/new-application/info"
19406
+ }, t("PTR_COMMON_CLICK_HERE_TO_REGISTER_NEW_PET")))), /*#__PURE__*/React.createElement("div", null, loadingPage ? /*#__PURE__*/React.createElement(Loader$1, null) : (applicationsList === null || applicationsList === void 0 ? void 0 : applicationsList.length) > 0 && currentItems.map((application, index) => /*#__PURE__*/React.createElement("div", {
19464
19407
  key: index
19465
19408
  }, /*#__PURE__*/React.createElement(PetApplication, {
19466
19409
  application: application,
@@ -19501,19 +19444,7 @@ const PTRMyApplications = () => {
19501
19444
  setLoadingPage(false);
19502
19445
  }, 500);
19503
19446
  }
19504
- }, "\u2192")), /*#__PURE__*/React.createElement("p", {
19505
- style: {
19506
- marginLeft: "16px",
19507
- marginTop: "16px"
19508
- }
19509
- }, t("PTR_TEXT_NOT_ABLE_TO_FIND_THE_APPLICATION"), " ", /*#__PURE__*/React.createElement("span", {
19510
- className: "link",
19511
- style: {
19512
- display: "block"
19513
- }
19514
- }, /*#__PURE__*/React.createElement(Link, {
19515
- to: "/digit-ui/citizen/ptr/petservice/new-application/info"
19516
- }, t("PTR_COMMON_CLICK_HERE_TO_REGISTER_NEW_PET")))));
19447
+ }, "\u2192")));
19517
19448
  };
19518
19449
 
19519
19450
  const PDFSvg$2 = ({
@@ -25252,60 +25183,59 @@ const StepWrapper = ({
25252
25183
  const {
25253
25184
  t
25254
25185
  } = useTranslation();
25255
- const stepStyle = isActive => ({
25186
+ const stepStyle = (isActive, isLast) => ({
25256
25187
  display: "flex",
25257
25188
  alignItems: "center",
25258
25189
  justifyContent: "flex-end",
25259
- flex: 1,
25260
- color: isActive ? "#3f51b5" : "#ccc",
25261
- padding: "10px 10px",
25262
- width: "260px"
25190
+ flex: "0 0 auto",
25191
+ color: isActive ? "#0D43A7" : "#9CA3AF",
25192
+ padding: "14px 12px",
25193
+ width: "260px",
25194
+ marginBottom: isLast ? "6px" : "18px"
25263
25195
  });
25264
25196
  const circleStyle = stepNumber => {
25265
- let backgroundColor;
25266
- if (stepNumber <= _currentStep) {
25267
- backgroundColor = "#0D43A7";
25268
- } else {
25269
- backgroundColor = "#FFFFFF";
25270
- }
25197
+ const completed = stepNumber <= _currentStep;
25271
25198
  return {
25272
- width: "60px",
25273
- height: "60px",
25199
+ width: "56px",
25200
+ height: "56px",
25274
25201
  borderRadius: "50%",
25275
- backgroundColor,
25276
- color: stepNumber <= _currentStep ? "white" : "black",
25202
+ background: completed ? "linear-gradient(135deg,#2563eb,#7c3aed)" : "#ffffff",
25203
+ color: completed ? "#ffffff" : "#0f172a",
25277
25204
  display: "flex",
25278
25205
  alignItems: "center",
25279
25206
  justifyContent: "center",
25280
- marginBottom: "10px",
25281
- fontWeight: "normal",
25207
+ marginBottom: "8px",
25208
+ fontWeight: 600,
25282
25209
  fontSize: "18px",
25283
- border: stepNumber > _currentStep ? "1px solid black" : "",
25210
+ border: completed ? "none" : "1px solid rgba(15,23,42,0.08)",
25211
+ boxShadow: completed ? "0 6px 18px rgba(37,99,235,0.18)" : "0 2px 6px rgba(2,6,23,0.04)",
25284
25212
  position: "relative"
25285
25213
  };
25286
25214
  };
25287
25215
  const labelStyle = {
25288
- fontSize: "18px",
25289
- color: "#1E1E1E",
25290
- fontWeight: "500",
25291
- fontFamily: "Noto Sans,sans-serif",
25292
- marginRight: "6px"
25216
+ fontSize: "16px",
25217
+ color: "#0f172a",
25218
+ fontWeight: 600,
25219
+ fontFamily: "Noto Sans, sans-serif",
25220
+ marginRight: "8px",
25221
+ textAlign: "right"
25293
25222
  };
25294
25223
  const stepNumberStyle = {
25295
- fontSize: "18px",
25296
- color: "#263238",
25297
- fontWeight: "400",
25298
- fontFamily: "Noto Sans,sans-serif",
25299
- margin: "0px 6px 0px 0px"
25224
+ fontSize: "14px",
25225
+ color: "#6b7280",
25226
+ fontWeight: 500,
25227
+ fontFamily: "Noto Sans, sans-serif",
25228
+ margin: "0 6px 0 0"
25300
25229
  };
25301
25230
  const lineStyle = {
25302
25231
  position: "absolute",
25303
- width: "2px",
25304
- height: "50px",
25305
- backgroundColor: "grey",
25232
+ width: "3px",
25233
+ height: "56px",
25234
+ backgroundColor: "rgba(15,23,42,0.06)",
25306
25235
  left: "50%",
25307
25236
  top: "100%",
25308
- transform: "translateX(-50%)"
25237
+ transform: "translateX(-50%)",
25238
+ borderRadius: "2px"
25309
25239
  };
25310
25240
  const isMobile = window.Digit.Utils.browser.isMobile();
25311
25241
  const totalSteps = _stepsList.length;
@@ -25315,22 +25245,25 @@ const StepWrapper = ({
25315
25245
  width: "100%",
25316
25246
  display: "flex",
25317
25247
  flexDirection: "row",
25318
- alignItems: "top",
25319
- justifyContent: "flex-start"
25248
+ alignItems: "flex-start",
25249
+ justifyContent: "flex-start",
25250
+ gap: "24px"
25320
25251
  }
25321
25252
  }, /*#__PURE__*/React.createElement("div", {
25322
25253
  className: "stepper-navigation-bar",
25323
25254
  style: {
25324
25255
  display: "flex",
25325
25256
  flexDirection: "column",
25326
- justifyContent: "space-between",
25327
- height: "50%",
25257
+ alignItems: "center",
25258
+ padding: "18px",
25259
+ minWidth: "120px",
25260
+ maxWidth: "320px",
25328
25261
  marginBottom: "20px"
25329
25262
  }
25330
25263
  }, [...Array(totalSteps)].map((_, index) => /*#__PURE__*/React.createElement("div", {
25331
25264
  className: "step-content",
25332
25265
  key: index,
25333
- style: stepStyle(index + 1 <= _currentStep)
25266
+ style: stepStyle(index + 1 <= _currentStep, index === totalSteps - 1)
25334
25267
  }, /*#__PURE__*/React.createElement("div", {
25335
25268
  className: "step-sub-content",
25336
25269
  style: {
@@ -25354,7 +25287,8 @@ const StepWrapper = ({
25354
25287
  className: "stepper-body",
25355
25288
  style: {
25356
25289
  width: "100%",
25357
- marginBottom: "20px"
25290
+ marginBottom: "20px",
25291
+ background: "transparent"
25358
25292
  }
25359
25293
  }, children));
25360
25294
  };
@@ -25561,9 +25495,7 @@ const NewPTRStepperForm = () => {
25561
25495
  });
25562
25496
  return () => unlisten();
25563
25497
  }, [history, dispatch]);
25564
- return /*#__PURE__*/React.createElement("div", {
25565
- className: "pageCard"
25566
- }, /*#__PURE__*/React.createElement(CardHeader, {
25498
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardHeader, {
25567
25499
  styles: {
25568
25500
  fontSize: "28px",
25569
25501
  fontWeight: "400",