@mseva/digit-ui-module-ptr 1.1.89 → 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,93 +18426,9 @@ const PTRModal = ({
18426
18426
  }));
18427
18427
  };
18428
18428
 
18429
- const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, t) => {
18430
- var _workflowDetails$data, _workflowDetails$data2, _processInstances$, _processInstances$2, _processInstances$3, _timeline$, _timeline$2, _timeline$3, _timeline$4;
18431
- 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) || [];
18432
- 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) || [];
18433
- const businessId = (processInstances === null || processInstances === void 0 ? void 0 : (_processInstances$ = processInstances[0]) === null || _processInstances$ === void 0 ? void 0 : _processInstances$.businessId) || "N/A";
18434
- 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";
18435
- 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";
18436
- const timelineRows = timeline.map((item, index) => {
18437
- var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
18438
- 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";
18439
- 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";
18440
- 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";
18441
- 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";
18442
- 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";
18443
- const action = (item === null || item === void 0 ? void 0 : item.performedAction) || "N/A";
18444
- const status = (item === null || item === void 0 ? void 0 : item.status) || (item === null || item === void 0 ? void 0 : item.state) || "N/A";
18445
- const comment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
18446
- const documents = (item === null || item === void 0 ? void 0 : item.wfDocuments) || [];
18447
- return {
18448
- sNo: index + 1,
18449
- action: t ? t(action) : action,
18450
- status: t ? t(status) : status,
18451
- assignerName,
18452
- assignerType,
18453
- mobileNumber,
18454
- designation: assignerType,
18455
- date: createdDate,
18456
- time: timing,
18457
- dateTime: `${createdDate} ${timing !== "N/A" ? timing : ""}`.trim(),
18458
- comment,
18459
- documents: documents.map(doc => ({
18460
- name: (doc === null || doc === void 0 ? void 0 : doc.fileName) || (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
18461
- type: (doc === null || doc === void 0 ? void 0 : doc.documentType) || "Document",
18462
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId
18463
- })),
18464
- hasDocuments: documents.length > 0
18465
- };
18466
- });
18467
- return {
18468
- t,
18469
- tenantId: (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code) || "",
18470
- tenantName: (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.name) || (tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.i18nKey) || "Government Department",
18471
- name: t ? t("TIMELINE_PDF_TITLE") : "Application Timeline",
18472
- heading: t ? t("TIMELINE_PDF_HEADING") : "File Movement Report",
18473
- businessId,
18474
- businessService: t ? t(`CS_COMMON_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}`) : businessService,
18475
- moduleName,
18476
- 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",
18477
- generatedDate: new Date().toLocaleDateString("en-IN", {
18478
- day: "2-digit",
18479
- month: "long",
18480
- year: "numeric"
18481
- }),
18482
- generatedDateTime: new Date().toLocaleString("en-IN", {
18483
- day: "2-digit",
18484
- month: "2-digit",
18485
- year: "numeric",
18486
- hour: "2-digit",
18487
- minute: "2-digit",
18488
- hour12: true
18489
- }),
18490
- timelineRows,
18491
- totalSteps: timelineRows.length
18492
- };
18493
- };
18494
-
18495
- const parseDate = dateStr => {
18496
- if (!dateStr || dateStr === "N/A") return null;
18497
- if (typeof dateStr === "string" && dateStr !== null && dateStr !== void 0 && dateStr.includes("/")) {
18498
- const [day, month, year] = dateStr === null || dateStr === void 0 ? void 0 : dateStr.split("/");
18499
- return new Date(year, month - 1, day);
18500
- }
18501
- return new Date(dateStr);
18502
- };
18503
- const calculateDays = (start, end) => {
18504
- if (!start || !end) return "N/A";
18505
- const startDate = parseDate(start);
18506
- const endDate = parseDate(end);
18507
- if (!startDate || !endDate || isNaN(startDate === null || startDate === void 0 ? void 0 : startDate.getTime()) || isNaN(endDate === null || endDate === void 0 ? void 0 : endDate.getTime())) {
18508
- return "N/A";
18509
- }
18510
- const diffDays = Math.floor((endDate - startDate) / 86400000);
18511
- return diffDays < 0 ? "N/A" : diffDays === 0 ? "0 Days" : `${diffDays} Days`;
18512
- };
18513
18429
  const PDFSvg$1 = React.memo(({
18514
- width: _width = 85,
18515
- height: _height = 100,
18430
+ width: _width = 20,
18431
+ height: _height = 20,
18516
18432
  style
18517
18433
  }) => /*#__PURE__*/React.createElement("svg", {
18518
18434
  style: style,
@@ -18550,7 +18466,10 @@ const TimelineDocument = React.memo(({
18550
18466
  }, [value, Code]);
18551
18467
  if (isLoading) return /*#__PURE__*/React.createElement(Loader$1, null);
18552
18468
  return /*#__PURE__*/React.createElement("div", {
18553
- className: "timeline-docs-wrapper"
18469
+ style: {
18470
+ display: "inline-block",
18471
+ marginRight: "10px"
18472
+ }
18554
18473
  }, documents === null || documents === void 0 ? void 0 : documents.map((document, idx) => {
18555
18474
  const documentLink = pdfDownloadLink$1(data === null || data === void 0 ? void 0 : data.pdfFiles, document === null || document === void 0 ? void 0 : document.fileStoreId);
18556
18475
  if (!documentLink) return null;
@@ -18559,131 +18478,163 @@ const TimelineDocument = React.memo(({
18559
18478
  target: "_blank",
18560
18479
  rel: "noopener noreferrer",
18561
18480
  href: documentLink,
18562
- className: "timeline-doc-link"
18563
- }, /*#__PURE__*/React.createElement(PDFSvg$1, {
18564
- className: "timeline-doc-icon"
18565
- }));
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"));
18566
18494
  }));
18567
18495
  });
18568
- const normalizeTimeline = workflowDetails => {
18569
- var _workflowDetails$data;
18570
- const rawTimeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline;
18571
- if (!rawTimeline || !Array.isArray(rawTimeline)) return [];
18572
- return rawTimeline === null || rawTimeline === void 0 ? void 0 : rawTimeline.map((item, index) => {
18573
- var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$wfComment;
18574
- 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";
18575
- 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";
18576
- return {
18577
- id: index,
18578
- state: item === null || item === void 0 ? void 0 : item.state,
18579
- assignerName: (item === null || item === void 0 ? void 0 : (_item$assigner = item.assigner) === null || _item$assigner === void 0 ? void 0 : _item$assigner.name) || "N/A",
18580
- performedAction: item === null || item === void 0 ? void 0 : item.performedAction,
18581
- comment: (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "",
18582
- documents: (item === null || item === void 0 ? void 0 : item.wfDocuments) || [],
18583
- createdDate,
18584
- lastModified,
18585
- noOfDays: calculateDays(createdDate, lastModified)
18586
- };
18587
- });
18588
- };
18589
- const HEADER_FIELDS = [{
18590
- label: "CM_TIMELINE_NAME",
18591
- key: "assignerName"
18592
- }, {
18593
- label: "CM_TIMELINE_ACTION_TAKEN",
18594
- key: "performedAction"
18595
- }, {
18596
- label: "CM_TIMELINE_ACTION_TAKEN_ON",
18597
- key: "lastModified"
18598
- }, {
18599
- label: "CM_TIMELINE_DATE_RECEIVED",
18600
- key: "createdDate"
18601
- }, {
18602
- label: "CM_TIMELINE_NO_OF_DAYS",
18603
- key: "noOfDays"
18604
- }];
18605
- const TimelineCaption = React.memo(({
18606
- checkpoint,
18607
- t,
18608
- onDownloadPDF
18609
- }) => {
18610
- var _checkpoint$documents, _checkpoint$documents2;
18611
- return /*#__PURE__*/React.createElement("div", {
18612
- className: "timeline-card"
18613
- }, /*#__PURE__*/React.createElement("div", {
18614
- className: "timeline-header"
18615
- }, HEADER_FIELDS === null || HEADER_FIELDS === void 0 ? void 0 : HEADER_FIELDS.map(({
18616
- label,
18617
- key
18618
- }) => /*#__PURE__*/React.createElement("div", {
18619
- key: key,
18620
- className: "timeline-header-item"
18621
- }, /*#__PURE__*/React.createElement("span", {
18622
- className: "timeline-label"
18623
- }, t(label), ":"), /*#__PURE__*/React.createElement("span", {
18624
- className: "timeline-value"
18625
- }, t(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint[key]) || "N/A")))), /*#__PURE__*/React.createElement("div", {
18626
- className: "timeline-note"
18627
- }, /*#__PURE__*/React.createElement("span", {
18628
- className: "timeline-label"
18629
- }, t("CM_TIMELINE_NOTE"), ":"), /*#__PURE__*/React.createElement("div", {
18630
- className: "note-box"
18631
- }, (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", {
18632
- className: "timeline-docs"
18633
- }, /*#__PURE__*/React.createElement("span", {
18634
- className: "timeline-label"
18635
- }, 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, {
18636
- key: `${doc === null || doc === void 0 ? void 0 : doc.documentType}-${index}`,
18637
- value: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.documents,
18638
- Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
18639
- index: index
18640
- }))));
18641
- });
18642
- const ApplicationTimeline = ({
18496
+ function NewApplicationTimeline({
18643
18497
  workflowDetails,
18644
18498
  t
18645
- }) => {
18646
- var _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _timeline$;
18647
- const details = (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data) || workflowDetails;
18648
- const timeline = useMemo(() => normalizeTimeline({
18649
- data: details
18650
- }), [details]);
18651
- 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;
18652
- const handleDownloadPDF = useCallback(() => {
18653
- const tenantInfo = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY") || {};
18654
- const acknowledgementData = getTimelineAcknowledgementData(workflowDetails, tenantInfo, t);
18655
- Digit.Utils.pdf.generateTimelinePDF(acknowledgementData);
18656
- }, [workflowDetails, t]);
18657
- if (!(timeline !== null && timeline !== void 0 && timeline.length)) return null;
18658
- return /*#__PURE__*/React.createElement("div", {
18659
- 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"
18660
18546
  }, /*#__PURE__*/React.createElement("div", {
18661
- className: "timeline-header-wrapper"
18662
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
18663
- className: "timeline-subheader"
18664
- }, t("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")), /*#__PURE__*/React.createElement("span", {
18665
- onClick: handleDownloadPDF,
18666
- className: "download-button"
18667
- }, t("CS_COMMON_DOWNLOAD"))), (timeline === null || timeline === void 0 ? void 0 : timeline.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
18668
- isCompleted: true,
18669
- label: t(timeline === null || timeline === void 0 ? void 0 : (_timeline$ = timeline[0]) === null || _timeline$ === void 0 ? void 0 : _timeline$.state),
18670
- customChild: /*#__PURE__*/React.createElement(TimelineCaption, {
18671
- checkpoint: timeline === null || timeline === void 0 ? void 0 : timeline[0],
18672
- t: t,
18673
- onDownloadPDF: handleDownloadPDF
18674
- })
18675
- }) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, timeline === null || timeline === void 0 ? void 0 : timeline.map(checkpoint => /*#__PURE__*/React.createElement(CheckPoint, {
18676
- key: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.id,
18677
- keyValue: checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.id,
18678
- isCompleted: (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.state) === currentState,
18679
- label: t(checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.state),
18680
- customChild: /*#__PURE__*/React.createElement(TimelineCaption, {
18681
- checkpoint: checkpoint,
18682
- t: t,
18683
- onDownloadPDF: handleDownloadPDF
18684
- })
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
+ })))))));
18685
18636
  }))));
18686
- };
18637
+ }
18687
18638
 
18688
18639
  const PTRWFApplicationTimeline = props => {
18689
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;
@@ -18876,7 +18827,7 @@ const PTRWFApplicationTimeline = props => {
18876
18827
  fetchWorkflowService();
18877
18828
  }
18878
18829
  }, [tenantId]);
18879
- 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, {
18880
18831
  workflowDetails: workflowDetails,
18881
18832
  t: t
18882
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, {
@@ -19440,7 +19391,19 @@ const PTRMyApplications = () => {
19440
19391
  color: "#333"
19441
19392
  }
19442
19393
  };
19443
- 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", {
19444
19407
  key: index
19445
19408
  }, /*#__PURE__*/React.createElement(PetApplication, {
19446
19409
  application: application,
@@ -19481,19 +19444,7 @@ const PTRMyApplications = () => {
19481
19444
  setLoadingPage(false);
19482
19445
  }, 500);
19483
19446
  }
19484
- }, "\u2192")), /*#__PURE__*/React.createElement("p", {
19485
- style: {
19486
- marginLeft: "16px",
19487
- marginTop: "16px"
19488
- }
19489
- }, t("PTR_TEXT_NOT_ABLE_TO_FIND_THE_APPLICATION"), " ", /*#__PURE__*/React.createElement("span", {
19490
- className: "link",
19491
- style: {
19492
- display: "block"
19493
- }
19494
- }, /*#__PURE__*/React.createElement(Link, {
19495
- to: "/digit-ui/citizen/ptr/petservice/new-application/info"
19496
- }, t("PTR_COMMON_CLICK_HERE_TO_REGISTER_NEW_PET")))));
19447
+ }, "\u2192")));
19497
19448
  };
19498
19449
 
19499
19450
  const PDFSvg$2 = ({
@@ -25232,60 +25183,59 @@ const StepWrapper = ({
25232
25183
  const {
25233
25184
  t
25234
25185
  } = useTranslation();
25235
- const stepStyle = isActive => ({
25186
+ const stepStyle = (isActive, isLast) => ({
25236
25187
  display: "flex",
25237
25188
  alignItems: "center",
25238
25189
  justifyContent: "flex-end",
25239
- flex: 1,
25240
- color: isActive ? "#3f51b5" : "#ccc",
25241
- padding: "10px 10px",
25242
- width: "260px"
25190
+ flex: "0 0 auto",
25191
+ color: isActive ? "#0D43A7" : "#9CA3AF",
25192
+ padding: "14px 12px",
25193
+ width: "260px",
25194
+ marginBottom: isLast ? "6px" : "18px"
25243
25195
  });
25244
25196
  const circleStyle = stepNumber => {
25245
- let backgroundColor;
25246
- if (stepNumber <= _currentStep) {
25247
- backgroundColor = "#0D43A7";
25248
- } else {
25249
- backgroundColor = "#FFFFFF";
25250
- }
25197
+ const completed = stepNumber <= _currentStep;
25251
25198
  return {
25252
- width: "60px",
25253
- height: "60px",
25199
+ width: "56px",
25200
+ height: "56px",
25254
25201
  borderRadius: "50%",
25255
- backgroundColor,
25256
- color: stepNumber <= _currentStep ? "white" : "black",
25202
+ background: completed ? "linear-gradient(135deg,#2563eb,#7c3aed)" : "#ffffff",
25203
+ color: completed ? "#ffffff" : "#0f172a",
25257
25204
  display: "flex",
25258
25205
  alignItems: "center",
25259
25206
  justifyContent: "center",
25260
- marginBottom: "10px",
25261
- fontWeight: "normal",
25207
+ marginBottom: "8px",
25208
+ fontWeight: 600,
25262
25209
  fontSize: "18px",
25263
- 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)",
25264
25212
  position: "relative"
25265
25213
  };
25266
25214
  };
25267
25215
  const labelStyle = {
25268
- fontSize: "18px",
25269
- color: "#1E1E1E",
25270
- fontWeight: "500",
25271
- fontFamily: "Noto Sans,sans-serif",
25272
- marginRight: "6px"
25216
+ fontSize: "16px",
25217
+ color: "#0f172a",
25218
+ fontWeight: 600,
25219
+ fontFamily: "Noto Sans, sans-serif",
25220
+ marginRight: "8px",
25221
+ textAlign: "right"
25273
25222
  };
25274
25223
  const stepNumberStyle = {
25275
- fontSize: "18px",
25276
- color: "#263238",
25277
- fontWeight: "400",
25278
- fontFamily: "Noto Sans,sans-serif",
25279
- 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"
25280
25229
  };
25281
25230
  const lineStyle = {
25282
25231
  position: "absolute",
25283
- width: "2px",
25284
- height: "50px",
25285
- backgroundColor: "grey",
25232
+ width: "3px",
25233
+ height: "56px",
25234
+ backgroundColor: "rgba(15,23,42,0.06)",
25286
25235
  left: "50%",
25287
25236
  top: "100%",
25288
- transform: "translateX(-50%)"
25237
+ transform: "translateX(-50%)",
25238
+ borderRadius: "2px"
25289
25239
  };
25290
25240
  const isMobile = window.Digit.Utils.browser.isMobile();
25291
25241
  const totalSteps = _stepsList.length;
@@ -25295,22 +25245,25 @@ const StepWrapper = ({
25295
25245
  width: "100%",
25296
25246
  display: "flex",
25297
25247
  flexDirection: "row",
25298
- alignItems: "top",
25299
- justifyContent: "flex-start"
25248
+ alignItems: "flex-start",
25249
+ justifyContent: "flex-start",
25250
+ gap: "24px"
25300
25251
  }
25301
25252
  }, /*#__PURE__*/React.createElement("div", {
25302
25253
  className: "stepper-navigation-bar",
25303
25254
  style: {
25304
25255
  display: "flex",
25305
25256
  flexDirection: "column",
25306
- justifyContent: "space-between",
25307
- height: "50%",
25257
+ alignItems: "center",
25258
+ padding: "18px",
25259
+ minWidth: "120px",
25260
+ maxWidth: "320px",
25308
25261
  marginBottom: "20px"
25309
25262
  }
25310
25263
  }, [...Array(totalSteps)].map((_, index) => /*#__PURE__*/React.createElement("div", {
25311
25264
  className: "step-content",
25312
25265
  key: index,
25313
- style: stepStyle(index + 1 <= _currentStep)
25266
+ style: stepStyle(index + 1 <= _currentStep, index === totalSteps - 1)
25314
25267
  }, /*#__PURE__*/React.createElement("div", {
25315
25268
  className: "step-sub-content",
25316
25269
  style: {
@@ -25334,7 +25287,8 @@ const StepWrapper = ({
25334
25287
  className: "stepper-body",
25335
25288
  style: {
25336
25289
  width: "100%",
25337
- marginBottom: "20px"
25290
+ marginBottom: "20px",
25291
+ background: "transparent"
25338
25292
  }
25339
25293
  }, children));
25340
25294
  };
@@ -25541,9 +25495,7 @@ const NewPTRStepperForm = () => {
25541
25495
  });
25542
25496
  return () => unlisten();
25543
25497
  }, [history, dispatch]);
25544
- return /*#__PURE__*/React.createElement("div", {
25545
- className: "pageCard"
25546
- }, /*#__PURE__*/React.createElement(CardHeader, {
25498
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardHeader, {
25547
25499
  styles: {
25548
25500
  fontSize: "28px",
25549
25501
  fontWeight: "400",