@mseva/digit-ui-module-engagement 1.1.21 → 1.1.23

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,4 +1,4 @@
1
- import { SurveyIconSolid, PMBIconSolid, EventsIconSolid, DocumentIconSolid, EmployeeModuleCard, LabelFieldPair as LabelFieldPair$1, CardLabel as CardLabel$1, Dropdown, RemoveableTag, TextInput as TextInput$1, TextArea as TextArea$1, CardLabelError as CardLabelError$2, UploadFile, Loader, Header, FormComposer as FormComposer$1, Card as Card$1, CardText as CardText$1, ActionBar as ActionBar$1, SubmitBar as SubmitBar$1, Banner, Table, CloseSvg, Label, LinkLabel, EventCalendar, DocumentIcon, CheckBox, RefreshIcon, DateRange, DetailsCard, SearchAction, FilterAction, PopUp, PMBIcon, RadioButtons, DatePicker, Modal, CardSubHeader as CardSubHeader$1, PDFSvg, MultiUploadWrapper, CardHeader, CardSectionHeader as CardSectionHeader$1, StatusTable, Row, LinkButton as LinkButton$1, Close as Close$f, BreakLine as BreakLine$1, TelePhone, DisplayPhotos, Toast as Toast$1, InfoBannerIcon, CheckPoint, ConnectingCheckPoints, Menu, ButtonSelector, GenericFileIcon, PrivateRoute, LocationSearch, OnGroundEventCard, WhatsNewCard, CardCaption, SearchIconSvg, ViewsIcon, ExternalLinkIcon, DownloadImgIcon, AppContainer, PrevIcon, BackButton, MapMarker, Clock, FilterFormField, SearchField, EditIcon, InboxComposer, InfoIcon, DustbinIcon, MultiLink, BreadCrumb } from '@mseva/digit-ui-react-components';
1
+ import { SurveyIconSolid, PMBIconSolid, EventsIconSolid, DocumentIconSolid, EmployeeModuleCard, LabelFieldPair as LabelFieldPair$1, CardLabel as CardLabel$1, Dropdown, RemoveableTag, TextInput as TextInput$1, TextArea as TextArea$1, CardLabelError as CardLabelError$2, UploadFile, Loader, Header, FormComposer as FormComposer$1, Card as Card$1, CardText as CardText$1, ActionBar as ActionBar$1, SubmitBar as SubmitBar$1, Banner, Table, CloseSvg, Label, LinkLabel, EventCalendar, DocumentIcon, CheckBox, RefreshIcon, DateRange, DetailsCard, SearchAction, FilterAction, PopUp, PMBIcon, RadioButtons, DatePicker, Modal, CardSubHeader as CardSubHeader$1, PDFSvg, MultiUploadWrapper, CardHeader, CardSectionHeader as CardSectionHeader$1, StatusTable, Row, LinkButton as LinkButton$1, Close as Close$f, BreakLine as BreakLine$1, TelePhone, DisplayPhotos, Toast as Toast$1, InfoBannerIcon, CheckPoint, ConnectingCheckPoints, Menu, ButtonSelector, GenericFileIcon, PrivateRoute, LocationSearch, OnGroundEventCard, WhatsNewCard, CardCaption, SearchIconSvg, ViewsIcon, ExternalLinkIcon, DownloadImgIcon, AppContainer, PrevIcon, SearchField, BackButton, MapMarker, Clock, FilterFormField, EditIcon, InboxComposer, InfoIcon, DustbinIcon, MultiLink, BreadCrumb } from '@mseva/digit-ui-react-components';
2
2
  import React, { useEffect, useMemo, Fragment as Fragment$1, useState, useCallback, useRef, useReducer, forwardRef } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { useLocation, useHistory, useParams, Link, Switch, Redirect as Redirect$1, Route, useRouteMatch } from 'react-router-dom';
@@ -6667,8 +6667,8 @@ function getNative(object, key) {
6667
6667
  }
6668
6668
  var _getNative = getNative;
6669
6669
 
6670
- var Map$1 = _getNative(_root, 'Map');
6671
- var _Map = Map$1;
6670
+ var Map = _getNative(_root, 'Map');
6671
+ var _Map = Map;
6672
6672
 
6673
6673
  var nativeCreate = _getNative(Object, 'create');
6674
6674
  var _nativeCreate = nativeCreate;
@@ -8562,818 +8562,6 @@ const ActionModal$b = props => {
8562
8562
  }
8563
8563
  };
8564
8564
 
8565
- var bind = function bind(fn, thisArg) {
8566
- return function wrap() {
8567
- var args = new Array(arguments.length);
8568
- for (var i = 0; i < args.length; i++) {
8569
- args[i] = arguments[i];
8570
- }
8571
- return fn.apply(thisArg, args);
8572
- };
8573
- };
8574
-
8575
- var toString = Object.prototype.toString;
8576
- function isArray$1(val) {
8577
- return toString.call(val) === '[object Array]';
8578
- }
8579
- function isUndefined(val) {
8580
- return typeof val === 'undefined';
8581
- }
8582
- function isBuffer(val) {
8583
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
8584
- }
8585
- function isArrayBuffer(val) {
8586
- return toString.call(val) === '[object ArrayBuffer]';
8587
- }
8588
- function isFormData(val) {
8589
- return typeof FormData !== 'undefined' && val instanceof FormData;
8590
- }
8591
- function isArrayBufferView(val) {
8592
- var result;
8593
- if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
8594
- result = ArrayBuffer.isView(val);
8595
- } else {
8596
- result = val && val.buffer && val.buffer instanceof ArrayBuffer;
8597
- }
8598
- return result;
8599
- }
8600
- function isString(val) {
8601
- return typeof val === 'string';
8602
- }
8603
- function isNumber(val) {
8604
- return typeof val === 'number';
8605
- }
8606
- function isObject$1(val) {
8607
- return val !== null && typeof val === 'object';
8608
- }
8609
- function isPlainObject(val) {
8610
- if (toString.call(val) !== '[object Object]') {
8611
- return false;
8612
- }
8613
- var prototype = Object.getPrototypeOf(val);
8614
- return prototype === null || prototype === Object.prototype;
8615
- }
8616
- function isDate$1(val) {
8617
- return toString.call(val) === '[object Date]';
8618
- }
8619
- function isFile(val) {
8620
- return toString.call(val) === '[object File]';
8621
- }
8622
- function isBlob(val) {
8623
- return toString.call(val) === '[object Blob]';
8624
- }
8625
- function isFunction$1(val) {
8626
- return toString.call(val) === '[object Function]';
8627
- }
8628
- function isStream(val) {
8629
- return isObject$1(val) && isFunction$1(val.pipe);
8630
- }
8631
- function isURLSearchParams(val) {
8632
- return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
8633
- }
8634
- function trim(str) {
8635
- return str.replace(/^\s*/, '').replace(/\s*$/, '');
8636
- }
8637
- function isStandardBrowserEnv() {
8638
- if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) {
8639
- return false;
8640
- }
8641
- return typeof window !== 'undefined' && typeof document !== 'undefined';
8642
- }
8643
- function forEach(obj, fn) {
8644
- if (obj === null || typeof obj === 'undefined') {
8645
- return;
8646
- }
8647
- if (typeof obj !== 'object') {
8648
- obj = [obj];
8649
- }
8650
- if (isArray$1(obj)) {
8651
- for (var i = 0, l = obj.length; i < l; i++) {
8652
- fn.call(null, obj[i], i, obj);
8653
- }
8654
- } else {
8655
- for (var key in obj) {
8656
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
8657
- fn.call(null, obj[key], key, obj);
8658
- }
8659
- }
8660
- }
8661
- }
8662
- function merge() {
8663
- var result = {};
8664
- function assignValue(val, key) {
8665
- if (isPlainObject(result[key]) && isPlainObject(val)) {
8666
- result[key] = merge(result[key], val);
8667
- } else if (isPlainObject(val)) {
8668
- result[key] = merge({}, val);
8669
- } else if (isArray$1(val)) {
8670
- result[key] = val.slice();
8671
- } else {
8672
- result[key] = val;
8673
- }
8674
- }
8675
- for (var i = 0, l = arguments.length; i < l; i++) {
8676
- forEach(arguments[i], assignValue);
8677
- }
8678
- return result;
8679
- }
8680
- function extend(a, b, thisArg) {
8681
- forEach(b, function assignValue(val, key) {
8682
- if (thisArg && typeof val === 'function') {
8683
- a[key] = bind(val, thisArg);
8684
- } else {
8685
- a[key] = val;
8686
- }
8687
- });
8688
- return a;
8689
- }
8690
- function stripBOM(content) {
8691
- if (content.charCodeAt(0) === 0xFEFF) {
8692
- content = content.slice(1);
8693
- }
8694
- return content;
8695
- }
8696
- var utils = {
8697
- isArray: isArray$1,
8698
- isArrayBuffer: isArrayBuffer,
8699
- isBuffer: isBuffer,
8700
- isFormData: isFormData,
8701
- isArrayBufferView: isArrayBufferView,
8702
- isString: isString,
8703
- isNumber: isNumber,
8704
- isObject: isObject$1,
8705
- isPlainObject: isPlainObject,
8706
- isUndefined: isUndefined,
8707
- isDate: isDate$1,
8708
- isFile: isFile,
8709
- isBlob: isBlob,
8710
- isFunction: isFunction$1,
8711
- isStream: isStream,
8712
- isURLSearchParams: isURLSearchParams,
8713
- isStandardBrowserEnv: isStandardBrowserEnv,
8714
- forEach: forEach,
8715
- merge: merge,
8716
- extend: extend,
8717
- trim: trim,
8718
- stripBOM: stripBOM
8719
- };
8720
-
8721
- function encode(val) {
8722
- return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');
8723
- }
8724
- var buildURL = function buildURL(url, params, paramsSerializer) {
8725
- if (!params) {
8726
- return url;
8727
- }
8728
- var serializedParams;
8729
- if (paramsSerializer) {
8730
- serializedParams = paramsSerializer(params);
8731
- } else if (utils.isURLSearchParams(params)) {
8732
- serializedParams = params.toString();
8733
- } else {
8734
- var parts = [];
8735
- utils.forEach(params, function serialize(val, key) {
8736
- if (val === null || typeof val === 'undefined') {
8737
- return;
8738
- }
8739
- if (utils.isArray(val)) {
8740
- key = key + '[]';
8741
- } else {
8742
- val = [val];
8743
- }
8744
- utils.forEach(val, function parseValue(v) {
8745
- if (utils.isDate(v)) {
8746
- v = v.toISOString();
8747
- } else if (utils.isObject(v)) {
8748
- v = JSON.stringify(v);
8749
- }
8750
- parts.push(encode(key) + '=' + encode(v));
8751
- });
8752
- });
8753
- serializedParams = parts.join('&');
8754
- }
8755
- if (serializedParams) {
8756
- var hashmarkIndex = url.indexOf('#');
8757
- if (hashmarkIndex !== -1) {
8758
- url = url.slice(0, hashmarkIndex);
8759
- }
8760
- url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
8761
- }
8762
- return url;
8763
- };
8764
-
8765
- function InterceptorManager() {
8766
- this.handlers = [];
8767
- }
8768
- InterceptorManager.prototype.use = function use(fulfilled, rejected) {
8769
- this.handlers.push({
8770
- fulfilled: fulfilled,
8771
- rejected: rejected
8772
- });
8773
- return this.handlers.length - 1;
8774
- };
8775
- InterceptorManager.prototype.eject = function eject(id) {
8776
- if (this.handlers[id]) {
8777
- this.handlers[id] = null;
8778
- }
8779
- };
8780
- InterceptorManager.prototype.forEach = function forEach(fn) {
8781
- utils.forEach(this.handlers, function forEachHandler(h) {
8782
- if (h !== null) {
8783
- fn(h);
8784
- }
8785
- });
8786
- };
8787
- var InterceptorManager_1 = InterceptorManager;
8788
-
8789
- var transformData = function transformData(data, headers, fns) {
8790
- utils.forEach(fns, function transform(fn) {
8791
- data = fn(data, headers);
8792
- });
8793
- return data;
8794
- };
8795
-
8796
- var isCancel = function isCancel(value) {
8797
- return !!(value && value.__CANCEL__);
8798
- };
8799
-
8800
- var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {
8801
- utils.forEach(headers, function processHeader(value, name) {
8802
- if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
8803
- headers[normalizedName] = value;
8804
- delete headers[name];
8805
- }
8806
- });
8807
- };
8808
-
8809
- var enhanceError = function enhanceError(error, config, code, request, response) {
8810
- error.config = config;
8811
- if (code) {
8812
- error.code = code;
8813
- }
8814
- error.request = request;
8815
- error.response = response;
8816
- error.isAxiosError = true;
8817
- error.toJSON = function toJSON() {
8818
- return {
8819
- message: this.message,
8820
- name: this.name,
8821
- description: this.description,
8822
- number: this.number,
8823
- fileName: this.fileName,
8824
- lineNumber: this.lineNumber,
8825
- columnNumber: this.columnNumber,
8826
- stack: this.stack,
8827
- config: this.config,
8828
- code: this.code
8829
- };
8830
- };
8831
- return error;
8832
- };
8833
-
8834
- var createError = function createError(message, config, code, request, response) {
8835
- var error = new Error(message);
8836
- return enhanceError(error, config, code, request, response);
8837
- };
8838
-
8839
- var settle = function settle(resolve, reject, response) {
8840
- var validateStatus = response.config.validateStatus;
8841
- if (!response.status || !validateStatus || validateStatus(response.status)) {
8842
- resolve(response);
8843
- } else {
8844
- reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));
8845
- }
8846
- };
8847
-
8848
- var cookies = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
8849
- return {
8850
- write: function write(name, value, expires, path, domain, secure) {
8851
- var cookie = [];
8852
- cookie.push(name + '=' + encodeURIComponent(value));
8853
- if (utils.isNumber(expires)) {
8854
- cookie.push('expires=' + new Date(expires).toGMTString());
8855
- }
8856
- if (utils.isString(path)) {
8857
- cookie.push('path=' + path);
8858
- }
8859
- if (utils.isString(domain)) {
8860
- cookie.push('domain=' + domain);
8861
- }
8862
- if (secure === true) {
8863
- cookie.push('secure');
8864
- }
8865
- document.cookie = cookie.join('; ');
8866
- },
8867
- read: function read(name) {
8868
- var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
8869
- return match ? decodeURIComponent(match[3]) : null;
8870
- },
8871
- remove: function remove(name) {
8872
- this.write(name, '', Date.now() - 86400000);
8873
- }
8874
- };
8875
- }() : function nonStandardBrowserEnv() {
8876
- return {
8877
- write: function write() {},
8878
- read: function read() {
8879
- return null;
8880
- },
8881
- remove: function remove() {}
8882
- };
8883
- }();
8884
-
8885
- var isAbsoluteURL = function isAbsoluteURL(url) {
8886
- return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
8887
- };
8888
-
8889
- var combineURLs = function combineURLs(baseURL, relativeURL) {
8890
- return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
8891
- };
8892
-
8893
- var buildFullPath = function buildFullPath(baseURL, requestedURL) {
8894
- if (baseURL && !isAbsoluteURL(requestedURL)) {
8895
- return combineURLs(baseURL, requestedURL);
8896
- }
8897
- return requestedURL;
8898
- };
8899
-
8900
- var ignoreDuplicateOf = ['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent'];
8901
- var parseHeaders = function parseHeaders(headers) {
8902
- var parsed = {};
8903
- var key;
8904
- var val;
8905
- var i;
8906
- if (!headers) {
8907
- return parsed;
8908
- }
8909
- utils.forEach(headers.split('\n'), function parser(line) {
8910
- i = line.indexOf(':');
8911
- key = utils.trim(line.substr(0, i)).toLowerCase();
8912
- val = utils.trim(line.substr(i + 1));
8913
- if (key) {
8914
- if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
8915
- return;
8916
- }
8917
- if (key === 'set-cookie') {
8918
- parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
8919
- } else {
8920
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
8921
- }
8922
- }
8923
- });
8924
- return parsed;
8925
- };
8926
-
8927
- var isURLSameOrigin = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
8928
- var msie = /(msie|trident)/i.test(navigator.userAgent);
8929
- var urlParsingNode = document.createElement('a');
8930
- var originURL;
8931
- function resolveURL(url) {
8932
- var href = url;
8933
- if (msie) {
8934
- urlParsingNode.setAttribute('href', href);
8935
- href = urlParsingNode.href;
8936
- }
8937
- urlParsingNode.setAttribute('href', href);
8938
- return {
8939
- href: urlParsingNode.href,
8940
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
8941
- host: urlParsingNode.host,
8942
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
8943
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
8944
- hostname: urlParsingNode.hostname,
8945
- port: urlParsingNode.port,
8946
- pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname
8947
- };
8948
- }
8949
- originURL = resolveURL(window.location.href);
8950
- return function isURLSameOrigin(requestURL) {
8951
- var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;
8952
- return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
8953
- };
8954
- }() : function nonStandardBrowserEnv() {
8955
- return function isURLSameOrigin() {
8956
- return true;
8957
- };
8958
- }();
8959
-
8960
- var xhr = function xhrAdapter(config) {
8961
- return new Promise(function dispatchXhrRequest(resolve, reject) {
8962
- var requestData = config.data;
8963
- var requestHeaders = config.headers;
8964
- if (utils.isFormData(requestData)) {
8965
- delete requestHeaders['Content-Type'];
8966
- }
8967
- var request = new XMLHttpRequest();
8968
- if (config.auth) {
8969
- var username = config.auth.username || '';
8970
- var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
8971
- requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
8972
- }
8973
- var fullPath = buildFullPath(config.baseURL, config.url);
8974
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
8975
- request.timeout = config.timeout;
8976
- request.onreadystatechange = function handleLoad() {
8977
- if (!request || request.readyState !== 4) {
8978
- return;
8979
- }
8980
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
8981
- return;
8982
- }
8983
- var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
8984
- var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
8985
- var response = {
8986
- data: responseData,
8987
- status: request.status,
8988
- statusText: request.statusText,
8989
- headers: responseHeaders,
8990
- config: config,
8991
- request: request
8992
- };
8993
- settle(resolve, reject, response);
8994
- request = null;
8995
- };
8996
- request.onabort = function handleAbort() {
8997
- if (!request) {
8998
- return;
8999
- }
9000
- reject(createError('Request aborted', config, 'ECONNABORTED', request));
9001
- request = null;
9002
- };
9003
- request.onerror = function handleError() {
9004
- reject(createError('Network Error', config, null, request));
9005
- request = null;
9006
- };
9007
- request.ontimeout = function handleTimeout() {
9008
- var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
9009
- if (config.timeoutErrorMessage) {
9010
- timeoutErrorMessage = config.timeoutErrorMessage;
9011
- }
9012
- reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', request));
9013
- request = null;
9014
- };
9015
- if (utils.isStandardBrowserEnv()) {
9016
- var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined;
9017
- if (xsrfValue) {
9018
- requestHeaders[config.xsrfHeaderName] = xsrfValue;
9019
- }
9020
- }
9021
- if ('setRequestHeader' in request) {
9022
- utils.forEach(requestHeaders, function setRequestHeader(val, key) {
9023
- if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
9024
- delete requestHeaders[key];
9025
- } else {
9026
- request.setRequestHeader(key, val);
9027
- }
9028
- });
9029
- }
9030
- if (!utils.isUndefined(config.withCredentials)) {
9031
- request.withCredentials = !!config.withCredentials;
9032
- }
9033
- if (config.responseType) {
9034
- try {
9035
- request.responseType = config.responseType;
9036
- } catch (e) {
9037
- if (config.responseType !== 'json') {
9038
- throw e;
9039
- }
9040
- }
9041
- }
9042
- if (typeof config.onDownloadProgress === 'function') {
9043
- request.addEventListener('progress', config.onDownloadProgress);
9044
- }
9045
- if (typeof config.onUploadProgress === 'function' && request.upload) {
9046
- request.upload.addEventListener('progress', config.onUploadProgress);
9047
- }
9048
- if (config.cancelToken) {
9049
- config.cancelToken.promise.then(function onCanceled(cancel) {
9050
- if (!request) {
9051
- return;
9052
- }
9053
- request.abort();
9054
- reject(cancel);
9055
- request = null;
9056
- });
9057
- }
9058
- if (!requestData) {
9059
- requestData = null;
9060
- }
9061
- request.send(requestData);
9062
- });
9063
- };
9064
-
9065
- var DEFAULT_CONTENT_TYPE = {
9066
- 'Content-Type': 'application/x-www-form-urlencoded'
9067
- };
9068
- function setContentTypeIfUnset(headers, value) {
9069
- if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
9070
- headers['Content-Type'] = value;
9071
- }
9072
- }
9073
- function getDefaultAdapter() {
9074
- var adapter;
9075
- if (typeof XMLHttpRequest !== 'undefined') {
9076
- adapter = xhr;
9077
- } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
9078
- adapter = xhr;
9079
- }
9080
- return adapter;
9081
- }
9082
- var defaults = {
9083
- adapter: getDefaultAdapter(),
9084
- transformRequest: [function transformRequest(data, headers) {
9085
- normalizeHeaderName(headers, 'Accept');
9086
- normalizeHeaderName(headers, 'Content-Type');
9087
- if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
9088
- return data;
9089
- }
9090
- if (utils.isArrayBufferView(data)) {
9091
- return data.buffer;
9092
- }
9093
- if (utils.isURLSearchParams(data)) {
9094
- setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
9095
- return data.toString();
9096
- }
9097
- if (utils.isObject(data)) {
9098
- setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
9099
- return JSON.stringify(data);
9100
- }
9101
- return data;
9102
- }],
9103
- transformResponse: [function transformResponse(data) {
9104
- if (typeof data === 'string') {
9105
- try {
9106
- data = JSON.parse(data);
9107
- } catch (e) {}
9108
- }
9109
- return data;
9110
- }],
9111
- timeout: 0,
9112
- xsrfCookieName: 'XSRF-TOKEN',
9113
- xsrfHeaderName: 'X-XSRF-TOKEN',
9114
- maxContentLength: -1,
9115
- maxBodyLength: -1,
9116
- validateStatus: function validateStatus(status) {
9117
- return status >= 200 && status < 300;
9118
- }
9119
- };
9120
- defaults.headers = {
9121
- common: {
9122
- 'Accept': 'application/json, text/plain, */*'
9123
- }
9124
- };
9125
- utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
9126
- defaults.headers[method] = {};
9127
- });
9128
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
9129
- defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
9130
- });
9131
- var defaults_1 = defaults;
9132
-
9133
- function throwIfCancellationRequested(config) {
9134
- if (config.cancelToken) {
9135
- config.cancelToken.throwIfRequested();
9136
- }
9137
- }
9138
- var dispatchRequest = function dispatchRequest(config) {
9139
- throwIfCancellationRequested(config);
9140
- config.headers = config.headers || {};
9141
- config.data = transformData(config.data, config.headers, config.transformRequest);
9142
- config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
9143
- utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) {
9144
- delete config.headers[method];
9145
- });
9146
- var adapter = config.adapter || defaults_1.adapter;
9147
- return adapter(config).then(function onAdapterResolution(response) {
9148
- throwIfCancellationRequested(config);
9149
- response.data = transformData(response.data, response.headers, config.transformResponse);
9150
- return response;
9151
- }, function onAdapterRejection(reason) {
9152
- if (!isCancel(reason)) {
9153
- throwIfCancellationRequested(config);
9154
- if (reason && reason.response) {
9155
- reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse);
9156
- }
9157
- }
9158
- return Promise.reject(reason);
9159
- });
9160
- };
9161
-
9162
- var mergeConfig = function mergeConfig(config1, config2) {
9163
- config2 = config2 || {};
9164
- var config = {};
9165
- var valueFromConfig2Keys = ['url', 'method', 'data'];
9166
- var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
9167
- var defaultToConfig2Keys = ['baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress', 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent', 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'];
9168
- var directMergeKeys = ['validateStatus'];
9169
- function getMergedValue(target, source) {
9170
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
9171
- return utils.merge(target, source);
9172
- } else if (utils.isPlainObject(source)) {
9173
- return utils.merge({}, source);
9174
- } else if (utils.isArray(source)) {
9175
- return source.slice();
9176
- }
9177
- return source;
9178
- }
9179
- function mergeDeepProperties(prop) {
9180
- if (!utils.isUndefined(config2[prop])) {
9181
- config[prop] = getMergedValue(config1[prop], config2[prop]);
9182
- } else if (!utils.isUndefined(config1[prop])) {
9183
- config[prop] = getMergedValue(undefined, config1[prop]);
9184
- }
9185
- }
9186
- utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
9187
- if (!utils.isUndefined(config2[prop])) {
9188
- config[prop] = getMergedValue(undefined, config2[prop]);
9189
- }
9190
- });
9191
- utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
9192
- utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
9193
- if (!utils.isUndefined(config2[prop])) {
9194
- config[prop] = getMergedValue(undefined, config2[prop]);
9195
- } else if (!utils.isUndefined(config1[prop])) {
9196
- config[prop] = getMergedValue(undefined, config1[prop]);
9197
- }
9198
- });
9199
- utils.forEach(directMergeKeys, function merge(prop) {
9200
- if (prop in config2) {
9201
- config[prop] = getMergedValue(config1[prop], config2[prop]);
9202
- } else if (prop in config1) {
9203
- config[prop] = getMergedValue(undefined, config1[prop]);
9204
- }
9205
- });
9206
- var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);
9207
- var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key) {
9208
- return axiosKeys.indexOf(key) === -1;
9209
- });
9210
- utils.forEach(otherKeys, mergeDeepProperties);
9211
- return config;
9212
- };
9213
-
9214
- function Axios(instanceConfig) {
9215
- this.defaults = instanceConfig;
9216
- this.interceptors = {
9217
- request: new InterceptorManager_1(),
9218
- response: new InterceptorManager_1()
9219
- };
9220
- }
9221
- Axios.prototype.request = function request(config) {
9222
- if (typeof config === 'string') {
9223
- config = arguments[1] || {};
9224
- config.url = arguments[0];
9225
- } else {
9226
- config = config || {};
9227
- }
9228
- config = mergeConfig(this.defaults, config);
9229
- if (config.method) {
9230
- config.method = config.method.toLowerCase();
9231
- } else if (this.defaults.method) {
9232
- config.method = this.defaults.method.toLowerCase();
9233
- } else {
9234
- config.method = 'get';
9235
- }
9236
- var chain = [dispatchRequest, undefined];
9237
- var promise = Promise.resolve(config);
9238
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
9239
- chain.unshift(interceptor.fulfilled, interceptor.rejected);
9240
- });
9241
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
9242
- chain.push(interceptor.fulfilled, interceptor.rejected);
9243
- });
9244
- while (chain.length) {
9245
- promise = promise.then(chain.shift(), chain.shift());
9246
- }
9247
- return promise;
9248
- };
9249
- Axios.prototype.getUri = function getUri(config) {
9250
- config = mergeConfig(this.defaults, config);
9251
- return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
9252
- };
9253
- utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
9254
- Axios.prototype[method] = function (url, config) {
9255
- return this.request(mergeConfig(config || {}, {
9256
- method: method,
9257
- url: url,
9258
- data: (config || {}).data
9259
- }));
9260
- };
9261
- });
9262
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
9263
- Axios.prototype[method] = function (url, data, config) {
9264
- return this.request(mergeConfig(config || {}, {
9265
- method: method,
9266
- url: url,
9267
- data: data
9268
- }));
9269
- };
9270
- });
9271
- var Axios_1 = Axios;
9272
-
9273
- function Cancel(message) {
9274
- this.message = message;
9275
- }
9276
- Cancel.prototype.toString = function toString() {
9277
- return 'Cancel' + (this.message ? ': ' + this.message : '');
9278
- };
9279
- Cancel.prototype.__CANCEL__ = true;
9280
- var Cancel_1 = Cancel;
9281
-
9282
- function CancelToken(executor) {
9283
- if (typeof executor !== 'function') {
9284
- throw new TypeError('executor must be a function.');
9285
- }
9286
- var resolvePromise;
9287
- this.promise = new Promise(function promiseExecutor(resolve) {
9288
- resolvePromise = resolve;
9289
- });
9290
- var token = this;
9291
- executor(function cancel(message) {
9292
- if (token.reason) {
9293
- return;
9294
- }
9295
- token.reason = new Cancel_1(message);
9296
- resolvePromise(token.reason);
9297
- });
9298
- }
9299
- CancelToken.prototype.throwIfRequested = function throwIfRequested() {
9300
- if (this.reason) {
9301
- throw this.reason;
9302
- }
9303
- };
9304
- CancelToken.source = function source() {
9305
- var cancel;
9306
- var token = new CancelToken(function executor(c) {
9307
- cancel = c;
9308
- });
9309
- return {
9310
- token: token,
9311
- cancel: cancel
9312
- };
9313
- };
9314
- var CancelToken_1 = CancelToken;
9315
-
9316
- var spread = function spread(callback) {
9317
- return function wrap(arr) {
9318
- return callback.apply(null, arr);
9319
- };
9320
- };
9321
-
9322
- var isAxiosError = function isAxiosError(payload) {
9323
- return typeof payload === 'object' && payload.isAxiosError === true;
9324
- };
9325
-
9326
- function createInstance(defaultConfig) {
9327
- var context = new Axios_1(defaultConfig);
9328
- var instance = bind(Axios_1.prototype.request, context);
9329
- utils.extend(instance, Axios_1.prototype, context);
9330
- utils.extend(instance, context);
9331
- return instance;
9332
- }
9333
- var axios = createInstance(defaults_1);
9334
- axios.Axios = Axios_1;
9335
- axios.create = function create(instanceConfig) {
9336
- return createInstance(mergeConfig(axios.defaults, instanceConfig));
9337
- };
9338
- axios.Cancel = Cancel_1;
9339
- axios.CancelToken = CancelToken_1;
9340
- axios.isCancel = isCancel;
9341
- axios.all = function all(promises) {
9342
- return Promise.all(promises);
9343
- };
9344
- axios.spread = spread;
9345
- axios.isAxiosError = isAxiosError;
9346
- var axios_1 = axios;
9347
- var _default = axios;
9348
- axios_1.default = _default;
9349
-
9350
- var axios$1 = axios_1;
9351
-
9352
- axios$1.interceptors.response.use(res => res, err => {
9353
- var _err$response, _err$response$data;
9354
- const isEmployee = window.location.pathname.split("/").includes("employee");
9355
- if (err !== null && err !== void 0 && (_err$response = err.response) !== null && _err$response !== void 0 && (_err$response$data = _err$response.data) !== null && _err$response$data !== void 0 && _err$response$data.Errors) {
9356
- for (const error of err.response.data.Errors) {
9357
- var _error$message, _error$message$toLowe, _error$message2, _error$message2$toLow;
9358
- if (error.message.includes("InvalidAccessTokenException")) {
9359
- localStorage.clear();
9360
- sessionStorage.clear();
9361
- window.location.href = (isEmployee ? "/digit-ui/employee/user/login" : "/digit-ui/citizen/login") + `?from=${encodeURIComponent(window.location.pathname + window.location.search)}`;
9362
- } else if (error !== null && error !== void 0 && (_error$message = error.message) !== null && _error$message !== void 0 && (_error$message$toLowe = _error$message.toLowerCase()) !== null && _error$message$toLowe !== void 0 && _error$message$toLowe.includes("internal server error") || error !== null && error !== void 0 && (_error$message2 = error.message) !== null && _error$message2 !== void 0 && (_error$message2$toLow = _error$message2.toLowerCase()) !== null && _error$message2$toLow !== void 0 && _error$message2$toLow.includes("some error occured")) {
9363
- window.location.href = (isEmployee ? "/digit-ui/employee/user/error" : "/digit-ui/citizen/error") + `?type=maintenance&from=${encodeURIComponent(window.location.pathname + window.location.search)}`;
9364
- } else if (error.message.includes("ZuulRuntimeException")) {
9365
- window.location.href = (isEmployee ? "/digit-ui/employee/user/error" : "/digit-ui/citizen/error") + `?type=notfound&from=${encodeURIComponent(window.location.pathname + window.location.search)}`;
9366
- }
9367
- }
9368
- }
9369
- throw err;
9370
- });
9371
- window.Digit = window.Digit || {};
9372
- window.Digit = {
9373
- ...window.Digit,
9374
- RequestCache: window.Digit.RequestCache || {}
9375
- };
9376
-
9377
8565
  var lodash = createCommonjsModule(function (module, exports) {
9378
8566
  (function () {
9379
8567
  var undefined$1;
@@ -17964,421 +17152,218 @@ const ViewBreakup = ({
17964
17152
  })))));
17965
17153
  };
17966
17154
 
17967
- const AssessmentHistory = ({
17968
- assessmentData,
17969
- applicationData
17155
+ const styles = {
17156
+ root: {
17157
+ width: "100%",
17158
+ marginTop: "2px",
17159
+ overflowX: "auto",
17160
+ boxShadow: "none"
17161
+ },
17162
+ table: {
17163
+ minWidth: 700,
17164
+ backgroundColor: "rgba(250, 250, 250, var(--bg-opacity))"
17165
+ },
17166
+ cell: {
17167
+ maxWidth: "7em",
17168
+ minWidth: "1em",
17169
+ border: "1px solid #e8e7e6",
17170
+ padding: "4px 5px",
17171
+ fontSize: "0.8em",
17172
+ textAlign: "left",
17173
+ lineHeight: "1.5em"
17174
+ },
17175
+ cellHeader: {
17176
+ overflow: "hidden",
17177
+ textOverflow: "ellipsis"
17178
+ },
17179
+ cellLeft: {},
17180
+ cellRight: {}
17181
+ };
17182
+ const ArrearTable = ({
17183
+ className: _className = "table",
17184
+ headers: _headers = [],
17185
+ values: _values = [],
17186
+ arrears: _arrears = 0
17970
17187
  }) => {
17971
- const history = useHistory();
17972
17188
  const {
17973
17189
  t
17974
17190
  } = useTranslation();
17975
- const [isOpen, setIsOpen] = useState(false);
17976
- const toggleAccordion = () => {
17977
- setIsOpen(!isOpen);
17978
- };
17979
- function formatAssessmentDate(timestamp) {
17980
- const date = new Date(timestamp);
17981
- const options = {
17982
- day: '2-digit',
17983
- month: 'short',
17984
- year: 'numeric'
17985
- };
17986
- return date.toLocaleDateString('en-GB', options).replace(/ /g, '-');
17987
- }
17988
- return /*#__PURE__*/React.createElement("div", {
17989
- className: "accordion",
17990
- style: {
17991
- width: "100%",
17992
- margin: "auto",
17993
- fontFamily: "Roboto, sans-serif",
17994
- border: "1px solid #ccc",
17995
- borderRadius: "4px",
17996
- marginBottom: '10px'
17997
- }
17998
- }, /*#__PURE__*/React.createElement("div", {
17999
- className: "accordion-header",
18000
- style: {
18001
- backgroundColor: "#f0f0f0",
18002
- padding: "15px",
18003
- cursor: "pointer"
18004
- },
18005
- onClick: toggleAccordion
18006
- }, /*#__PURE__*/React.createElement("div", {
18007
- style: {
18008
- display: "flex",
18009
- justifyContent: "space-between",
18010
- alignItems: 'center'
18011
- }
18012
- }, /*#__PURE__*/React.createElement("h3", {
18013
- style: {
18014
- color: '#0d43a7',
18015
- fontFamily: 'Noto Sans,sans-serif',
18016
- fontSize: '24px',
18017
- fontWeight: '500'
18018
- }
18019
- }, "Assessment History"), /*#__PURE__*/React.createElement("span", {
18020
- style: {
18021
- fontSize: '1.2em'
18022
- }
18023
- }, isOpen ? "<" : ">"))), isOpen && /*#__PURE__*/React.createElement("div", {
18024
- className: "accordion-body",
18025
- style: {
18026
- padding: " 15px",
18027
- backgroundColor: "#fff"
18028
- }
18029
- }, assessmentData.length === 0 ? /*#__PURE__*/React.createElement("div", {
18030
- style: {
18031
- color: 'red',
18032
- fontSize: '16px'
18033
- }
18034
- }, "No Assessments found") : assessmentData.map((assessment, index) => /*#__PURE__*/React.createElement("div", {
18035
- key: index,
18036
- className: "assessment-item",
18037
- style: {
18038
- marginBottom: "15px"
18039
- }
18040
- }, /*#__PURE__*/React.createElement("div", {
18041
- className: "assessment-row",
18042
- style: {
18043
- display: "flex",
18044
- gap: "100px",
18045
- marginBottom: "8px"
18046
- }
18047
- }, /*#__PURE__*/React.createElement("span", {
18048
- style: {
18049
- fontWeight: "bold",
18050
- minWidth: '60px',
18051
- color: 'black'
18052
- }
18053
- }, "Assessment Date"), /*#__PURE__*/React.createElement("span", {
18054
- style: {
18055
- flex: '1',
18056
- color: 'black'
18057
- }
18058
- }, formatAssessmentDate(assessment.assessmentDate))), /*#__PURE__*/React.createElement("div", {
18059
- className: "assessment-row",
18060
- style: {
18061
- display: "flex",
18062
- gap: "100px",
18063
- marginBottom: "8px",
18064
- color: 'black'
18065
- }
18066
- }, /*#__PURE__*/React.createElement("span", {
18067
- className: "label",
18068
- style: {
18069
- fontWeight: "bold",
18070
- minWidth: '60px',
18071
- color: 'black'
18072
- }
18073
- }, "Assessment Year"), /*#__PURE__*/React.createElement("span", {
18074
- className: "value",
18075
- style: {
18076
- flex: '1',
18077
- color: 'black'
18078
- }
18079
- }, assessment.financialYear)), /*#__PURE__*/React.createElement("div", {
18080
- className: "assessment-row with-buttons",
18081
- style: {
18082
- display: "flex",
18083
- marginBottom: "8px",
18084
- justifyContent: "space-between",
18085
- alignItems: "center"
18086
- }
18087
- }, /*#__PURE__*/React.createElement("div", {
18088
- style: {
18089
- display: 'flex',
18090
- gap: '75px'
18091
- }
18092
- }, /*#__PURE__*/React.createElement("span", {
18093
- className: "label",
18094
- style: {
18095
- fontWeight: "bold",
18096
- minWidth: '60px',
18097
- color: 'black'
18098
- }
18099
- }, "Assessment Number"), /*#__PURE__*/React.createElement("span", {
18100
- className: "value",
18101
- style: {
18102
- flex: '1',
18103
- color: 'black'
18104
- }
18105
- }, assessment.assessmentNumber)), /*#__PURE__*/React.createElement("div", {
18106
- className: "button-group",
18107
- style: {
18108
- display: 'flex',
18109
- gap: '10px'
18110
- }
18111
- }, "\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0 ", /*#__PURE__*/React.createElement("button", {
18112
- style: {
18113
- display: "flex",
18114
- borderRadius: '8px',
18115
- backgroundColor: '#2947a3',
18116
- padding: '10px',
18117
- color: 'white'
18118
- },
18119
- onClick: () => {
18120
- history.push({
18121
- pathname: `/digit-ui/citizen/pt/property/assessment-details/${assessment.assessmentNumber}`,
18122
- state: {
18123
- Assessment: {
18124
- channel: applicationData.channel,
18125
- financialYear: assessment.financialYear,
18126
- propertyId: assessment.propertyId,
18127
- source: applicationData.source
18128
- },
18129
- submitLabel: t("PT_REASSESS_PROPERTY_BUTTON"),
18130
- reAssess: true
18131
- }
18132
- });
18133
- }
18134
- }, "Re-assess"), "\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0 ", /*#__PURE__*/React.createElement("button", {
18135
- style: {
18136
- display: "flex",
18137
- borderRadius: '8px',
18138
- border: '1px solid red',
18139
- padding: '10px'
18140
- },
18141
- onClick: () => alert(`You are not allowed to perform this operation!!}`)
18142
- }, "Cancel"), "\xA0\xA0\xA0\xA0\xA0\xA0\xA0 ")), index !== assessmentData.length - 1 && /*#__PURE__*/React.createElement("hr", null)))));
18143
- };
18144
-
18145
- const ApplicationHistory = ({
18146
- applicationData
18147
- }) => {
18148
- var _applicationData$audi;
18149
- const [isOpen, setIsOpen] = useState(false);
18150
- const history = useHistory();
18151
- const toggleAccordion = () => {
18152
- setIsOpen(!isOpen);
18153
- };
18154
- function formatDate(timestamp) {
18155
- const date = new Date(timestamp);
18156
- const options = {
18157
- day: '2-digit',
18158
- month: 'short',
18159
- year: 'numeric'
18160
- };
18161
- return date.toLocaleDateString('en-GB', options).replace(/ /g, '-');
18162
- }
18163
- return /*#__PURE__*/React.createElement("div", {
18164
- className: "accordion",
18165
- style: {
18166
- width: "100%",
18167
- margin: "auto",
18168
- fontFamily: "Roboto, sans-serif",
18169
- border: "1px solid #ccc",
18170
- borderRadius: "4px",
18171
- marginBottom: '10px'
18172
- }
18173
- }, /*#__PURE__*/React.createElement("div", {
18174
- className: "accordion-header",
18175
- style: {
18176
- backgroundColor: "#f0f0f0",
18177
- padding: "15px",
18178
- cursor: "pointer"
18179
- },
18180
- onClick: toggleAccordion
18181
- }, /*#__PURE__*/React.createElement("div", {
18182
- style: {
18183
- display: "flex",
18184
- justifyContent: "space-between",
18185
- alignItems: 'center'
18186
- }
18187
- }, /*#__PURE__*/React.createElement("h3", {
18188
- style: {
18189
- color: '#0d43a7',
18190
- fontFamily: 'Noto Sans,sans-serif',
18191
- fontSize: '24px',
18192
- fontWeight: '500'
18193
- }
18194
- }, "Application History"), /*#__PURE__*/React.createElement("span", {
18195
- style: {
18196
- fontSize: '1.2em'
18197
- }
18198
- }, isOpen ? "<" : ">"))), isOpen && /*#__PURE__*/React.createElement("div", {
18199
- className: "accordion-body",
18200
- style: {
18201
- padding: " 15px",
18202
- backgroundColor: "#fff"
18203
- }
18204
- }, /*#__PURE__*/React.createElement("div", {
18205
- className: "assessment-item",
18206
- style: {
18207
- marginBottom: "15px"
18208
- }
18209
- }, /*#__PURE__*/React.createElement("div", {
18210
- className: "assessment-row",
18211
- style: {
18212
- display: "flex",
18213
- gap: "100px",
18214
- marginBottom: "8px"
18215
- }
18216
- }, /*#__PURE__*/React.createElement("span", {
18217
- style: {
18218
- fontWeight: "bold",
18219
- minWidth: '60px',
18220
- color: 'black'
18221
- }
18222
- }, "Application Number"), /*#__PURE__*/React.createElement("span", {
18223
- style: {
18224
- flex: '1',
18225
- color: 'black'
18226
- }
18227
- }, applicationData.acknowldgementNumber)), /*#__PURE__*/React.createElement("div", {
18228
- className: "assessment-row",
18229
- style: {
18230
- display: "flex",
18231
- gap: "132px",
18232
- marginBottom: "8px",
18233
- color: 'black'
18234
- }
18235
- }, /*#__PURE__*/React.createElement("span", {
18236
- className: "label",
18237
- style: {
18238
- fontWeight: "bold",
18239
- minWidth: '60px',
18240
- color: 'black'
18241
- }
18242
- }, "Property ID No."), /*#__PURE__*/React.createElement("span", {
18243
- className: "value",
18244
- style: {
18245
- flex: '1',
18246
- color: 'black'
18247
- }
18248
- }, applicationData.propertyId)), /*#__PURE__*/React.createElement("div", {
18249
- className: "assessment-row",
18250
- style: {
18251
- display: "flex",
18252
- gap: "120px",
18253
- marginBottom: "8px",
18254
- color: 'black'
18255
- }
18256
- }, /*#__PURE__*/React.createElement("span", {
18257
- className: "label",
18258
- style: {
18259
- fontWeight: "bold",
18260
- minWidth: '60px',
18261
- color: 'black'
18262
- }
18263
- }, "Application Type"), /*#__PURE__*/React.createElement("span", {
18264
- className: "value",
18265
- style: {
18266
- flex: '1',
18267
- color: 'black'
18268
- }
18269
- }, "NEW PROPERTY")), /*#__PURE__*/React.createElement("div", {
18270
- className: "assessment-row",
18271
- style: {
18272
- display: "flex",
18273
- gap: "140px",
18274
- marginBottom: "8px",
18275
- color: 'black'
18276
- }
18277
- }, /*#__PURE__*/React.createElement("span", {
18278
- className: "label",
18279
- style: {
18280
- fontWeight: "bold",
18281
- minWidth: '60px',
18282
- color: 'black'
18283
- }
18284
- }, "Creation Date"), /*#__PURE__*/React.createElement("span", {
18285
- className: "value",
18286
- style: {
18287
- flex: '1',
18288
- color: 'black'
18289
- }
18290
- }, formatDate((_applicationData$audi = applicationData.auditDetails) === null || _applicationData$audi === void 0 ? void 0 : _applicationData$audi.createdTime))), /*#__PURE__*/React.createElement("div", {
18291
- className: "assessment-row",
18292
- style: {
18293
- display: "flex",
18294
- gap: "180px",
18295
- marginBottom: "8px",
18296
- color: 'black'
18297
- }
18298
- }, /*#__PURE__*/React.createElement("span", {
18299
- className: "label",
18300
- style: {
18301
- fontWeight: "bold",
18302
- minWidth: '60px',
18303
- color: 'black'
18304
- }
18305
- }, "Status"), /*#__PURE__*/React.createElement("span", {
18306
- className: "value",
18307
- style: {
18308
- flex: '1',
18309
- color: 'black'
18310
- }
18311
- }, applicationData.status)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Link, {
18312
- to: {
18313
- pathname: `/digit-ui/citizen/pt/property/application-preview/${applicationData.acknowldgementNumber}`,
18314
- state: {
18315
- propertyId: applicationData.propertyId
18316
- }
18317
- },
18318
- style: {
18319
- color: '#2947a3',
18320
- display: 'inline',
18321
- border: '1px solid',
18322
- padding: '8px',
18323
- borderRadius: '8px'
18324
- }
18325
- }, "View History")))));
18326
- };
18327
-
18328
- const PaymentHistory = ({
18329
- payments
18330
- }) => {
18331
- const [isOpen, setIsOpen] = useState(false);
18332
- const toggleAccordion = () => {
18333
- setIsOpen(!isOpen);
18334
- };
18335
- return /*#__PURE__*/React.createElement("div", {
18336
- className: "accordion",
18337
- style: {
18338
- width: "100%",
18339
- margin: "auto",
18340
- fontFamily: "Roboto, sans-serif",
18341
- border: "1px solid #ccc",
18342
- borderRadius: "4px",
18343
- marginBottom: '10px'
18344
- }
18345
- }, /*#__PURE__*/React.createElement("div", {
18346
- className: "accordion-header",
18347
- style: {
18348
- backgroundColor: "#f0f0f0",
18349
- padding: "15px",
18350
- cursor: "pointer"
17191
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
17192
+ style: styles.root
17193
+ }, /*#__PURE__*/React.createElement("table", {
17194
+ className: "table-fixed-column-common-pay",
17195
+ style: styles.table
17196
+ }, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", {
17197
+ style: {
17198
+ ...styles.cell,
17199
+ ...styles.cellLeft,
17200
+ ...styles.cellHeader
17201
+ }
17202
+ }, t("CS_BILL_PERIOD")), _headers.map((header, ind) => {
17203
+ let styleRight = _headers.length == ind + 1 ? styles.cellRight : {};
17204
+ return /*#__PURE__*/React.createElement("th", {
17205
+ style: {
17206
+ ...styles.cell,
17207
+ ...styleRight,
17208
+ ...styles.cellHeader
17209
+ },
17210
+ key: ind
17211
+ }, t(header));
17212
+ }))), /*#__PURE__*/React.createElement("tbody", null, Object.values(_values).map((row, ind) => /*#__PURE__*/React.createElement("tr", {
17213
+ key: ind
17214
+ }, /*#__PURE__*/React.createElement("td", {
17215
+ style: {
17216
+ ...styles.cell,
17217
+ ...styles.cellLeft
18351
17218
  },
18352
- onClick: toggleAccordion
18353
- }, /*#__PURE__*/React.createElement("div", {
18354
- style: {
18355
- display: "flex",
18356
- justifyContent: "space-between",
18357
- alignItems: 'center'
18358
- }
18359
- }, /*#__PURE__*/React.createElement("h3", {
18360
- style: {
18361
- color: '#0d43a7',
18362
- fontFamily: 'Noto Sans,sans-serif',
18363
- fontSize: '24px',
18364
- fontWeight: '500'
18365
- }
18366
- }, "Payment History"), /*#__PURE__*/React.createElement("span", {
17219
+ component: "th",
17220
+ scope: "row"
17221
+ }, Object.keys(_values)[ind]), _headers.map((header, i) => {
17222
+ let styleRight = _headers.length == i + 1 ? styles.cellRight : {};
17223
+ return /*#__PURE__*/React.createElement("td", {
17224
+ style: {
17225
+ ...styles.cell,
17226
+ textAlign: "left",
17227
+ ...styleRight,
17228
+ whiteSpace: "pre"
17229
+ },
17230
+ key: i,
17231
+ numeric: true
17232
+ }, i > 1 && "₹", row[header] && row[header]["value"] || "0");
17233
+ }))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
18367
17234
  style: {
18368
- fontSize: '1.2em'
17235
+ ...styles.cell,
17236
+ ...styles.cellLeft
18369
17237
  }
18370
- }, isOpen ? "<" : ">"))), isOpen && /*#__PURE__*/React.createElement("div", {
18371
- className: "accordion-body",
18372
- style: {
18373
- padding: " 15px",
18374
- backgroundColor: "#fff"
17238
+ }), _headers.map((header, ind) => {
17239
+ if (ind == _headers.length - 1) {
17240
+ return /*#__PURE__*/React.createElement("td", {
17241
+ style: {
17242
+ ...styles.cell,
17243
+ ...styles.cellRight,
17244
+ textAlign: "left",
17245
+ fontWeight: "700",
17246
+ whiteSpace: "pre"
17247
+ },
17248
+ key: ind,
17249
+ numeric: true
17250
+ }, _arrears);
17251
+ } else if (ind == _headers.length - 2) {
17252
+ return /*#__PURE__*/React.createElement("td", {
17253
+ style: {
17254
+ ...styles.cell,
17255
+ textAlign: "left"
17256
+ },
17257
+ key: ind,
17258
+ numeric: true
17259
+ }, t("COMMON_ARREARS_TOTAL"));
17260
+ } else {
17261
+ return /*#__PURE__*/React.createElement("td", {
17262
+ style: styles.cell,
17263
+ key: ind,
17264
+ numeric: true
17265
+ });
18375
17266
  }
18376
- }, (payments === null || payments === void 0 ? void 0 : payments.length) === 0 && /*#__PURE__*/React.createElement("div", {
18377
- style: {
18378
- color: 'red',
18379
- fontSize: '16px'
17267
+ }))))));
17268
+ };
17269
+
17270
+ const styles$1 = {
17271
+ buttonStyle: {
17272
+ display: "flex",
17273
+ justifyContent: "flex-end",
17274
+ color: "#a82227"
17275
+ },
17276
+ headerStyle: {
17277
+ marginTop: "10px",
17278
+ fontSize: "16px",
17279
+ fontWeight: "700",
17280
+ lineHeight: "24px",
17281
+ color: " rgba(11, 12, 12, var(--text-opacity))"
17282
+ }
17283
+ };
17284
+ const ArrearSummary = ({
17285
+ bill: _bill = {}
17286
+ }) => {
17287
+ var _bill$billDetails, _sortedBillDetails, _arrears$toFixed;
17288
+ const {
17289
+ t
17290
+ } = useTranslation();
17291
+ const formatTaxHeaders = (billDetail = {}) => {
17292
+ let formattedFees = {};
17293
+ const {
17294
+ billAccountDetails = []
17295
+ } = billDetail;
17296
+ billAccountDetails.map(taxHead => {
17297
+ formattedFees[taxHead.taxHeadCode] = {
17298
+ value: taxHead.amount,
17299
+ order: taxHead.order
17300
+ };
17301
+ });
17302
+ formattedFees["CS_BILL_NO"] = {
17303
+ value: (billDetail === null || billDetail === void 0 ? void 0 : billDetail.billNumber) || "NA",
17304
+ order: -2
17305
+ };
17306
+ formattedFees["CS_BILL_DUEDATE"] = {
17307
+ value: (billDetail === null || billDetail === void 0 ? void 0 : billDetail.expiryDate) && new Date(billDetail === null || billDetail === void 0 ? void 0 : billDetail.expiryDate).toLocaleDateString() || "NA",
17308
+ order: -1
17309
+ };
17310
+ formattedFees["TL_COMMON_TOTAL_AMT"] = {
17311
+ value: billDetail.amount,
17312
+ order: 10
17313
+ };
17314
+ return formattedFees;
17315
+ };
17316
+ const getFinancialYears = (from, to) => {
17317
+ const fromDate = new Date(from);
17318
+ const toDate = new Date(to);
17319
+ if (toDate.getYear() - fromDate.getYear() != 0) {
17320
+ return `FY${fromDate.getYear() + 1900}-${toDate.getYear() - 100}`;
17321
+ }
17322
+ return `${fromDate.toLocaleDateString()}-${toDate.toLocaleDateString()}`;
17323
+ };
17324
+ let fees = {};
17325
+ let sortedBillDetails = (_bill === null || _bill === void 0 ? void 0 : (_bill$billDetails = _bill.billDetails) === null || _bill$billDetails === void 0 ? void 0 : _bill$billDetails.sort((a, b) => b.fromPeriod - a.fromPeriod)) || [];
17326
+ sortedBillDetails = [...sortedBillDetails];
17327
+ const arrears = ((_sortedBillDetails = sortedBillDetails) === null || _sortedBillDetails === void 0 ? void 0 : _sortedBillDetails.reduce((total, current, index) => total + current.amount, 0)) || 0;
17328
+ let arrearsAmount = `₹ ${(arrears === null || arrears === void 0 ? void 0 : (_arrears$toFixed = arrears.toFixed) === null || _arrears$toFixed === void 0 ? void 0 : _arrears$toFixed.call(arrears, 0)) || Number(0).toFixed(0)}`;
17329
+ sortedBillDetails.map(bill => {
17330
+ let fee = formatTaxHeaders(bill);
17331
+ fees[getFinancialYears(bill.fromPeriod, bill.toPeriod)] = fee;
17332
+ });
17333
+ let head = {};
17334
+ fees ? Object.keys(fees).map((key, ind) => {
17335
+ Object.keys(fees[key]).map(key1 => {
17336
+ head[key1] = fees[key] && fees[key][key1] && fees[key][key1].order || 0;
17337
+ });
17338
+ }) : "NA";
17339
+ let keys = [];
17340
+ keys = Object.keys(head);
17341
+ keys.sort((x, y) => head[x] - head[y]);
17342
+ const [showArrear, setShowArrear] = useState(false);
17343
+ if (arrears == 0 || arrears < 0) {
17344
+ return /*#__PURE__*/React.createElement("span", null);
17345
+ }
17346
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
17347
+ style: styles$1.headerStyle
17348
+ }, t("CS_ARREARS_DETAILS")), showArrear && /*#__PURE__*/React.createElement(ArrearTable, {
17349
+ headers: [...keys],
17350
+ values: fees,
17351
+ arrears: arrearsAmount
17352
+ }), !showArrear && /*#__PURE__*/React.createElement("div", {
17353
+ style: styles$1.buttonStyle
17354
+ }, /*#__PURE__*/React.createElement("button", {
17355
+ type: "button",
17356
+ onClick: () => {
17357
+ setShowArrear(true);
17358
+ }
17359
+ }, t("CS_SHOW_CARD"))), showArrear && /*#__PURE__*/React.createElement("div", {
17360
+ style: styles$1.buttonStyle
17361
+ }, /*#__PURE__*/React.createElement("button", {
17362
+ type: "button",
17363
+ onClick: () => {
17364
+ setShowArrear(false);
18380
17365
  }
18381
- }, "No Payemnts found")));
17366
+ }, t("CS_HIDE_CARD"))));
18382
17367
  };
18383
17368
 
18384
17369
  function ApplicationDetailsContent({
@@ -18395,77 +17380,19 @@ function ApplicationDetailsContent({
18395
17380
  statusAttribute = "status",
18396
17381
  paymentsList,
18397
17382
  oldValue,
18398
- isInfoLabel = false,
18399
- propertyId,
18400
- setIsCheck,
18401
- isCheck
17383
+ isInfoLabel = false
18402
17384
  }) {
18403
- var _FinancialYearData, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a5, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data19, _workflowDetails$data20, _FinancialYearData2;
17385
+ var _applicationDetails$a2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data19, _workflowDetails$data20;
18404
17386
  const {
18405
17387
  t
18406
17388
  } = useTranslation();
18407
- const history = useHistory();
18408
- const tenantId = Digit.ULBService.getCurrentTenantId();
18409
- const [showToast, setShowToast] = useState(null);
18410
- const [payments, setPayments] = useState([]);
18411
- const [showAccess, setShowAccess] = useState(false);
18412
- const [selectedYear, setSelectedYear] = useState();
18413
17389
  let isEditApplication = window.location.href.includes("editApplication") && window.location.href.includes("bpa");
18414
17390
  console.log("appl", applicationDetails);
18415
- let {
18416
- data: FinancialYearData
18417
- } = Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(), "egf-master", [{
18418
- name: "FinancialYear"
18419
- }], {
18420
- select: data => {
18421
- var _data$egfMaster;
18422
- const formattedData = data === null || data === void 0 ? void 0 : (_data$egfMaster = data["egf-master"]) === null || _data$egfMaster === void 0 ? void 0 : _data$egfMaster["FinancialYear"];
18423
- return formattedData;
18424
- }
18425
- });
18426
- if (((_FinancialYearData = FinancialYearData) === null || _FinancialYearData === void 0 ? void 0 : _FinancialYearData.length) > 0) {
18427
- FinancialYearData = FinancialYearData.filter((record, index, self) => index === self.findIndex(r => r.code === record.code));
18428
- FinancialYearData = FinancialYearData.sort((a, b) => b.endingDate - a.endingDate);
18429
- }
18430
- console.log("financial year", FinancialYearData);
18431
- const setModal = () => {
18432
- console.log("in Apply");
18433
- };
18434
- const closeModalTwo = () => {
18435
- setShowAccess(false);
18436
- };
18437
- const Heading = props => {
18438
- return /*#__PURE__*/React.createElement("h1", {
18439
- className: "heading-m"
18440
- }, props.label);
18441
- };
18442
- const Close = () => /*#__PURE__*/React.createElement("svg", {
18443
- xmlns: "http://www.w3.org/2000/svg",
18444
- viewBox: "0 0 24 24",
18445
- fill: "#FFFFFF"
18446
- }, /*#__PURE__*/React.createElement("path", {
18447
- d: "M0 0h24v24H0V0z",
18448
- fill: "none"
18449
- }), /*#__PURE__*/React.createElement("path", {
18450
- d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
18451
- }));
18452
- const CloseBtn = props => {
18453
- return /*#__PURE__*/React.createElement("div", {
18454
- className: "icon-bg-secondary",
18455
- onClick: props.onClick
18456
- }, /*#__PURE__*/React.createElement(Close, null));
18457
- };
18458
- const closeModal = e => {
18459
- console.log("in Print");
18460
- setShowAccess(false);
18461
- };
18462
17391
  function OpenImage(imageSource, index, thumbnailsToShow) {
18463
17392
  var _thumbnailsToShow$ful;
18464
17393
  window.open(thumbnailsToShow === null || thumbnailsToShow === void 0 ? void 0 : (_thumbnailsToShow$ful = thumbnailsToShow.fullImage) === null || _thumbnailsToShow$ful === void 0 ? void 0 : _thumbnailsToShow$ful[0], "_blank");
18465
17394
  }
18466
17395
  const [fetchBillData, updatefetchBillData] = useState({});
18467
- const [assessmentDetails, setAssessmentDetails] = useState();
18468
- const [filtered, setFiltered] = useState([]);
18469
17396
  const setBillData = async (tenantId, propertyIds, updatefetchBillData, updateCanFetchBillData) => {
18470
17397
  var _assessmentData$Asses;
18471
17398
  const assessmentData = await Digit.PTService.assessmentSearch({
@@ -18475,34 +17402,12 @@ function ApplicationDetailsContent({
18475
17402
  }
18476
17403
  });
18477
17404
  let billData = {};
18478
- console.log("assessment data", assessmentData);
18479
17405
  if ((assessmentData === null || assessmentData === void 0 ? void 0 : (_assessmentData$Asses = assessmentData.Assessments) === null || _assessmentData$Asses === void 0 ? void 0 : _assessmentData$Asses.length) > 0) {
18480
- const activeRecords = assessmentData.Assessments.filter(a => a.status === 'ACTIVE');
18481
- function normalizeDate(timestamp) {
18482
- const date = new Date(timestamp);
18483
- date.setHours(0, 0, 0, 0);
18484
- return date.getTime();
18485
- }
18486
- const latestMap = new Map();
18487
- activeRecords.forEach(record => {
18488
- const normalizedDate = normalizeDate(record.assessmentDate);
18489
- const key = `${normalizedDate}_${record.financialYear}`;
18490
- const existing = latestMap.get(key);
18491
- if (!existing || record.createdDate > existing.createdDate) {
18492
- latestMap.set(key, record);
18493
- }
18494
- });
18495
- console.log("grouped", latestMap);
18496
- const filteredAssessment = Array.from(latestMap.values());
18497
- setFiltered(filteredAssessment);
18498
- console.log(filteredAssessment);
18499
- setAssessmentDetails(assessmentData === null || assessmentData === void 0 ? void 0 : assessmentData.Assessments);
18500
17406
  billData = await Digit.PaymentService.fetchBill(tenantId, {
18501
17407
  businessService: "PT",
18502
17408
  consumerCode: propertyIds
18503
17409
  });
18504
17410
  }
18505
- console.log("bill Data", billData);
18506
17411
  updatefetchBillData(billData);
18507
17412
  updateCanFetchBillData({
18508
17413
  loading: false,
@@ -18510,13 +17415,11 @@ function ApplicationDetailsContent({
18510
17415
  canLoad: true
18511
17416
  });
18512
17417
  };
18513
- console.log("fetch bill data", fetchBillData);
18514
17418
  const [billData, updateCanFetchBillData] = useState({
18515
17419
  loading: false,
18516
17420
  loaded: false,
18517
17421
  canLoad: false
18518
17422
  });
18519
- console.log("filtered", filtered);
18520
17423
  if ((applicationData === null || applicationData === void 0 ? void 0 : applicationData.status) == "ACTIVE" && !billData.loading && !billData.loaded && !billData.canLoad) {
18521
17424
  updateCanFetchBillData({
18522
17425
  loading: false,
@@ -18650,6 +17553,23 @@ function ApplicationDetailsContent({
18650
17553
  return {};
18651
17554
  }
18652
17555
  };
17556
+ const tableStyles = {
17557
+ table: {
17558
+ border: '2px solid black',
17559
+ width: '100%',
17560
+ fontFamily: 'sans-serif'
17561
+ },
17562
+ td: {
17563
+ padding: "10px",
17564
+ border: '1px solid black',
17565
+ textAlign: 'center'
17566
+ },
17567
+ th: {
17568
+ padding: "10px",
17569
+ border: '1px solid black',
17570
+ textAlign: 'center'
17571
+ }
17572
+ };
18653
17573
  const getMainDivStyles = () => {
18654
17574
  if (window.location.href.includes("employee/obps") || window.location.href.includes("employee/noc") || window.location.href.includes("employee/ws")) {
18655
17575
  return {
@@ -18697,94 +17617,6 @@ function ApplicationDetailsContent({
18697
17617
  const totalBalanceTax = demandData === null || demandData === void 0 ? void 0 : demandData.reduce((sum, item) => sum + item.balanceTax, 0);
18698
17618
  const totalBalanceInterest = demandData === null || demandData === void 0 ? void 0 : demandData.reduce((sum, item) => sum + item.balanceInterest, 0);
18699
17619
  const totalBalancePenality = demandData === null || demandData === void 0 ? void 0 : demandData.reduce((sum, item) => sum + item.balancePenality, 0);
18700
- const closeToast = () => {
18701
- setShowToast(null);
18702
- };
18703
- const updatePropertyStatus = async (propertyData, status, propertyIds) => {
18704
- const confirm = window.confirm(`Are you sure you want to make this property ${status}?`);
18705
- if (!confirm) return;
18706
- const payload = {
18707
- ...propertyData,
18708
- status: status,
18709
- isactive: status === "ACTIVE",
18710
- isinactive: status === "INACTIVE",
18711
- creationReason: "STATUS",
18712
- additionalDetails: {
18713
- ...propertyData.additionalDetails,
18714
- propertytobestatus: status
18715
- },
18716
- workflow: {
18717
- ...propertyData.workflow,
18718
- businessService: "PT.CREATE",
18719
- action: "OPEN",
18720
- moduleName: "PT"
18721
- }
18722
- };
18723
- const response = await Digit.PTService.updatePT({
18724
- Property: {
18725
- ...payload
18726
- }
18727
- }, tenantId, propertyIds);
18728
- console.log("response from inactive/active", response);
18729
- };
18730
- const applicationData_pt = applicationDetails.applicationData;
18731
- const propertyIds = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a2 = applicationDetails.applicationData) === null || _applicationDetails$a2 === void 0 ? void 0 : _applicationDetails$a2.propertyId) || "";
18732
- const checkPropertyStatus = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a3 = applicationDetails.additionalDetails) === null || _applicationDetails$a3 === void 0 ? void 0 : _applicationDetails$a3.propertytobestatus;
18733
- const PropertyInActive = () => {
18734
- if (window.location.href.includes("/citizen")) {
18735
- alert("Action to Inactivate property is not allowed for citizen");
18736
- } else {
18737
- if (checkPropertyStatus == "ACTIVE") {
18738
- updatePropertyStatus(applicationData_pt, "INACTIVE", propertyIds);
18739
- } else {
18740
- alert("Property is already inactive.");
18741
- }
18742
- }
18743
- };
18744
- const PropertyActive = () => {
18745
- if (window.location.href.includes("/citizen")) {
18746
- alert("Action to activate property is not allowed for citizen");
18747
- } else {
18748
- if (checkPropertyStatus == "INACTIVE") {
18749
- updatePropertyStatus(applicationData_pt, "ACTIVE", propertyIds);
18750
- } else {
18751
- alert("Property is already active.");
18752
- }
18753
- }
18754
- };
18755
- const EditProperty = () => {
18756
- var _applicationDetails$a4;
18757
- const pID = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a4 = applicationDetails.applicationData) === null || _applicationDetails$a4 === void 0 ? void 0 : _applicationDetails$a4.propertyId;
18758
- if (pID) {
18759
- history.push({
18760
- pathname: `/digit-ui/employee/pt/edit-application/${pID}`
18761
- });
18762
- }
18763
- };
18764
- const AccessProperty = () => {
18765
- setShowAccess(true);
18766
- };
18767
- console.log("applicationDetails?.applicationDetails", applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationDetails);
18768
- console.log("infolabel", isInfoLabel);
18769
- console.log("assessment details", assessmentDetails);
18770
- useEffect(() => {
18771
- try {
18772
- let filters = {
18773
- consumerCodes: propertyId
18774
- };
18775
- const auth = true;
18776
- Digit.PTService.paymentsearch({
18777
- tenantId: tenantId,
18778
- filters: filters,
18779
- auth: auth
18780
- }).then(response => {
18781
- setPayments(response === null || response === void 0 ? void 0 : response.Payments);
18782
- console.log(response);
18783
- });
18784
- } catch (error) {
18785
- console.log(error);
18786
- }
18787
- }, []);
18788
17620
  return /*#__PURE__*/React.createElement(Card$1, {
18789
17621
  style: {
18790
17622
  position: "relative"
@@ -18797,8 +17629,8 @@ function ApplicationDetailsContent({
18797
17629
  infoClickLable: "WS_CLICK_ON_LABEL",
18798
17630
  infoClickInfoLabel: getClickInfoDetails(),
18799
17631
  infoClickInfoLabel1: getClickInfoDetails1()
18800
- }) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a5 = applicationDetails.applicationDetails) === null || _applicationDetails$a5 === void 0 ? void 0 : _applicationDetails$a5.map((detail, index) => {
18801
- var _detail$values, _detail$additionalDet, _applicationDetails$a6, _applicationDetails$a7, _applicationDetails$a8, _applicationDetails$a9, _detail$additionalDet2, _applicationDetails$a0, _applicationDetails$a1, _detail$additionalDet3, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$additionalDet0, _detail$additionalDet1, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _detail$additionalDet20, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27, _detail$additionalDet28, _detail$additionalDet29, _detail$additionalDet30, _detail$additionalDet31;
17632
+ }) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a2 = applicationDetails.applicationDetails) === null || _applicationDetails$a2 === void 0 ? void 0 : _applicationDetails$a2.map((detail, index) => {
17633
+ var _detail$values, _detail$additionalDet, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _applicationDetails$a6, _detail$additionalDet2, _applicationDetails$a7, _applicationDetails$a8, _detail$additionalDet3, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$additionalDet0, _detail$additionalDet1, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _detail$additionalDet20, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27, _detail$additionalDet28, _detail$additionalDet29;
18802
17634
  return /*#__PURE__*/React.createElement(React.Fragment, {
18803
17635
  key: index
18804
17636
  }, /*#__PURE__*/React.createElement("div", {
@@ -18855,7 +17687,7 @@ function ApplicationDetailsContent({
18855
17687
  })), /*#__PURE__*/React.createElement(StatusTable, {
18856
17688
  style: getTableStyles()
18857
17689
  }, (detail === null || detail === void 0 ? void 0 : detail.title) && !(detail !== null && detail !== void 0 && detail.title.includes("NOC")) && (detail === null || detail === void 0 ? void 0 : (_detail$values = detail.values) === null || _detail$values === void 0 ? void 0 : _detail$values.map((value, index) => {
18858
- var _detail$values3;
17690
+ var _detail$values3, _fetchBillData$Bill;
18859
17691
  if (value.map === true && value.value !== "N/A") {
18860
17692
  return /*#__PURE__*/React.createElement(Row, {
18861
17693
  labelStyle: {
@@ -18865,7 +17697,7 @@ function ApplicationDetailsContent({
18865
17697
  wordBreak: "break-all"
18866
17698
  },
18867
17699
  key: t(value.title),
18868
- label: value !== null && value !== void 0 && value.labelComp ? `<div>${t(value.title)} ${value === null || value === void 0 ? void 0 : value.labelComp}</div>` : "t(value.title)",
17700
+ label: t(value.title),
18869
17701
  text: /*#__PURE__*/React.createElement("img", {
18870
17702
  src: t(value.value),
18871
17703
  alt: "",
@@ -18936,14 +17768,16 @@ function ApplicationDetailsContent({
18936
17768
  textStyle: {
18937
17769
  wordBreak: "break-all"
18938
17770
  }
18939
- }));
17771
+ }), value.title === "PT_TOTAL_DUES" ? /*#__PURE__*/React.createElement(ArrearSummary, {
17772
+ bill: (_fetchBillData$Bill = fetchBillData.Bill) === null || _fetchBillData$Bill === void 0 ? void 0 : _fetchBillData$Bill[0]
17773
+ }) : "");
18940
17774
  })))), (detail === null || detail === void 0 ? void 0 : detail.belowComponent) && /*#__PURE__*/React.createElement(detail.belowComponent, null), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet = detail.additionalDetails) === null || _detail$additionalDet === void 0 ? void 0 : _detail$additionalDet.inspectionReport) && /*#__PURE__*/React.createElement(ScruntinyDetails, {
18941
17775
  scrutinyDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails,
18942
17776
  paymentsList: paymentsList,
18943
- additionalDetails: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a6 = applicationDetails.applicationData) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.additionalDetails,
17777
+ additionalDetails: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a3 = applicationDetails.applicationData) === null || _applicationDetails$a3 === void 0 ? void 0 : _applicationDetails$a3.additionalDetails,
18944
17778
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData
18945
- }), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a7 = applicationDetails.applicationData) === null || _applicationDetails$a7 === void 0 ? void 0 : (_applicationDetails$a8 = _applicationDetails$a7.additionalDetails) === null || _applicationDetails$a8 === void 0 ? void 0 : (_applicationDetails$a9 = _applicationDetails$a8.fieldinspection_pending) === null || _applicationDetails$a9 === void 0 ? void 0 : _applicationDetails$a9.length) > 0 && (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet2 = detail.additionalDetails) === null || _detail$additionalDet2 === void 0 ? void 0 : _detail$additionalDet2.fiReport) && /*#__PURE__*/React.createElement(InspectionReport, {
18946
- fiReport: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a0 = applicationDetails.applicationData) === null || _applicationDetails$a0 === void 0 ? void 0 : (_applicationDetails$a1 = _applicationDetails$a0.additionalDetails) === null || _applicationDetails$a1 === void 0 ? void 0 : _applicationDetails$a1.fieldinspection_pending
17779
+ }), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a4 = applicationDetails.applicationData) === null || _applicationDetails$a4 === void 0 ? void 0 : (_applicationDetails$a5 = _applicationDetails$a4.additionalDetails) === null || _applicationDetails$a5 === void 0 ? void 0 : (_applicationDetails$a6 = _applicationDetails$a5.fieldinspection_pending) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.length) > 0 && (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet2 = detail.additionalDetails) === null || _detail$additionalDet2 === void 0 ? void 0 : _detail$additionalDet2.fiReport) && /*#__PURE__*/React.createElement(InspectionReport, {
17780
+ fiReport: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a7 = applicationDetails.applicationData) === null || _applicationDetails$a7 === void 0 ? void 0 : (_applicationDetails$a8 = _applicationDetails$a7.additionalDetails) === null || _applicationDetails$a8 === void 0 ? void 0 : _applicationDetails$a8.fieldinspection_pending
18947
17781
  }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet3 = detail.additionalDetails) === null || _detail$additionalDet3 === void 0 ? void 0 : _detail$additionalDet3.floors) && /*#__PURE__*/React.createElement(PropertyFloors, {
18948
17782
  floors: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet4 = detail.additionalDetails) === null || _detail$additionalDet4 === void 0 ? void 0 : _detail$additionalDet4.floors
18949
17783
  }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet5 = detail.additionalDetails) === null || _detail$additionalDet5 === void 0 ? void 0 : _detail$additionalDet5.owners) && /*#__PURE__*/React.createElement(PropertyOwners, {
@@ -18982,12 +17816,14 @@ function ApplicationDetailsContent({
18982
17816
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData
18983
17817
  }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.documentsWithUrl) && /*#__PURE__*/React.createElement(DocumentsPreview, {
18984
17818
  documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documentsWithUrl
18985
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.taxHeadEstimatesCalculation) && /*#__PURE__*/React.createElement(PropertyEstimates, {
18986
- taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.taxHeadEstimatesCalculation
17819
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents) && /*#__PURE__*/React.createElement(PropertyDocuments, {
17820
+ documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents
17821
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.taxHeadEstimatesCalculation) && /*#__PURE__*/React.createElement(PropertyEstimates, {
17822
+ taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : _detail$additionalDet22.taxHeadEstimatesCalculation
18987
17823
  }), (detail === null || detail === void 0 ? void 0 : detail.isWaterConnectionDetails) && /*#__PURE__*/React.createElement(WSAdditonalDetails, {
18988
17824
  wsAdditionalDetails: detail,
18989
17825
  oldValue: oldValue
18990
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.redirectUrl) && /*#__PURE__*/React.createElement("div", {
17826
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet23 = detail.additionalDetails) === null || _detail$additionalDet23 === void 0 ? void 0 : _detail$additionalDet23.redirectUrl) && /*#__PURE__*/React.createElement("div", {
18991
17827
  style: {
18992
17828
  fontSize: "16px",
18993
17829
  lineHeight: "24px",
@@ -18995,42 +17831,19 @@ function ApplicationDetailsContent({
18995
17831
  padding: "10px 0px"
18996
17832
  }
18997
17833
  }, /*#__PURE__*/React.createElement(Link, {
18998
- to: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : (_detail$additionalDet23 = _detail$additionalDet22.redirectUrl) === null || _detail$additionalDet23 === void 0 ? void 0 : _detail$additionalDet23.url
17834
+ to: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet24 = detail.additionalDetails) === null || _detail$additionalDet24 === void 0 ? void 0 : (_detail$additionalDet25 = _detail$additionalDet24.redirectUrl) === null || _detail$additionalDet25 === void 0 ? void 0 : _detail$additionalDet25.url
18999
17835
  }, /*#__PURE__*/React.createElement("span", {
19000
17836
  className: "link",
19001
17837
  style: {
19002
17838
  color: "#a82227"
19003
17839
  }
19004
- }, detail === null || detail === void 0 ? void 0 : (_detail$additionalDet24 = detail.additionalDetails) === null || _detail$additionalDet24 === void 0 ? void 0 : (_detail$additionalDet25 = _detail$additionalDet24.redirectUrl) === null || _detail$additionalDet25 === void 0 ? void 0 : _detail$additionalDet25.title))), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet26 = detail.additionalDetails) === null || _detail$additionalDet26 === void 0 ? void 0 : _detail$additionalDet26.estimationDetails) && /*#__PURE__*/React.createElement(WSFeeEstimation, {
17840
+ }, detail === null || detail === void 0 ? void 0 : (_detail$additionalDet26 = detail.additionalDetails) === null || _detail$additionalDet26 === void 0 ? void 0 : (_detail$additionalDet27 = _detail$additionalDet26.redirectUrl) === null || _detail$additionalDet27 === void 0 ? void 0 : _detail$additionalDet27.title))), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet28 = detail.additionalDetails) === null || _detail$additionalDet28 === void 0 ? void 0 : _detail$additionalDet28.estimationDetails) && /*#__PURE__*/React.createElement(WSFeeEstimation, {
19005
17841
  wsAdditionalDetails: detail,
19006
17842
  workflowDetails: workflowDetails
19007
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet27 = detail.additionalDetails) === null || _detail$additionalDet27 === void 0 ? void 0 : _detail$additionalDet27.estimationDetails) && /*#__PURE__*/React.createElement(ViewBreakup, {
17843
+ }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet29 = detail.additionalDetails) === null || _detail$additionalDet29 === void 0 ? void 0 : _detail$additionalDet29.estimationDetails) && /*#__PURE__*/React.createElement(ViewBreakup, {
19008
17844
  wsAdditionalDetails: detail,
19009
17845
  workflowDetails: workflowDetails
19010
- }), detail.title === "Property Documents" && (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet28 = detail.additionalDetails) === null || _detail$additionalDet28 === void 0 ? void 0 : _detail$additionalDet28.assessmentDocuments) === null ? /*#__PURE__*/React.createElement("p", null, "0") : /*#__PURE__*/React.createElement(PropertyDocuments, {
19011
- documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet29 = detail.additionalDetails) === null || _detail$additionalDet29 === void 0 ? void 0 : _detail$additionalDet29.assessmentDocuments
19012
- }), detail.title === "DECLARATION" && (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet30 = detail.additionalDetails) === null || _detail$additionalDet30 === void 0 ? void 0 : _detail$additionalDet30.declaration) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
19013
- style: {
19014
- display: 'flex',
19015
- alignItems: 'center',
19016
- gap: '8px'
19017
- }
19018
- }, /*#__PURE__*/React.createElement(CheckBox, {
19019
- onChange: e => {
19020
- setIsCheck(e.target.checked);
19021
- }
19022
- }), /*#__PURE__*/React.createElement("p", null, detail === null || detail === void 0 ? void 0 : (_detail$additionalDet31 = detail.additionalDetails) === null || _detail$additionalDet31 === void 0 ? void 0 : _detail$additionalDet31.declaration)), isCheck === false && /*#__PURE__*/React.createElement("p", {
19023
- style: {
19024
- color: 'red'
19025
- }
19026
- }, t("PT_CHECK_DECLARATION_BOX"))));
19027
- }), !window.location.href.includes("/assessment-details") && /*#__PURE__*/React.createElement(AssessmentHistory, {
19028
- assessmentData: filtered,
19029
- applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData
19030
- }), !window.location.href.includes("/assessment-details") && /*#__PURE__*/React.createElement(PaymentHistory, {
19031
- payments: payments
19032
- }), !window.location.href.includes("/assessment-details") && /*#__PURE__*/React.createElement(ApplicationHistory, {
19033
- applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData
17846
+ }));
19034
17847
  }), showTimeLine && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3.timeline) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.length) > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BreakLine$1, null), ((workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.isLoading) || isDataLoading) && /*#__PURE__*/React.createElement(Loader, null), !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && !isDataLoading && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
19035
17848
  id: "timeline"
19036
17849
  }, /*#__PURE__*/React.createElement(CardSectionHeader$1, {
@@ -19061,68 +17874,135 @@ function ApplicationDetailsContent({
19061
17874
  }))), (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data19 = workflowDetails.data) === null || _workflowDetails$data19 === void 0 ? void 0 : (_workflowDetails$data20 = _workflowDetails$data19.timeline) === null || _workflowDetails$data20 === void 0 ? void 0 : _workflowDetails$data20.length) > 2 && /*#__PURE__*/React.createElement(LinkButton$1, {
19062
17875
  label: showAllTimeline ? t("COLLAPSE") : t("VIEW_TIMELINE"),
19063
17876
  onClick: toggleTimeline
19064
- })))), /*#__PURE__*/React.createElement(ActionBar$1, {
19065
- className: "clear-search-container",
19066
- style: {
19067
- display: "block"
19068
- }
19069
- }, /*#__PURE__*/React.createElement(SubmitBar$1, {
19070
- label: "Make Property Active",
19071
- style: {
19072
- flex: 1
19073
- },
19074
- onSubmit: PropertyActive
19075
- }), /*#__PURE__*/React.createElement(SubmitBar$1, {
19076
- label: "Make Property Inactive",
19077
- style: {
19078
- marginLeft: "20px"
19079
- },
19080
- onSubmit: PropertyInActive
19081
- }), /*#__PURE__*/React.createElement(SubmitBar$1, {
19082
- label: "Edit Property",
19083
- style: {
19084
- marginLeft: "20px"
19085
- },
19086
- onSubmit: EditProperty
19087
- }), /*#__PURE__*/React.createElement(SubmitBar$1, {
19088
- label: "Access Property",
19089
- style: {
19090
- marginLeft: "20px"
19091
- },
19092
- onSubmit: AccessProperty
19093
- })), showToast && /*#__PURE__*/React.createElement(Toast$1, {
19094
- error: showToast.isError,
19095
- label: t(showToast.label),
19096
- onClose: closeToast,
19097
- isDleteBtn: "false"
19098
- }), showAccess && /*#__PURE__*/React.createElement(Modal, {
19099
- headerBarMain: /*#__PURE__*/React.createElement(Heading, {
19100
- label: t("PT_FINANCIAL_YEAR_PLACEHOLDER")
19101
- }),
19102
- headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn, {
19103
- onClick: closeModalTwo
19104
- }),
19105
- actionCancelLabel: "Cancel",
19106
- actionCancelOnSubmit: closeModal,
19107
- actionSaveLabel: "Access",
19108
- actionSaveOnSubmit: setModal,
19109
- formId: "modal-action",
19110
- popupStyles: {
19111
- width: '60%',
19112
- marginTop: '5px'
19113
- }
19114
- }, /*#__PURE__*/React.createElement(React.Fragment, null, ((_FinancialYearData2 = FinancialYearData) === null || _FinancialYearData2 === void 0 ? void 0 : _FinancialYearData2.length) > 0 && /*#__PURE__*/React.createElement(Fragment$1, null, FinancialYearData.map((option, index) => /*#__PURE__*/React.createElement("div", {
19115
- key: index,
19116
- style: {
19117
- marginBottom: '8px'
19118
- }
19119
- }, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("input", {
19120
- type: "radio",
19121
- value: option.code,
19122
- checked: selectedYear === option.code,
19123
- onChange: e => setSelectedYear(e.target.value),
19124
- name: "custom-radio"
19125
- }), option.name)))))));
17877
+ })))), /*#__PURE__*/React.createElement(CardSectionHeader$1, {
17878
+ style: {
17879
+ marginBottom: '16px',
17880
+ marginTop: "16px",
17881
+ fontSize: '24px'
17882
+ }
17883
+ }, "DCB Details"), /*#__PURE__*/React.createElement("table", {
17884
+ border: "1px",
17885
+ style: tableStyles.table
17886
+ }, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", {
17887
+ style: tableStyles.th
17888
+ }, "Installments"), /*#__PURE__*/React.createElement("th", {
17889
+ colSpan: "3",
17890
+ style: tableStyles.th
17891
+ }, "Demand"), /*#__PURE__*/React.createElement("th", {
17892
+ colSpan: "3",
17893
+ style: tableStyles.th
17894
+ }, "Collection"), /*#__PURE__*/React.createElement("th", {
17895
+ colSpan: "3",
17896
+ style: tableStyles.th
17897
+ }, "Balance"), /*#__PURE__*/React.createElement("th", {
17898
+ style: tableStyles.th
17899
+ }, "Advance")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", {
17900
+ style: tableStyles.th
17901
+ }), /*#__PURE__*/React.createElement("th", {
17902
+ style: tableStyles.th
17903
+ }, "Tax"), /*#__PURE__*/React.createElement("th", {
17904
+ style: tableStyles.th
17905
+ }, "Interest"), /*#__PURE__*/React.createElement("th", {
17906
+ style: tableStyles.th
17907
+ }, "Penalty"), /*#__PURE__*/React.createElement("th", {
17908
+ style: tableStyles.th
17909
+ }, "Tax"), /*#__PURE__*/React.createElement("th", {
17910
+ style: tableStyles.th
17911
+ }, "Interest"), /*#__PURE__*/React.createElement("th", {
17912
+ style: tableStyles.th
17913
+ }, "Penalty"), /*#__PURE__*/React.createElement("th", {
17914
+ style: tableStyles.th
17915
+ }, "Tax"), /*#__PURE__*/React.createElement("th", {
17916
+ style: tableStyles.th
17917
+ }, "Interest"), /*#__PURE__*/React.createElement("th", {
17918
+ style: tableStyles.th
17919
+ }, "Penalty"), /*#__PURE__*/React.createElement("th", {
17920
+ style: tableStyles.th
17921
+ }, "Advance"))), /*#__PURE__*/React.createElement("tbody", null, demandData === null || demandData === void 0 ? void 0 : demandData.map(item => {
17922
+ return /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
17923
+ style: tableStyles.td
17924
+ }, item.taxPeriodFrom, "-", item.taxPeriodTo), /*#__PURE__*/React.createElement("td", {
17925
+ style: tableStyles.td
17926
+ }, item.demandTax), /*#__PURE__*/React.createElement("td", {
17927
+ style: tableStyles.td
17928
+ }, item.demandInterest), /*#__PURE__*/React.createElement("td", {
17929
+ style: tableStyles.td
17930
+ }, item.demandPenality), /*#__PURE__*/React.createElement("td", {
17931
+ style: tableStyles.td
17932
+ }, item.collectionTax), /*#__PURE__*/React.createElement("td", {
17933
+ style: tableStyles.td
17934
+ }, item.collectionInterest), /*#__PURE__*/React.createElement("td", {
17935
+ style: tableStyles.td
17936
+ }, item.collectionPenality), /*#__PURE__*/React.createElement("td", {
17937
+ style: tableStyles.td
17938
+ }, item.balanceTax), /*#__PURE__*/React.createElement("td", {
17939
+ style: tableStyles.td
17940
+ }, item.balanceInterest), /*#__PURE__*/React.createElement("td", {
17941
+ style: tableStyles.td
17942
+ }, item.balancePenality), /*#__PURE__*/React.createElement("td", {
17943
+ style: tableStyles.td
17944
+ }, item.advance));
17945
+ }), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", {
17946
+ style: tableStyles.th
17947
+ }, "Total"), /*#__PURE__*/React.createElement("td", {
17948
+ style: tableStyles.td
17949
+ }, totalDemandTax), /*#__PURE__*/React.createElement("td", {
17950
+ style: tableStyles.td
17951
+ }, totalDemandInterest), /*#__PURE__*/React.createElement("td", {
17952
+ style: tableStyles.td
17953
+ }, totalDemandPenality), /*#__PURE__*/React.createElement("td", {
17954
+ style: tableStyles.td
17955
+ }, totalCollectionTax), /*#__PURE__*/React.createElement("td", {
17956
+ style: tableStyles.td
17957
+ }, totalCollectionInterest), /*#__PURE__*/React.createElement("td", {
17958
+ style: tableStyles.td
17959
+ }, totalCollectionPenality), /*#__PURE__*/React.createElement("td", {
17960
+ style: tableStyles.td
17961
+ }), /*#__PURE__*/React.createElement("td", {
17962
+ style: tableStyles.td
17963
+ }), /*#__PURE__*/React.createElement("td", {
17964
+ style: tableStyles.td
17965
+ }), /*#__PURE__*/React.createElement("td", {
17966
+ style: tableStyles.td
17967
+ })), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
17968
+ style: tableStyles.td
17969
+ }), /*#__PURE__*/React.createElement("td", {
17970
+ style: tableStyles.td
17971
+ }), /*#__PURE__*/React.createElement("td", {
17972
+ style: tableStyles.td
17973
+ }), /*#__PURE__*/React.createElement("td", {
17974
+ style: tableStyles.td
17975
+ }), /*#__PURE__*/React.createElement("td", {
17976
+ style: tableStyles.td
17977
+ }), /*#__PURE__*/React.createElement("td", {
17978
+ style: tableStyles.td
17979
+ }), /*#__PURE__*/React.createElement("th", {
17980
+ style: tableStyles.th
17981
+ }, "Total"), /*#__PURE__*/React.createElement("td", {
17982
+ style: tableStyles.td
17983
+ }, totalBalanceTax), /*#__PURE__*/React.createElement("td", {
17984
+ style: tableStyles.td
17985
+ }, "0"), /*#__PURE__*/React.createElement("td", {
17986
+ style: tableStyles.td
17987
+ }, "0"), /*#__PURE__*/React.createElement("td", {
17988
+ style: tableStyles.td
17989
+ }, "0")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
17990
+ style: tableStyles.td
17991
+ }), /*#__PURE__*/React.createElement("td", {
17992
+ style: tableStyles.td
17993
+ }), /*#__PURE__*/React.createElement("td", {
17994
+ style: tableStyles.td
17995
+ }), /*#__PURE__*/React.createElement("td", {
17996
+ style: tableStyles.td
17997
+ }), /*#__PURE__*/React.createElement("td", {
17998
+ style: tableStyles.td
17999
+ }), /*#__PURE__*/React.createElement("td", {
18000
+ style: tableStyles.td
18001
+ }), /*#__PURE__*/React.createElement("th", {
18002
+ style: tableStyles.th
18003
+ }, "Total Balance"), /*#__PURE__*/React.createElement("td", {
18004
+ style: tableStyles.td
18005
+ }, totalBalanceTax)))));
19126
18006
  }
19127
18007
 
19128
18008
  function ApplicationDetailsToast({
@@ -19433,10 +18313,7 @@ const ApplicationDetails = props => {
19433
18313
  showTimeLine = true,
19434
18314
  oldValue,
19435
18315
  isInfoLabel = false,
19436
- clearDataDetails,
19437
- propertyId,
19438
- setIsCheck,
19439
- isCheck
18316
+ clearDataDetails
19440
18317
  } = props;
19441
18318
  useEffect(() => {
19442
18319
  if (showToast) {
@@ -19657,7 +18534,6 @@ const ApplicationDetails = props => {
19657
18534
  window.location.assign(window.location.href.split("/editApplication")[0] + window.location.href.split("editApplication")[1]);
19658
18535
  }
19659
18536
  };
19660
- console.log("application Details in template", applicationDetails);
19661
18537
  return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ApplicationDetailsContent, {
19662
18538
  applicationDetails: applicationDetails,
19663
18539
  demandData: demandData,
@@ -19673,10 +18549,7 @@ const ApplicationDetails = props => {
19673
18549
  paymentsList: paymentsList,
19674
18550
  showTimeLine: showTimeLine,
19675
18551
  oldValue: oldValue,
19676
- isInfoLabel: isInfoLabel,
19677
- propertyId: propertyId,
19678
- setIsCheck: setIsCheck,
19679
- isCheck: isCheck
18552
+ isInfoLabel: isInfoLabel
19680
18553
  }), showModal ? /*#__PURE__*/React.createElement(ActionModal$b, {
19681
18554
  t: t,
19682
18555
  action: selectedAction,
@@ -21040,6 +19913,7 @@ const Acknowledgement = props => {
21040
19913
  };
21041
19914
 
21042
19915
  const ActiveAndOpenSurveys = props => {
19916
+ var _userUlbs, _userUlbs2, _userUlbs3;
21043
19917
  const {
21044
19918
  userType
21045
19919
  } = props;
@@ -21047,10 +19921,49 @@ const ActiveAndOpenSurveys = props => {
21047
19921
  const {
21048
19922
  t
21049
19923
  } = useTranslation();
19924
+ const userInfo = Digit.UserService.getUser().info;
19925
+ console.log("userinfo", userInfo);
19926
+ const ulbs = Digit.SessionStorage.get("ENGAGEMENT_TENANTS");
19927
+ let userUlbs = ulbs.filter(ulb => {
19928
+ var _userInfo$roles;
19929
+ return userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$roles = userInfo.roles) === null || _userInfo$roles === void 0 ? void 0 : _userInfo$roles.some(role => (role === null || role === void 0 ? void 0 : role.tenantId) === (ulb === null || ulb === void 0 ? void 0 : ulb.code));
19930
+ });
21050
19931
  const tenantId = userType.toLowerCase() === "employee" ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
19932
+ if (((_userUlbs = userUlbs) === null || _userUlbs === void 0 ? void 0 : _userUlbs.length) === 0 || tenantId === "pb.punjab") {
19933
+ let adduserUlbs = {
19934
+ i18nKey: `TENANT_TENANTS_${tenantId.replace(".", "_").toUpperCase()}`,
19935
+ code: `${tenantId}`
19936
+ };
19937
+ if (tenantId === "pb.punjab") {
19938
+ userUlbs = [adduserUlbs, ...ulbs];
19939
+ } else {
19940
+ userUlbs = [adduserUlbs];
19941
+ }
19942
+ }
21051
19943
  const [loading, setLoading] = useState(false);
21052
19944
  const [count, setCount] = useState(null);
21053
19945
  const [data, setData] = useState([]);
19946
+ const searchFormDefaultValues = {
19947
+ city: (_userUlbs2 = userUlbs) === null || _userUlbs2 === void 0 ? void 0 : _userUlbs2[0],
19948
+ offset: 0,
19949
+ limit: 10,
19950
+ sortOrder: "DESC"
19951
+ };
19952
+ const {
19953
+ register,
19954
+ control,
19955
+ handleSubmit,
19956
+ setValue,
19957
+ getValues,
19958
+ reset,
19959
+ formState: {
19960
+ errors
19961
+ },
19962
+ watch
19963
+ } = useForm({
19964
+ defaultValues: searchFormDefaultValues
19965
+ });
19966
+ const formValues = watch();
21054
19967
  const GetCell = value => /*#__PURE__*/React.createElement("span", {
21055
19968
  className: "cell-text styled-cell"
21056
19969
  }, value);
@@ -21101,11 +20014,12 @@ const ActiveAndOpenSurveys = props => {
21101
20014
  });
21102
20015
  useEffect(() => {
21103
20016
  fetchActiveAndOpenSurveys();
21104
- }, [tenantId]);
20017
+ }, []);
21105
20018
  function fetchActiveAndOpenSurveys() {
20019
+ var _formValues$city;
21106
20020
  setLoading(true);
21107
20021
  const payload = {
21108
- tenantId: tenantId,
20022
+ tenantId: formValues === null || formValues === void 0 ? void 0 : (_formValues$city = formValues.city) === null || _formValues$city === void 0 ? void 0 : _formValues$city.code,
21109
20023
  active: true,
21110
20024
  openSurveyFlag: true
21111
20025
  };
@@ -21120,7 +20034,6 @@ const ActiveAndOpenSurveys = props => {
21120
20034
  console.error("Failed to fetch surveys", error);
21121
20035
  });
21122
20036
  }
21123
- const userInfo = Digit.UserService.getUser().info;
21124
20037
  console.log("userinfo", userInfo);
21125
20038
  const handleStartSurvey = surveyDetails => {
21126
20039
  console.log("Survey Details: ", surveyDetails);
@@ -21138,7 +20051,61 @@ const ActiveAndOpenSurveys = props => {
21138
20051
  }
21139
20052
  });
21140
20053
  };
21141
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Table, {
20054
+ return /*#__PURE__*/React.createElement("div", null, tenantId === "pb.punjab" && window.location.href.includes("/employee") ? /*#__PURE__*/React.createElement(Card$1, {
20055
+ style: {
20056
+ marginTop: "16px",
20057
+ marginBottom: "16px",
20058
+ backgroundColor: "white",
20059
+ maxWidth: "99%"
20060
+ }
20061
+ }, /*#__PURE__*/React.createElement("div", {
20062
+ style: {
20063
+ display: "flex",
20064
+ justifyContent: "space-between",
20065
+ alignItems: "center"
20066
+ }
20067
+ }, /*#__PURE__*/React.createElement("h1", {
20068
+ style: {
20069
+ fontSize: "20px"
20070
+ }
20071
+ }, " Search Surveys ")), /*#__PURE__*/React.createElement("hr", {
20072
+ style: {
20073
+ marginTop: "10px"
20074
+ }
20075
+ }), /*#__PURE__*/React.createElement("form", {
20076
+ className: "search-form-wrapper rm-mb form-field-flex-one",
20077
+ onSubmit: handleSubmit(fetchActiveAndOpenSurveys)
20078
+ }, /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("City"), " ", /*#__PURE__*/React.createElement("span", {
20079
+ style: {
20080
+ color: "red"
20081
+ }
20082
+ }, "*")), /*#__PURE__*/React.createElement(Controller, Object.assign({
20083
+ rules: {
20084
+ required: t("REQUIRED_FIELD")
20085
+ }
20086
+ }, register("city"), {
20087
+ render: props => /*#__PURE__*/React.createElement(Dropdown, {
20088
+ option: userUlbs,
20089
+ optionKey: "i18nKey",
20090
+ selected: formValues === null || formValues === void 0 ? void 0 : formValues.city,
20091
+ select: e => {
20092
+ props.onChange(e);
20093
+ },
20094
+ t: t
20095
+ }),
20096
+ name: "city",
20097
+ control: control,
20098
+ defaultValue: (_userUlbs3 = userUlbs) === null || _userUlbs3 === void 0 ? void 0 : _userUlbs3[0]
20099
+ }))), /*#__PURE__*/React.createElement("div", {
20100
+ className: `form-field`,
20101
+ style: {
20102
+ marginTop: "40px"
20103
+ }
20104
+ }, " ", /*#__PURE__*/React.createElement(SubmitBar$1, {
20105
+ label: "Search",
20106
+ submit: "submit",
20107
+ onSubmit: fetchActiveAndOpenSurveys
20108
+ })))) : null, /*#__PURE__*/React.createElement(Table, {
21142
20109
  t: t,
21143
20110
  data: data,
21144
20111
  totalRecords: count,
@@ -21326,6 +20293,7 @@ const FillQuestions = props => {
21326
20293
  const tenantId = Digit.ULBService.getCurrentTenantId();
21327
20294
  const prevProps = props.location.state;
21328
20295
  const [hasCitizenDetails, setHasCitizenDetails] = useState(null);
20296
+ console.log("city", localStorage.getItem("CITIZEN.CITY"));
21329
20297
  useEffect(() => {
21330
20298
  (async () => {
21331
20299
  setLoading(true);
@@ -21424,10 +20392,12 @@ const FillQuestions = props => {
21424
20392
  }))
21425
20393
  };
21426
20394
  const fetchAnswer = async status => {
20395
+ var _prevProps$citizenDat2, _prevProps$citizenDat3;
21427
20396
  setLoading(true);
21428
20397
  let payload = {
21429
20398
  surveyUuid: data.uuid,
21430
- citizenId: prevProps.userInfo.uuid
20399
+ citizenId: prevProps.userInfo.uuid,
20400
+ tenantId: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat2 = prevProps.citizenData) === null || _prevProps$citizenDat2 === void 0 ? void 0 : (_prevProps$citizenDat3 = _prevProps$citizenDat2.city) === null || _prevProps$citizenDat3 === void 0 ? void 0 : _prevProps$citizenDat3.code : city : city
21431
20401
  };
21432
20402
  try {
21433
20403
  Digit.Surveys.getAnswers(payload).then(response => {
@@ -21465,10 +20435,12 @@ const FillQuestions = props => {
21465
20435
  }
21466
20436
  };
21467
20437
  const fetchSurveyAnswers = async () => {
20438
+ var _prevProps$citizenDat4, _prevProps$citizenDat5;
21468
20439
  setLoading(true);
21469
20440
  let payload = {
21470
20441
  surveyUuid: data.uuid,
21471
- citizenId: prevProps.userInfo.uuid
20442
+ citizenId: prevProps.userInfo.uuid,
20443
+ tenantId: city === null || city === undefined ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat4 = prevProps.citizenData) === null || _prevProps$citizenDat4 === void 0 ? void 0 : (_prevProps$citizenDat5 = _prevProps$citizenDat4.city) === null || _prevProps$citizenDat5 === void 0 ? void 0 : _prevProps$citizenDat5.code : localStorage.getItem("CITIZEN.CITY") : city
21472
20444
  };
21473
20445
  try {
21474
20446
  Digit.Surveys.getAnswers(payload).then(response => {
@@ -21541,7 +20513,7 @@ const FillQuestions = props => {
21541
20513
  var _prevProps$userInfo, _prevProps$userInfo2, _prevProps$userInfo3;
21542
20514
  setLoading(true);
21543
20515
  const data = {
21544
- userName: prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$userInfo = prevProps.userInfo) === null || _prevProps$userInfo === void 0 ? void 0 : _prevProps$userInfo.mobileNumber,
20516
+ uuid: [prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$userInfo = prevProps.userInfo) === null || _prevProps$userInfo === void 0 ? void 0 : _prevProps$userInfo.uuid],
21545
20517
  tenantId: prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$userInfo2 = prevProps.userInfo) === null || _prevProps$userInfo2 === void 0 ? void 0 : _prevProps$userInfo2.tenantId
21546
20518
  };
21547
20519
  const filters = {
@@ -21560,7 +20532,6 @@ const FillQuestions = props => {
21560
20532
  const birthDate = new Date(response === null || response === void 0 ? void 0 : (_response$user$7 = response.user[0]) === null || _response$user$7 === void 0 ? void 0 : _response$user$7.dob);
21561
20533
  let age = today.getFullYear() - birthDate.getFullYear();
21562
20534
  const monthDifference = today.getMonth() - birthDate.getMonth();
21563
- console.log("in user");
21564
20535
  if (monthDifference < 0 || monthDifference === 0 && today.getDate() < birthDate.getDate()) {
21565
20536
  age--;
21566
20537
  }
@@ -21574,9 +20545,11 @@ const FillQuestions = props => {
21574
20545
  }
21575
20546
  }
21576
20547
  } else {
21577
- console.log("in user error");
21578
- alert("ERROR FILE FETCHING CITIZEN DETAILS");
21579
- return;
20548
+ setShowToast({
20549
+ key: true,
20550
+ isError: true,
20551
+ label: `ERROR FILE FETCHING CITIZEN DETAILS`
20552
+ });
21580
20553
  }
21581
20554
  }).catch(error => {
21582
20555
  setLoading(false);
@@ -21629,7 +20602,7 @@ const FillQuestions = props => {
21629
20602
  return () => clearInterval(interval);
21630
20603
  }, [formData]);
21631
20604
  const handleAutoSave = async () => {
21632
- var _prevProps$citizenDat2, _prevProps$citizenDat3, _prevProps$citizenDat4;
20605
+ var _prevProps$citizenDat6, _prevProps$citizenDat7, _prevProps$citizenDat8, _prevProps$citizenDat9, _prevProps$citizenDat0, _prevProps$citizenDat1, _prevProps$citizenDat10, _prevProps$citizenDat11, _prevProps$citizenDat12;
21633
20606
  setLoading(true);
21634
20607
  let answerArr = [];
21635
20608
  for (const sectionId in formData) {
@@ -21653,14 +20626,16 @@ const FillQuestions = props => {
21653
20626
  User: {
21654
20627
  type: prevProps.userInfo.type,
21655
20628
  uuid: prevProps.userInfo.uuid,
21656
- gender: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat2 = prevProps.citizenData) === null || _prevProps$citizenDat2 === void 0 ? void 0 : _prevProps$citizenDat2.gender : prevProps.userInfo.gender,
21657
- emailId: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat3 = prevProps.citizenData) === null || _prevProps$citizenDat3 === void 0 ? void 0 : _prevProps$citizenDat3.email : prevProps.userInfo.emailId,
21658
- dob: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat4 = prevProps.citizenData) === null || _prevProps$citizenDat4 === void 0 ? void 0 : _prevProps$citizenDat4.dob : prevProps.userInfo.dob
20629
+ gender: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat6 = prevProps.citizenData) === null || _prevProps$citizenDat6 === void 0 ? void 0 : _prevProps$citizenDat6.gender : prevProps.userInfo.gender,
20630
+ emailId: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat7 = prevProps.citizenData) === null || _prevProps$citizenDat7 === void 0 ? void 0 : _prevProps$citizenDat7.email : prevProps.userInfo.emailId,
20631
+ dob: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat8 = prevProps.citizenData) === null || _prevProps$citizenDat8 === void 0 ? void 0 : _prevProps$citizenDat8.dob : prevProps.userInfo.dob
21659
20632
  },
21660
20633
  SurveyResponse: {
21661
20634
  surveyUuid: data.uuid,
21662
- tenantId: city,
20635
+ tenantId: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat9 = prevProps.citizenData) === null || _prevProps$citizenDat9 === void 0 ? void 0 : (_prevProps$citizenDat0 = _prevProps$citizenDat9.city) === null || _prevProps$citizenDat0 === void 0 ? void 0 : _prevProps$citizenDat0.code : localStorage.getItem("CITIZEN.CITY") : city,
20636
+ city: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat1 = prevProps.citizenData) === null || _prevProps$citizenDat1 === void 0 ? void 0 : (_prevProps$citizenDat10 = _prevProps$citizenDat1.city) === null || _prevProps$citizenDat10 === void 0 ? void 0 : _prevProps$citizenDat10.code : localStorage.getItem("CITIZEN.CITY") : city,
21663
20637
  locality: locality,
20638
+ tenantId: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat11 = prevProps.citizenData) === null || _prevProps$citizenDat11 === void 0 ? void 0 : (_prevProps$citizenDat12 = _prevProps$citizenDat11.city) === null || _prevProps$citizenDat12 === void 0 ? void 0 : _prevProps$citizenDat12.code : localStorage.getItem("CITIZEN.CITY") : city,
21664
20639
  status: "Draft",
21665
20640
  coordinates: `${geoLocation.latitude},${geoLocation.longitude}`,
21666
20641
  answers: answerArr
@@ -21735,19 +20710,19 @@ const FillQuestions = props => {
21735
20710
  return Object.keys(newErrors).length === 0;
21736
20711
  };
21737
20712
  const handleSubmitSurvey = () => {
21738
- var _prevProps$citizenDat5, _prevProps$citizenDat6, _prevProps$citizenDat7;
20713
+ var _prevProps$citizenDat15, _prevProps$citizenDat16, _prevProps$citizenDat17, _prevProps$citizenDat18, _prevProps$citizenDat19, _prevProps$citizenDat20, _prevProps$citizenDat21;
21739
20714
  setLoading(true);
21740
20715
  let answerArr = [];
21741
20716
  for (const sectionId in formData) {
21742
20717
  for (const questionId in formData[sectionId]) {
21743
- var _formData$sectionId$q2;
20718
+ var _formData$sectionId$q2, _prevProps$citizenDat13, _prevProps$citizenDat14;
21744
20719
  answerArr.push({
21745
20720
  uuid: formData[sectionId][questionId].answerUuid,
21746
20721
  surveyUuid: data.uuid,
21747
20722
  questionUuid: questionId,
21748
20723
  sectionUuid: sectionId,
21749
20724
  comments: ((_formData$sectionId$q2 = formData[sectionId][questionId]) === null || _formData$sectionId$q2 === void 0 ? void 0 : _formData$sectionId$q2.comments) || "",
21750
- tenantId: localStorage.getItem("CITIZEN.CITY"),
20725
+ tenantId: window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat13 = prevProps.citizenData) === null || _prevProps$citizenDat13 === void 0 ? void 0 : (_prevProps$citizenDat14 = _prevProps$citizenDat13.city) === null || _prevProps$citizenDat14 === void 0 ? void 0 : _prevProps$citizenDat14.code : localStorage.getItem("CITIZEN.CITY"),
21751
20726
  answerDetails: [{
21752
20727
  answerType: formData[sectionId][questionId].answerType,
21753
20728
  answerContent: formData[sectionId][questionId].answerType === "CHECKBOX_ANSWER_TYPE" ? formData[sectionId][questionId].answer.join(",") : formData[sectionId][questionId].answer,
@@ -21760,16 +20735,17 @@ const FillQuestions = props => {
21760
20735
  User: {
21761
20736
  type: prevProps.userInfo.type,
21762
20737
  uuid: prevProps.userInfo.uuid,
21763
- gender: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat5 = prevProps.citizenData) === null || _prevProps$citizenDat5 === void 0 ? void 0 : _prevProps$citizenDat5.gender : prevProps.userInfo.gender,
21764
- emailId: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat6 = prevProps.citizenData) === null || _prevProps$citizenDat6 === void 0 ? void 0 : _prevProps$citizenDat6.email : prevProps.userInfo.emailId,
21765
- dob: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat7 = prevProps.citizenData) === null || _prevProps$citizenDat7 === void 0 ? void 0 : _prevProps$citizenDat7.dob : prevProps.userInfo.dob
20738
+ gender: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat15 = prevProps.citizenData) === null || _prevProps$citizenDat15 === void 0 ? void 0 : _prevProps$citizenDat15.gender : prevProps.userInfo.gender,
20739
+ emailId: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat16 = prevProps.citizenData) === null || _prevProps$citizenDat16 === void 0 ? void 0 : _prevProps$citizenDat16.email : prevProps.userInfo.emailId,
20740
+ dob: (prevProps === null || prevProps === void 0 ? void 0 : prevProps.userType).toUpperCase() === "EMPLOYEE" ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat17 = prevProps.citizenData) === null || _prevProps$citizenDat17 === void 0 ? void 0 : _prevProps$citizenDat17.dob : prevProps.userInfo.dob
21766
20741
  },
21767
20742
  SurveyResponse: {
21768
20743
  surveyUuid: data.uuid,
21769
- tenantId: city,
21770
20744
  status: "Submit",
21771
20745
  locality: locality,
21772
20746
  coordinates: `${geoLocation.latitude},${geoLocation.longitude}`,
20747
+ tenantId: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat18 = prevProps.citizenData) === null || _prevProps$citizenDat18 === void 0 ? void 0 : (_prevProps$citizenDat19 = _prevProps$citizenDat18.city) === null || _prevProps$citizenDat19 === void 0 ? void 0 : _prevProps$citizenDat19.code : localStorage.getItem("CITIZEN.CITY") : city,
20748
+ city: city === null ? window.location.href.includes("/employee") ? prevProps === null || prevProps === void 0 ? void 0 : (_prevProps$citizenDat20 = prevProps.citizenData) === null || _prevProps$citizenDat20 === void 0 ? void 0 : (_prevProps$citizenDat21 = _prevProps$citizenDat20.city) === null || _prevProps$citizenDat21 === void 0 ? void 0 : _prevProps$citizenDat21.code : localStorage.getItem("CITIZEN.CITY") : city,
21773
20749
  answers: answerArr
21774
20750
  }
21775
20751
  };
@@ -22264,6 +21240,7 @@ const FillQuestions = props => {
22264
21240
  }
22265
21241
  }
22266
21242
  }, [getFetchAnswers]);
21243
+ console.log("city", city);
22267
21244
  const handleLocalityChangeCitizen = e => {
22268
21245
  setLocality(e.target.value);
22269
21246
  };
@@ -23915,19 +22892,23 @@ const SearchFormFieldsComponents = ({
23915
22892
  isLoading
23916
22893
  } = Digit.Hooks.useTenants();
23917
22894
  const tenantId = Digit.ULBService.getCurrentTenantId();
23918
- const userInfo = Digit.SessionStorage.get("citizen.userRequestObject");
22895
+ const userInfo = Digit.UserService.getUser().info;
23919
22896
  let isTenantFound = true;
23920
22897
  let userUlbs = ulbs.filter(ulb => {
23921
22898
  var _userInfo$info, _userInfo$info$roles;
23922
22899
  return userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : (_userInfo$info$roles = _userInfo$info.roles) === null || _userInfo$info$roles === void 0 ? void 0 : _userInfo$info$roles.some(role => (role === null || role === void 0 ? void 0 : role.tenantId) === (ulb === null || ulb === void 0 ? void 0 : ulb.code));
23923
22900
  }).sort(alphabeticalSortFunctionForTenantsBasedOnName);
23924
- if (((_userUlbs = userUlbs) === null || _userUlbs === void 0 ? void 0 : _userUlbs.length) === 0) {
23925
- var _userInfo$info2;
22901
+ if (((_userUlbs = userUlbs) === null || _userUlbs === void 0 ? void 0 : _userUlbs.length) === 0 || tenantId === "pb.punjab") {
23926
22902
  isTenantFound = false;
23927
- userUlbs = [{
23928
- i18nKey: `TENANT_TENANTS_${userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info2 = userInfo.info) === null || _userInfo$info2 === void 0 ? void 0 : _userInfo$info2.tenantId.replace(".", "_").toUpperCase()}`,
23929
- code: `${userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.tenantId}`
23930
- }];
22903
+ let adduserUlbs = {
22904
+ i18nKey: `TENANT_TENANTS_${userInfo === null || userInfo === void 0 ? void 0 : userInfo.tenantId.replace(".", "_").toUpperCase()}`,
22905
+ code: `${userInfo === null || userInfo === void 0 ? void 0 : userInfo.tenantId}`
22906
+ };
22907
+ if (tenantId === "pb.punjab") {
22908
+ userUlbs = [adduserUlbs, ...ulbs];
22909
+ } else {
22910
+ userUlbs = [adduserUlbs];
22911
+ }
23931
22912
  }
23932
22913
  const selectedTenat = useMemo(() => {
23933
22914
  var _userUlbs2;
@@ -23992,6 +22973,7 @@ const useInboxTableConfig = ({
23992
22973
  const {
23993
22974
  t
23994
22975
  } = useTranslation();
22976
+ const userInfo = Digit.UserService.getUser();
23995
22977
  const handleUpdateSurveyConfirm = row => {
23996
22978
  var _row$original, _row$original2, _row$original3;
23997
22979
  console.log("Current row: ", row);
@@ -24084,7 +23066,8 @@ const useInboxTableConfig = ({
24084
23066
  Cell: ({
24085
23067
  row
24086
23068
  }) => {
24087
- return /*#__PURE__*/React.createElement("div", {
23069
+ var _row$original12, _userInfo$info;
23070
+ return (row === null || row === void 0 ? void 0 : (_row$original12 = row.original) === null || _row$original12 === void 0 ? void 0 : _row$original12.tenantId) === (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : _userInfo$info.tenantId) ? /*#__PURE__*/React.createElement("div", {
24088
23071
  className: "tooltip"
24089
23072
  }, /*#__PURE__*/React.createElement("div", {
24090
23073
  style: {
@@ -24108,7 +23091,11 @@ const useInboxTableConfig = ({
24108
23091
  marginLeft: "50%",
24109
23092
  fontSize: "medium"
24110
23093
  }
24111
- }, t("Click here to update the survey status"))));
23094
+ }, t("Click here to update the survey status")))) : /*#__PURE__*/React.createElement("div", {
23095
+ style: {
23096
+ color: 'red'
23097
+ }
23098
+ }, "No access");
24112
23099
  }
24113
23100
  }];
24114
23101
  });
@@ -24494,7 +23481,7 @@ const Inbox$3 = ({
24494
23481
  onPageSizeChange,
24495
23482
  formState,
24496
23483
  totalCount: TotalCount,
24497
- table: Surveys,
23484
+ table: sortedSurveys,
24498
23485
  noResultsMessage: "CS_SURVEYS_NOT_FOUND",
24499
23486
  dispatch,
24500
23487
  inboxStyles: {
@@ -24507,7 +23494,7 @@ const Inbox$3 = ({
24507
23494
  });
24508
23495
  const propsForInboxMobileCards = useInboxMobileCardsData({
24509
23496
  parentRoute,
24510
- table: Surveys,
23497
+ table: sortedSurveys,
24511
23498
  setShowToast
24512
23499
  });
24513
23500
  const onNoToToast = () => {
@@ -25022,7 +24009,7 @@ const useCategoryInboxTableConfig = ({
25022
24009
  };
25023
24010
  },
25024
24011
  disableSort: false,
25025
- autoSort: true,
24012
+ autoSort: false,
25026
24013
  manualPagination: true,
25027
24014
  initSortI: "endDate",
25028
24015
  onPageSizeChange: onPageSizeChange,
@@ -25271,7 +24258,7 @@ const SearchCategories = ({
25271
24258
  onPageSizeChange,
25272
24259
  formState,
25273
24260
  totalCount: totalCount,
25274
- table: Categories,
24261
+ table: sortedCategories,
25275
24262
  noResultsMessage: "No Categories found",
25276
24263
  dispatch,
25277
24264
  inboxStyles: {
@@ -25283,7 +24270,7 @@ const SearchCategories = ({
25283
24270
  });
25284
24271
  const propsForInboxMobileCards = useCategoryInboxMobileCardsData({
25285
24272
  parentRoute,
25286
- table: Categories,
24273
+ table: sortedCategories,
25287
24274
  setShowToast
25288
24275
  });
25289
24276
  const onNoToToast = () => {
@@ -26765,7 +25752,7 @@ const useQuestionsInboxTableConfig = ({
26765
25752
  };
26766
25753
  },
26767
25754
  disableSort: false,
26768
- autoSort: true,
25755
+ autoSort: false,
26769
25756
  manualPagination: true,
26770
25757
  initSortI: "endDate",
26771
25758
  onPageSizeChange: onPageSizeChange,
@@ -27019,7 +26006,7 @@ const SearchQuestions = ({
27019
26006
  onPageSizeChange,
27020
26007
  formState,
27021
26008
  totalCount: totalCount,
27022
- table: Questions,
26009
+ table: sortedQuestions,
27023
26010
  noResultsMessage: "No Questions found",
27024
26011
  dispatch,
27025
26012
  inboxStyles: {
@@ -27035,7 +26022,7 @@ const SearchQuestions = ({
27035
26022
  });
27036
26023
  const propsForInboxMobileCards = useQuestionsInboxMobileCardsData({
27037
26024
  parentRoute,
27038
- table: Questions,
26025
+ table: sortedQuestions,
27039
26026
  setShowToast
27040
26027
  });
27041
26028
  const onNoToToast = () => {
@@ -29072,23 +28059,20 @@ const SurveyDetailsForms = ({
29072
28059
  isLoading
29073
28060
  } = Digit.Hooks.useTenants();
29074
28061
  console.log("cities", cities);
29075
- let cityName = "";
29076
28062
  useEffect(() => {
29077
- console.log("loading", isLoading);
29078
- if (!isLoading) {
29079
- console.log("tenantId", tenantId);
29080
- cities.map(item => {
29081
- if (item.code.toString() === tenantId.toString()) {
29082
- cityName = item;
29083
- return;
29084
- }
29085
- });
28063
+ if (!isLoading && cities !== null && cities !== void 0 && cities.length && !(surveyDetails !== null && surveyDetails !== void 0 && surveyDetails.ulb)) {
28064
+ const matchedCity = cities === null || cities === void 0 ? void 0 : cities.find(city => city.code === tenantId);
28065
+ if (matchedCity) {
28066
+ dispatch(fieldChange(surveyDetails.id, {
28067
+ ulb: matchedCity
28068
+ }));
28069
+ }
29086
28070
  }
29087
- }, [cities]);
29088
- console.log("cityName", cityName);
28071
+ }, [cities, isLoading, tenantId]);
29089
28072
  const userInfo = Digit.UserService.getUser().info;
29090
28073
  const dispatch = useDispatch();
29091
28074
  const surveyDetails = useSelector(state => state.engagement.surveyForm.surveyDetails[0]);
28075
+ console.log("surveyDetails====", surveyDetails);
29092
28076
  const userUlbs = ulbs.filter(ulb => {
29093
28077
  var _userInfo$roles;
29094
28078
  return userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$roles = userInfo.roles) === null || _userInfo$roles === void 0 ? void 0 : _userInfo$roles.some(role => (role === null || role === void 0 ? void 0 : role.tenantId) === (ulb === null || ulb === void 0 ? void 0 : ulb.code));
@@ -29098,11 +28082,6 @@ const SurveyDetailsForms = ({
29098
28082
  const filtered = ulbs.filter(item => item.code === tenantId);
29099
28083
  return filtered;
29100
28084
  }, [ulbs]);
29101
- useEffect(() => {
29102
- dispatch(fieldChange(surveyDetails.id, {
29103
- ["ulb"]: cityName
29104
- }));
29105
- }, []);
29106
28085
  const handleFieldChange = e => {
29107
28086
  const {
29108
28087
  name,
@@ -29135,7 +28114,7 @@ const SurveyDetailsForms = ({
29135
28114
  placeholder: "Select City",
29136
28115
  optionKey: "i18nKey",
29137
28116
  t: t,
29138
- selected: surveyDetails.ulb || cityName
28117
+ selected: surveyDetails.ulb
29139
28118
  }), (surveyFormState === null || surveyFormState === void 0 ? void 0 : (_surveyFormState$erro = surveyFormState.errors) === null || _surveyFormState$erro === void 0 ? void 0 : _surveyFormState$erro.tenantIds) && /*#__PURE__*/React.createElement(CardLabelError$2, null, t("ES_ERROR_REQUIRED"))), /*#__PURE__*/React.createElement("div", {
29140
28119
  className: "survey-column"
29141
28120
  }, /*#__PURE__*/React.createElement("label", null, t("CS_SURVEY_NAME"), " ", /*#__PURE__*/React.createElement("span", {
@@ -29164,7 +28143,7 @@ const SurveyDetailsForms = ({
29164
28143
  }), (surveyFormState === null || surveyFormState === void 0 ? void 0 : (_surveyFormState$erro2 = surveyFormState.errors) === null || _surveyFormState$erro2 === void 0 ? void 0 : _surveyFormState$erro2.title) && /*#__PURE__*/React.createElement(CardLabelError$2, null, surveyFormState === null || surveyFormState === void 0 ? void 0 : (_surveyFormState$erro3 = surveyFormState.errors) === null || _surveyFormState$erro3 === void 0 ? void 0 : (_surveyFormState$erro4 = _surveyFormState$erro3["title"]) === null || _surveyFormState$erro4 === void 0 ? void 0 : _surveyFormState$erro4.message))), /*#__PURE__*/React.createElement("div", {
29165
28144
  className: "survey-column",
29166
28145
  style: {
29167
- width: '100%'
28146
+ width: "100%"
29168
28147
  }
29169
28148
  }, /*#__PURE__*/React.createElement("label", null, t("CS_SURVEY_DESCRIPTION")), /*#__PURE__*/React.createElement(TextInput$1, {
29170
28149
  name: "description",