@mseva/digit-ui-module-garbagecollection 1.0.22 → 1.0.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.
- package/dist/index.js +206 -880
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +186 -832
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -9504,7 +9504,7 @@ function CHBSummary({
|
|
|
9504
9504
|
goNext,
|
|
9505
9505
|
onGoBack
|
|
9506
9506
|
}) {
|
|
9507
|
-
var _formData$documents, _formData$documents$d, _formData$apiData, _formData$apiData$App, _formData$apiData$App2, _formData$venueDetail, _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _formData$ownerDetail, _formData$ownerDetail2, _formData$ownerDetail3, _formData$ownerDetail4, _formData$venueDetail2, _formData$venueDetail3, _formData$venueDetail4, _formData$venueDetail5, _formData$venueDetail6, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8;
|
|
9507
|
+
var _formData$documents, _formData$documents$d, _formData$apiData, _formData$apiData$App, _formData$apiData$App2, _formData$venueDetail, _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _formData$ownerDetail, _formData$ownerDetail2, _formData$ownerDetail3, _formData$ownerDetail4, _formData$venueDetail2, _formData$venueDetail3, _formData$venueDetail4, _formData$venueDetail5, _formData$venueDetail6, _formData$venueDetail7, _formData$venueDetail8, _formData$venueDetail9, _formData$venueDetail0, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8;
|
|
9508
9508
|
const {
|
|
9509
9509
|
t
|
|
9510
9510
|
} = useTranslation();
|
|
@@ -9592,7 +9592,13 @@ function CHBSummary({
|
|
|
9592
9592
|
style: {
|
|
9593
9593
|
fontSize: "24px"
|
|
9594
9594
|
}
|
|
9595
|
-
}, t("PT_DETAILS")), renderLabel(t("NDC_MSG_PROPERTY_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail2 = formData.venueDetails) === null || _formData$venueDetail2 === void 0 ? void 0 : _formData$venueDetail2.propertyId), renderLabel(t("NDC_MSG_PROPERTY_TYPE_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail3 = formData.venueDetails) === null || _formData$venueDetail3 === void 0 ? void 0 : (_formData$venueDetail4 = _formData$venueDetail3.propertyType) === null || _formData$venueDetail4 === void 0 ? void 0 : _formData$venueDetail4.name), renderLabel(t("PDF_STATIC_LABEL_WS_CONSOLIDATED_ACKNOWELDGMENT_PLOT_SIZE"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail5 = formData.venueDetails) === null || _formData$venueDetail5 === void 0 ? void 0 : _formData$venueDetail5.plotSize), renderLabel(t("PDF_STATIC_LABEL_WS_CONSOLIDATED_ACKNOWELDGMENT_PROPERTY_ADDRESS"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail6 = formData.venueDetails) === null || _formData$venueDetail6 === void 0 ? void 0 : _formData$venueDetail6.location)), /*#__PURE__*/React.createElement(
|
|
9595
|
+
}, t("PT_DETAILS")), renderLabel(t("NDC_MSG_PROPERTY_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail2 = formData.venueDetails) === null || _formData$venueDetail2 === void 0 ? void 0 : _formData$venueDetail2.propertyId), renderLabel(t("NDC_MSG_PROPERTY_TYPE_LABEL"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail3 = formData.venueDetails) === null || _formData$venueDetail3 === void 0 ? void 0 : (_formData$venueDetail4 = _formData$venueDetail3.propertyType) === null || _formData$venueDetail4 === void 0 ? void 0 : _formData$venueDetail4.name), renderLabel(t("PDF_STATIC_LABEL_WS_CONSOLIDATED_ACKNOWELDGMENT_PLOT_SIZE"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail5 = formData.venueDetails) === null || _formData$venueDetail5 === void 0 ? void 0 : _formData$venueDetail5.plotSize), renderLabel(t("PDF_STATIC_LABEL_WS_CONSOLIDATED_ACKNOWELDGMENT_PROPERTY_ADDRESS"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail6 = formData.venueDetails) === null || _formData$venueDetail6 === void 0 ? void 0 : _formData$venueDetail6.location)), /*#__PURE__*/React.createElement("div", {
|
|
9596
|
+
style: sectionStyle
|
|
9597
|
+
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9598
|
+
style: {
|
|
9599
|
+
fontSize: "24px"
|
|
9600
|
+
}
|
|
9601
|
+
}, t("GC_CONNECTION_DETAILS")), renderLabel(t("GC_CONNECTION_TYPE"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail7 = formData.venueDetails) === null || _formData$venueDetail7 === void 0 ? void 0 : _formData$venueDetail7.connectionCategory), renderLabel(t("GC_FREQUENCY"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail8 = formData.venueDetails) === null || _formData$venueDetail8 === void 0 ? void 0 : _formData$venueDetail8.frequency), renderLabel(t("GC_WASTE_TYPE"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail9 = formData.venueDetails) === null || _formData$venueDetail9 === void 0 ? void 0 : _formData$venueDetail9.typeOfWaste), renderLabel(t("GC_LOCATION"), formData === null || formData === void 0 ? void 0 : (_formData$venueDetail0 = formData.venueDetails) === null || _formData$venueDetail0 === void 0 ? void 0 : _formData$venueDetail0.location)), /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
9596
9602
|
style: {
|
|
9597
9603
|
fontSize: "24px",
|
|
9598
9604
|
marginTop: "30px"
|
|
@@ -10594,791 +10600,6 @@ const config = [{
|
|
|
10594
10600
|
}]
|
|
10595
10601
|
}];
|
|
10596
10602
|
|
|
10597
|
-
var bind = function bind(fn, thisArg) {
|
|
10598
|
-
return function wrap() {
|
|
10599
|
-
var args = new Array(arguments.length);
|
|
10600
|
-
for (var i = 0; i < args.length; i++) {
|
|
10601
|
-
args[i] = arguments[i];
|
|
10602
|
-
}
|
|
10603
|
-
return fn.apply(thisArg, args);
|
|
10604
|
-
};
|
|
10605
|
-
};
|
|
10606
|
-
|
|
10607
|
-
var toString = Object.prototype.toString;
|
|
10608
|
-
function isArray(val) {
|
|
10609
|
-
return toString.call(val) === '[object Array]';
|
|
10610
|
-
}
|
|
10611
|
-
function isUndefined(val) {
|
|
10612
|
-
return typeof val === 'undefined';
|
|
10613
|
-
}
|
|
10614
|
-
function isBuffer(val) {
|
|
10615
|
-
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
|
|
10616
|
-
}
|
|
10617
|
-
function isArrayBuffer(val) {
|
|
10618
|
-
return toString.call(val) === '[object ArrayBuffer]';
|
|
10619
|
-
}
|
|
10620
|
-
function isFormData(val) {
|
|
10621
|
-
return typeof FormData !== 'undefined' && val instanceof FormData;
|
|
10622
|
-
}
|
|
10623
|
-
function isArrayBufferView(val) {
|
|
10624
|
-
var result;
|
|
10625
|
-
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
10626
|
-
result = ArrayBuffer.isView(val);
|
|
10627
|
-
} else {
|
|
10628
|
-
result = val && val.buffer && val.buffer instanceof ArrayBuffer;
|
|
10629
|
-
}
|
|
10630
|
-
return result;
|
|
10631
|
-
}
|
|
10632
|
-
function isString(val) {
|
|
10633
|
-
return typeof val === 'string';
|
|
10634
|
-
}
|
|
10635
|
-
function isNumber(val) {
|
|
10636
|
-
return typeof val === 'number';
|
|
10637
|
-
}
|
|
10638
|
-
function isObject(val) {
|
|
10639
|
-
return val !== null && typeof val === 'object';
|
|
10640
|
-
}
|
|
10641
|
-
function isPlainObject(val) {
|
|
10642
|
-
if (toString.call(val) !== '[object Object]') {
|
|
10643
|
-
return false;
|
|
10644
|
-
}
|
|
10645
|
-
var prototype = Object.getPrototypeOf(val);
|
|
10646
|
-
return prototype === null || prototype === Object.prototype;
|
|
10647
|
-
}
|
|
10648
|
-
function isDate$1(val) {
|
|
10649
|
-
return toString.call(val) === '[object Date]';
|
|
10650
|
-
}
|
|
10651
|
-
function isFile(val) {
|
|
10652
|
-
return toString.call(val) === '[object File]';
|
|
10653
|
-
}
|
|
10654
|
-
function isBlob(val) {
|
|
10655
|
-
return toString.call(val) === '[object Blob]';
|
|
10656
|
-
}
|
|
10657
|
-
function isFunction(val) {
|
|
10658
|
-
return toString.call(val) === '[object Function]';
|
|
10659
|
-
}
|
|
10660
|
-
function isStream(val) {
|
|
10661
|
-
return isObject(val) && isFunction(val.pipe);
|
|
10662
|
-
}
|
|
10663
|
-
function isURLSearchParams(val) {
|
|
10664
|
-
return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
|
|
10665
|
-
}
|
|
10666
|
-
function trim(str) {
|
|
10667
|
-
return str.replace(/^\s*/, '').replace(/\s*$/, '');
|
|
10668
|
-
}
|
|
10669
|
-
function isStandardBrowserEnv() {
|
|
10670
|
-
if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) {
|
|
10671
|
-
return false;
|
|
10672
|
-
}
|
|
10673
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
10674
|
-
}
|
|
10675
|
-
function forEach(obj, fn) {
|
|
10676
|
-
if (obj === null || typeof obj === 'undefined') {
|
|
10677
|
-
return;
|
|
10678
|
-
}
|
|
10679
|
-
if (typeof obj !== 'object') {
|
|
10680
|
-
obj = [obj];
|
|
10681
|
-
}
|
|
10682
|
-
if (isArray(obj)) {
|
|
10683
|
-
for (var i = 0, l = obj.length; i < l; i++) {
|
|
10684
|
-
fn.call(null, obj[i], i, obj);
|
|
10685
|
-
}
|
|
10686
|
-
} else {
|
|
10687
|
-
for (var key in obj) {
|
|
10688
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
10689
|
-
fn.call(null, obj[key], key, obj);
|
|
10690
|
-
}
|
|
10691
|
-
}
|
|
10692
|
-
}
|
|
10693
|
-
}
|
|
10694
|
-
function merge() {
|
|
10695
|
-
var result = {};
|
|
10696
|
-
function assignValue(val, key) {
|
|
10697
|
-
if (isPlainObject(result[key]) && isPlainObject(val)) {
|
|
10698
|
-
result[key] = merge(result[key], val);
|
|
10699
|
-
} else if (isPlainObject(val)) {
|
|
10700
|
-
result[key] = merge({}, val);
|
|
10701
|
-
} else if (isArray(val)) {
|
|
10702
|
-
result[key] = val.slice();
|
|
10703
|
-
} else {
|
|
10704
|
-
result[key] = val;
|
|
10705
|
-
}
|
|
10706
|
-
}
|
|
10707
|
-
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
10708
|
-
forEach(arguments[i], assignValue);
|
|
10709
|
-
}
|
|
10710
|
-
return result;
|
|
10711
|
-
}
|
|
10712
|
-
function extend(a, b, thisArg) {
|
|
10713
|
-
forEach(b, function assignValue(val, key) {
|
|
10714
|
-
if (thisArg && typeof val === 'function') {
|
|
10715
|
-
a[key] = bind(val, thisArg);
|
|
10716
|
-
} else {
|
|
10717
|
-
a[key] = val;
|
|
10718
|
-
}
|
|
10719
|
-
});
|
|
10720
|
-
return a;
|
|
10721
|
-
}
|
|
10722
|
-
function stripBOM(content) {
|
|
10723
|
-
if (content.charCodeAt(0) === 0xFEFF) {
|
|
10724
|
-
content = content.slice(1);
|
|
10725
|
-
}
|
|
10726
|
-
return content;
|
|
10727
|
-
}
|
|
10728
|
-
var utils = {
|
|
10729
|
-
isArray: isArray,
|
|
10730
|
-
isArrayBuffer: isArrayBuffer,
|
|
10731
|
-
isBuffer: isBuffer,
|
|
10732
|
-
isFormData: isFormData,
|
|
10733
|
-
isArrayBufferView: isArrayBufferView,
|
|
10734
|
-
isString: isString,
|
|
10735
|
-
isNumber: isNumber,
|
|
10736
|
-
isObject: isObject,
|
|
10737
|
-
isPlainObject: isPlainObject,
|
|
10738
|
-
isUndefined: isUndefined,
|
|
10739
|
-
isDate: isDate$1,
|
|
10740
|
-
isFile: isFile,
|
|
10741
|
-
isBlob: isBlob,
|
|
10742
|
-
isFunction: isFunction,
|
|
10743
|
-
isStream: isStream,
|
|
10744
|
-
isURLSearchParams: isURLSearchParams,
|
|
10745
|
-
isStandardBrowserEnv: isStandardBrowserEnv,
|
|
10746
|
-
forEach: forEach,
|
|
10747
|
-
merge: merge,
|
|
10748
|
-
extend: extend,
|
|
10749
|
-
trim: trim,
|
|
10750
|
-
stripBOM: stripBOM
|
|
10751
|
-
};
|
|
10752
|
-
|
|
10753
|
-
function encode(val) {
|
|
10754
|
-
return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');
|
|
10755
|
-
}
|
|
10756
|
-
var buildURL = function buildURL(url, params, paramsSerializer) {
|
|
10757
|
-
if (!params) {
|
|
10758
|
-
return url;
|
|
10759
|
-
}
|
|
10760
|
-
var serializedParams;
|
|
10761
|
-
if (paramsSerializer) {
|
|
10762
|
-
serializedParams = paramsSerializer(params);
|
|
10763
|
-
} else if (utils.isURLSearchParams(params)) {
|
|
10764
|
-
serializedParams = params.toString();
|
|
10765
|
-
} else {
|
|
10766
|
-
var parts = [];
|
|
10767
|
-
utils.forEach(params, function serialize(val, key) {
|
|
10768
|
-
if (val === null || typeof val === 'undefined') {
|
|
10769
|
-
return;
|
|
10770
|
-
}
|
|
10771
|
-
if (utils.isArray(val)) {
|
|
10772
|
-
key = key + '[]';
|
|
10773
|
-
} else {
|
|
10774
|
-
val = [val];
|
|
10775
|
-
}
|
|
10776
|
-
utils.forEach(val, function parseValue(v) {
|
|
10777
|
-
if (utils.isDate(v)) {
|
|
10778
|
-
v = v.toISOString();
|
|
10779
|
-
} else if (utils.isObject(v)) {
|
|
10780
|
-
v = JSON.stringify(v);
|
|
10781
|
-
}
|
|
10782
|
-
parts.push(encode(key) + '=' + encode(v));
|
|
10783
|
-
});
|
|
10784
|
-
});
|
|
10785
|
-
serializedParams = parts.join('&');
|
|
10786
|
-
}
|
|
10787
|
-
if (serializedParams) {
|
|
10788
|
-
var hashmarkIndex = url.indexOf('#');
|
|
10789
|
-
if (hashmarkIndex !== -1) {
|
|
10790
|
-
url = url.slice(0, hashmarkIndex);
|
|
10791
|
-
}
|
|
10792
|
-
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
|
10793
|
-
}
|
|
10794
|
-
return url;
|
|
10795
|
-
};
|
|
10796
|
-
|
|
10797
|
-
function InterceptorManager() {
|
|
10798
|
-
this.handlers = [];
|
|
10799
|
-
}
|
|
10800
|
-
InterceptorManager.prototype.use = function use(fulfilled, rejected) {
|
|
10801
|
-
this.handlers.push({
|
|
10802
|
-
fulfilled: fulfilled,
|
|
10803
|
-
rejected: rejected
|
|
10804
|
-
});
|
|
10805
|
-
return this.handlers.length - 1;
|
|
10806
|
-
};
|
|
10807
|
-
InterceptorManager.prototype.eject = function eject(id) {
|
|
10808
|
-
if (this.handlers[id]) {
|
|
10809
|
-
this.handlers[id] = null;
|
|
10810
|
-
}
|
|
10811
|
-
};
|
|
10812
|
-
InterceptorManager.prototype.forEach = function forEach(fn) {
|
|
10813
|
-
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
10814
|
-
if (h !== null) {
|
|
10815
|
-
fn(h);
|
|
10816
|
-
}
|
|
10817
|
-
});
|
|
10818
|
-
};
|
|
10819
|
-
var InterceptorManager_1 = InterceptorManager;
|
|
10820
|
-
|
|
10821
|
-
var transformData = function transformData(data, headers, fns) {
|
|
10822
|
-
utils.forEach(fns, function transform(fn) {
|
|
10823
|
-
data = fn(data, headers);
|
|
10824
|
-
});
|
|
10825
|
-
return data;
|
|
10826
|
-
};
|
|
10827
|
-
|
|
10828
|
-
var isCancel = function isCancel(value) {
|
|
10829
|
-
return !!(value && value.__CANCEL__);
|
|
10830
|
-
};
|
|
10831
|
-
|
|
10832
|
-
var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {
|
|
10833
|
-
utils.forEach(headers, function processHeader(value, name) {
|
|
10834
|
-
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
|
10835
|
-
headers[normalizedName] = value;
|
|
10836
|
-
delete headers[name];
|
|
10837
|
-
}
|
|
10838
|
-
});
|
|
10839
|
-
};
|
|
10840
|
-
|
|
10841
|
-
var enhanceError = function enhanceError(error, config, code, request, response) {
|
|
10842
|
-
error.config = config;
|
|
10843
|
-
if (code) {
|
|
10844
|
-
error.code = code;
|
|
10845
|
-
}
|
|
10846
|
-
error.request = request;
|
|
10847
|
-
error.response = response;
|
|
10848
|
-
error.isAxiosError = true;
|
|
10849
|
-
error.toJSON = function toJSON() {
|
|
10850
|
-
return {
|
|
10851
|
-
message: this.message,
|
|
10852
|
-
name: this.name,
|
|
10853
|
-
description: this.description,
|
|
10854
|
-
number: this.number,
|
|
10855
|
-
fileName: this.fileName,
|
|
10856
|
-
lineNumber: this.lineNumber,
|
|
10857
|
-
columnNumber: this.columnNumber,
|
|
10858
|
-
stack: this.stack,
|
|
10859
|
-
config: this.config,
|
|
10860
|
-
code: this.code
|
|
10861
|
-
};
|
|
10862
|
-
};
|
|
10863
|
-
return error;
|
|
10864
|
-
};
|
|
10865
|
-
|
|
10866
|
-
var createError = function createError(message, config, code, request, response) {
|
|
10867
|
-
var error = new Error(message);
|
|
10868
|
-
return enhanceError(error, config, code, request, response);
|
|
10869
|
-
};
|
|
10870
|
-
|
|
10871
|
-
var settle = function settle(resolve, reject, response) {
|
|
10872
|
-
var validateStatus = response.config.validateStatus;
|
|
10873
|
-
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
10874
|
-
resolve(response);
|
|
10875
|
-
} else {
|
|
10876
|
-
reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));
|
|
10877
|
-
}
|
|
10878
|
-
};
|
|
10879
|
-
|
|
10880
|
-
var cookies = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
|
|
10881
|
-
return {
|
|
10882
|
-
write: function write(name, value, expires, path, domain, secure) {
|
|
10883
|
-
var cookie = [];
|
|
10884
|
-
cookie.push(name + '=' + encodeURIComponent(value));
|
|
10885
|
-
if (utils.isNumber(expires)) {
|
|
10886
|
-
cookie.push('expires=' + new Date(expires).toGMTString());
|
|
10887
|
-
}
|
|
10888
|
-
if (utils.isString(path)) {
|
|
10889
|
-
cookie.push('path=' + path);
|
|
10890
|
-
}
|
|
10891
|
-
if (utils.isString(domain)) {
|
|
10892
|
-
cookie.push('domain=' + domain);
|
|
10893
|
-
}
|
|
10894
|
-
if (secure === true) {
|
|
10895
|
-
cookie.push('secure');
|
|
10896
|
-
}
|
|
10897
|
-
document.cookie = cookie.join('; ');
|
|
10898
|
-
},
|
|
10899
|
-
read: function read(name) {
|
|
10900
|
-
var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
10901
|
-
return match ? decodeURIComponent(match[3]) : null;
|
|
10902
|
-
},
|
|
10903
|
-
remove: function remove(name) {
|
|
10904
|
-
this.write(name, '', Date.now() - 86400000);
|
|
10905
|
-
}
|
|
10906
|
-
};
|
|
10907
|
-
}() : function nonStandardBrowserEnv() {
|
|
10908
|
-
return {
|
|
10909
|
-
write: function write() {},
|
|
10910
|
-
read: function read() {
|
|
10911
|
-
return null;
|
|
10912
|
-
},
|
|
10913
|
-
remove: function remove() {}
|
|
10914
|
-
};
|
|
10915
|
-
}();
|
|
10916
|
-
|
|
10917
|
-
var isAbsoluteURL = function isAbsoluteURL(url) {
|
|
10918
|
-
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
|
10919
|
-
};
|
|
10920
|
-
|
|
10921
|
-
var combineURLs = function combineURLs(baseURL, relativeURL) {
|
|
10922
|
-
return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
|
|
10923
|
-
};
|
|
10924
|
-
|
|
10925
|
-
var buildFullPath = function buildFullPath(baseURL, requestedURL) {
|
|
10926
|
-
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
10927
|
-
return combineURLs(baseURL, requestedURL);
|
|
10928
|
-
}
|
|
10929
|
-
return requestedURL;
|
|
10930
|
-
};
|
|
10931
|
-
|
|
10932
|
-
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'];
|
|
10933
|
-
var parseHeaders = function parseHeaders(headers) {
|
|
10934
|
-
var parsed = {};
|
|
10935
|
-
var key;
|
|
10936
|
-
var val;
|
|
10937
|
-
var i;
|
|
10938
|
-
if (!headers) {
|
|
10939
|
-
return parsed;
|
|
10940
|
-
}
|
|
10941
|
-
utils.forEach(headers.split('\n'), function parser(line) {
|
|
10942
|
-
i = line.indexOf(':');
|
|
10943
|
-
key = utils.trim(line.substr(0, i)).toLowerCase();
|
|
10944
|
-
val = utils.trim(line.substr(i + 1));
|
|
10945
|
-
if (key) {
|
|
10946
|
-
if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
|
10947
|
-
return;
|
|
10948
|
-
}
|
|
10949
|
-
if (key === 'set-cookie') {
|
|
10950
|
-
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
|
10951
|
-
} else {
|
|
10952
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
10953
|
-
}
|
|
10954
|
-
}
|
|
10955
|
-
});
|
|
10956
|
-
return parsed;
|
|
10957
|
-
};
|
|
10958
|
-
|
|
10959
|
-
var isURLSameOrigin = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
|
|
10960
|
-
var msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
10961
|
-
var urlParsingNode = document.createElement('a');
|
|
10962
|
-
var originURL;
|
|
10963
|
-
function resolveURL(url) {
|
|
10964
|
-
var href = url;
|
|
10965
|
-
if (msie) {
|
|
10966
|
-
urlParsingNode.setAttribute('href', href);
|
|
10967
|
-
href = urlParsingNode.href;
|
|
10968
|
-
}
|
|
10969
|
-
urlParsingNode.setAttribute('href', href);
|
|
10970
|
-
return {
|
|
10971
|
-
href: urlParsingNode.href,
|
|
10972
|
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
10973
|
-
host: urlParsingNode.host,
|
|
10974
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
10975
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
10976
|
-
hostname: urlParsingNode.hostname,
|
|
10977
|
-
port: urlParsingNode.port,
|
|
10978
|
-
pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname
|
|
10979
|
-
};
|
|
10980
|
-
}
|
|
10981
|
-
originURL = resolveURL(window.location.href);
|
|
10982
|
-
return function isURLSameOrigin(requestURL) {
|
|
10983
|
-
var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
10984
|
-
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
10985
|
-
};
|
|
10986
|
-
}() : function nonStandardBrowserEnv() {
|
|
10987
|
-
return function isURLSameOrigin() {
|
|
10988
|
-
return true;
|
|
10989
|
-
};
|
|
10990
|
-
}();
|
|
10991
|
-
|
|
10992
|
-
var xhr = function xhrAdapter(config) {
|
|
10993
|
-
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
10994
|
-
var requestData = config.data;
|
|
10995
|
-
var requestHeaders = config.headers;
|
|
10996
|
-
if (utils.isFormData(requestData)) {
|
|
10997
|
-
delete requestHeaders['Content-Type'];
|
|
10998
|
-
}
|
|
10999
|
-
var request = new XMLHttpRequest();
|
|
11000
|
-
if (config.auth) {
|
|
11001
|
-
var username = config.auth.username || '';
|
|
11002
|
-
var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
|
|
11003
|
-
requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
|
|
11004
|
-
}
|
|
11005
|
-
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
11006
|
-
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
11007
|
-
request.timeout = config.timeout;
|
|
11008
|
-
request.onreadystatechange = function handleLoad() {
|
|
11009
|
-
if (!request || request.readyState !== 4) {
|
|
11010
|
-
return;
|
|
11011
|
-
}
|
|
11012
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
11013
|
-
return;
|
|
11014
|
-
}
|
|
11015
|
-
var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
|
|
11016
|
-
var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
|
|
11017
|
-
var response = {
|
|
11018
|
-
data: responseData,
|
|
11019
|
-
status: request.status,
|
|
11020
|
-
statusText: request.statusText,
|
|
11021
|
-
headers: responseHeaders,
|
|
11022
|
-
config: config,
|
|
11023
|
-
request: request
|
|
11024
|
-
};
|
|
11025
|
-
settle(resolve, reject, response);
|
|
11026
|
-
request = null;
|
|
11027
|
-
};
|
|
11028
|
-
request.onabort = function handleAbort() {
|
|
11029
|
-
if (!request) {
|
|
11030
|
-
return;
|
|
11031
|
-
}
|
|
11032
|
-
reject(createError('Request aborted', config, 'ECONNABORTED', request));
|
|
11033
|
-
request = null;
|
|
11034
|
-
};
|
|
11035
|
-
request.onerror = function handleError() {
|
|
11036
|
-
reject(createError('Network Error', config, null, request));
|
|
11037
|
-
request = null;
|
|
11038
|
-
};
|
|
11039
|
-
request.ontimeout = function handleTimeout() {
|
|
11040
|
-
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
|
11041
|
-
if (config.timeoutErrorMessage) {
|
|
11042
|
-
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
11043
|
-
}
|
|
11044
|
-
reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', request));
|
|
11045
|
-
request = null;
|
|
11046
|
-
};
|
|
11047
|
-
if (utils.isStandardBrowserEnv()) {
|
|
11048
|
-
var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined;
|
|
11049
|
-
if (xsrfValue) {
|
|
11050
|
-
requestHeaders[config.xsrfHeaderName] = xsrfValue;
|
|
11051
|
-
}
|
|
11052
|
-
}
|
|
11053
|
-
if ('setRequestHeader' in request) {
|
|
11054
|
-
utils.forEach(requestHeaders, function setRequestHeader(val, key) {
|
|
11055
|
-
if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
|
|
11056
|
-
delete requestHeaders[key];
|
|
11057
|
-
} else {
|
|
11058
|
-
request.setRequestHeader(key, val);
|
|
11059
|
-
}
|
|
11060
|
-
});
|
|
11061
|
-
}
|
|
11062
|
-
if (!utils.isUndefined(config.withCredentials)) {
|
|
11063
|
-
request.withCredentials = !!config.withCredentials;
|
|
11064
|
-
}
|
|
11065
|
-
if (config.responseType) {
|
|
11066
|
-
try {
|
|
11067
|
-
request.responseType = config.responseType;
|
|
11068
|
-
} catch (e) {
|
|
11069
|
-
if (config.responseType !== 'json') {
|
|
11070
|
-
throw e;
|
|
11071
|
-
}
|
|
11072
|
-
}
|
|
11073
|
-
}
|
|
11074
|
-
if (typeof config.onDownloadProgress === 'function') {
|
|
11075
|
-
request.addEventListener('progress', config.onDownloadProgress);
|
|
11076
|
-
}
|
|
11077
|
-
if (typeof config.onUploadProgress === 'function' && request.upload) {
|
|
11078
|
-
request.upload.addEventListener('progress', config.onUploadProgress);
|
|
11079
|
-
}
|
|
11080
|
-
if (config.cancelToken) {
|
|
11081
|
-
config.cancelToken.promise.then(function onCanceled(cancel) {
|
|
11082
|
-
if (!request) {
|
|
11083
|
-
return;
|
|
11084
|
-
}
|
|
11085
|
-
request.abort();
|
|
11086
|
-
reject(cancel);
|
|
11087
|
-
request = null;
|
|
11088
|
-
});
|
|
11089
|
-
}
|
|
11090
|
-
if (!requestData) {
|
|
11091
|
-
requestData = null;
|
|
11092
|
-
}
|
|
11093
|
-
request.send(requestData);
|
|
11094
|
-
});
|
|
11095
|
-
};
|
|
11096
|
-
|
|
11097
|
-
var DEFAULT_CONTENT_TYPE = {
|
|
11098
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
11099
|
-
};
|
|
11100
|
-
function setContentTypeIfUnset(headers, value) {
|
|
11101
|
-
if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
|
|
11102
|
-
headers['Content-Type'] = value;
|
|
11103
|
-
}
|
|
11104
|
-
}
|
|
11105
|
-
function getDefaultAdapter() {
|
|
11106
|
-
var adapter;
|
|
11107
|
-
if (typeof XMLHttpRequest !== 'undefined') {
|
|
11108
|
-
adapter = xhr;
|
|
11109
|
-
} else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
|
|
11110
|
-
adapter = xhr;
|
|
11111
|
-
}
|
|
11112
|
-
return adapter;
|
|
11113
|
-
}
|
|
11114
|
-
var defaults = {
|
|
11115
|
-
adapter: getDefaultAdapter(),
|
|
11116
|
-
transformRequest: [function transformRequest(data, headers) {
|
|
11117
|
-
normalizeHeaderName(headers, 'Accept');
|
|
11118
|
-
normalizeHeaderName(headers, 'Content-Type');
|
|
11119
|
-
if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
|
|
11120
|
-
return data;
|
|
11121
|
-
}
|
|
11122
|
-
if (utils.isArrayBufferView(data)) {
|
|
11123
|
-
return data.buffer;
|
|
11124
|
-
}
|
|
11125
|
-
if (utils.isURLSearchParams(data)) {
|
|
11126
|
-
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
|
|
11127
|
-
return data.toString();
|
|
11128
|
-
}
|
|
11129
|
-
if (utils.isObject(data)) {
|
|
11130
|
-
setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
|
|
11131
|
-
return JSON.stringify(data);
|
|
11132
|
-
}
|
|
11133
|
-
return data;
|
|
11134
|
-
}],
|
|
11135
|
-
transformResponse: [function transformResponse(data) {
|
|
11136
|
-
if (typeof data === 'string') {
|
|
11137
|
-
try {
|
|
11138
|
-
data = JSON.parse(data);
|
|
11139
|
-
} catch (e) {}
|
|
11140
|
-
}
|
|
11141
|
-
return data;
|
|
11142
|
-
}],
|
|
11143
|
-
timeout: 0,
|
|
11144
|
-
xsrfCookieName: 'XSRF-TOKEN',
|
|
11145
|
-
xsrfHeaderName: 'X-XSRF-TOKEN',
|
|
11146
|
-
maxContentLength: -1,
|
|
11147
|
-
maxBodyLength: -1,
|
|
11148
|
-
validateStatus: function validateStatus(status) {
|
|
11149
|
-
return status >= 200 && status < 300;
|
|
11150
|
-
}
|
|
11151
|
-
};
|
|
11152
|
-
defaults.headers = {
|
|
11153
|
-
common: {
|
|
11154
|
-
'Accept': 'application/json, text/plain, */*'
|
|
11155
|
-
}
|
|
11156
|
-
};
|
|
11157
|
-
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
|
11158
|
-
defaults.headers[method] = {};
|
|
11159
|
-
});
|
|
11160
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
11161
|
-
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
|
11162
|
-
});
|
|
11163
|
-
var defaults_1 = defaults;
|
|
11164
|
-
|
|
11165
|
-
function throwIfCancellationRequested(config) {
|
|
11166
|
-
if (config.cancelToken) {
|
|
11167
|
-
config.cancelToken.throwIfRequested();
|
|
11168
|
-
}
|
|
11169
|
-
}
|
|
11170
|
-
var dispatchRequest = function dispatchRequest(config) {
|
|
11171
|
-
throwIfCancellationRequested(config);
|
|
11172
|
-
config.headers = config.headers || {};
|
|
11173
|
-
config.data = transformData(config.data, config.headers, config.transformRequest);
|
|
11174
|
-
config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
|
|
11175
|
-
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) {
|
|
11176
|
-
delete config.headers[method];
|
|
11177
|
-
});
|
|
11178
|
-
var adapter = config.adapter || defaults_1.adapter;
|
|
11179
|
-
return adapter(config).then(function onAdapterResolution(response) {
|
|
11180
|
-
throwIfCancellationRequested(config);
|
|
11181
|
-
response.data = transformData(response.data, response.headers, config.transformResponse);
|
|
11182
|
-
return response;
|
|
11183
|
-
}, function onAdapterRejection(reason) {
|
|
11184
|
-
if (!isCancel(reason)) {
|
|
11185
|
-
throwIfCancellationRequested(config);
|
|
11186
|
-
if (reason && reason.response) {
|
|
11187
|
-
reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse);
|
|
11188
|
-
}
|
|
11189
|
-
}
|
|
11190
|
-
return Promise.reject(reason);
|
|
11191
|
-
});
|
|
11192
|
-
};
|
|
11193
|
-
|
|
11194
|
-
var mergeConfig = function mergeConfig(config1, config2) {
|
|
11195
|
-
config2 = config2 || {};
|
|
11196
|
-
var config = {};
|
|
11197
|
-
var valueFromConfig2Keys = ['url', 'method', 'data'];
|
|
11198
|
-
var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
|
|
11199
|
-
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'];
|
|
11200
|
-
var directMergeKeys = ['validateStatus'];
|
|
11201
|
-
function getMergedValue(target, source) {
|
|
11202
|
-
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
11203
|
-
return utils.merge(target, source);
|
|
11204
|
-
} else if (utils.isPlainObject(source)) {
|
|
11205
|
-
return utils.merge({}, source);
|
|
11206
|
-
} else if (utils.isArray(source)) {
|
|
11207
|
-
return source.slice();
|
|
11208
|
-
}
|
|
11209
|
-
return source;
|
|
11210
|
-
}
|
|
11211
|
-
function mergeDeepProperties(prop) {
|
|
11212
|
-
if (!utils.isUndefined(config2[prop])) {
|
|
11213
|
-
config[prop] = getMergedValue(config1[prop], config2[prop]);
|
|
11214
|
-
} else if (!utils.isUndefined(config1[prop])) {
|
|
11215
|
-
config[prop] = getMergedValue(undefined, config1[prop]);
|
|
11216
|
-
}
|
|
11217
|
-
}
|
|
11218
|
-
utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
|
|
11219
|
-
if (!utils.isUndefined(config2[prop])) {
|
|
11220
|
-
config[prop] = getMergedValue(undefined, config2[prop]);
|
|
11221
|
-
}
|
|
11222
|
-
});
|
|
11223
|
-
utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
|
11224
|
-
utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
|
|
11225
|
-
if (!utils.isUndefined(config2[prop])) {
|
|
11226
|
-
config[prop] = getMergedValue(undefined, config2[prop]);
|
|
11227
|
-
} else if (!utils.isUndefined(config1[prop])) {
|
|
11228
|
-
config[prop] = getMergedValue(undefined, config1[prop]);
|
|
11229
|
-
}
|
|
11230
|
-
});
|
|
11231
|
-
utils.forEach(directMergeKeys, function merge(prop) {
|
|
11232
|
-
if (prop in config2) {
|
|
11233
|
-
config[prop] = getMergedValue(config1[prop], config2[prop]);
|
|
11234
|
-
} else if (prop in config1) {
|
|
11235
|
-
config[prop] = getMergedValue(undefined, config1[prop]);
|
|
11236
|
-
}
|
|
11237
|
-
});
|
|
11238
|
-
var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);
|
|
11239
|
-
var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key) {
|
|
11240
|
-
return axiosKeys.indexOf(key) === -1;
|
|
11241
|
-
});
|
|
11242
|
-
utils.forEach(otherKeys, mergeDeepProperties);
|
|
11243
|
-
return config;
|
|
11244
|
-
};
|
|
11245
|
-
|
|
11246
|
-
function Axios(instanceConfig) {
|
|
11247
|
-
this.defaults = instanceConfig;
|
|
11248
|
-
this.interceptors = {
|
|
11249
|
-
request: new InterceptorManager_1(),
|
|
11250
|
-
response: new InterceptorManager_1()
|
|
11251
|
-
};
|
|
11252
|
-
}
|
|
11253
|
-
Axios.prototype.request = function request(config) {
|
|
11254
|
-
if (typeof config === 'string') {
|
|
11255
|
-
config = arguments[1] || {};
|
|
11256
|
-
config.url = arguments[0];
|
|
11257
|
-
} else {
|
|
11258
|
-
config = config || {};
|
|
11259
|
-
}
|
|
11260
|
-
config = mergeConfig(this.defaults, config);
|
|
11261
|
-
if (config.method) {
|
|
11262
|
-
config.method = config.method.toLowerCase();
|
|
11263
|
-
} else if (this.defaults.method) {
|
|
11264
|
-
config.method = this.defaults.method.toLowerCase();
|
|
11265
|
-
} else {
|
|
11266
|
-
config.method = 'get';
|
|
11267
|
-
}
|
|
11268
|
-
var chain = [dispatchRequest, undefined];
|
|
11269
|
-
var promise = Promise.resolve(config);
|
|
11270
|
-
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
11271
|
-
chain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
11272
|
-
});
|
|
11273
|
-
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
11274
|
-
chain.push(interceptor.fulfilled, interceptor.rejected);
|
|
11275
|
-
});
|
|
11276
|
-
while (chain.length) {
|
|
11277
|
-
promise = promise.then(chain.shift(), chain.shift());
|
|
11278
|
-
}
|
|
11279
|
-
return promise;
|
|
11280
|
-
};
|
|
11281
|
-
Axios.prototype.getUri = function getUri(config) {
|
|
11282
|
-
config = mergeConfig(this.defaults, config);
|
|
11283
|
-
return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
|
|
11284
|
-
};
|
|
11285
|
-
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
11286
|
-
Axios.prototype[method] = function (url, config) {
|
|
11287
|
-
return this.request(mergeConfig(config || {}, {
|
|
11288
|
-
method: method,
|
|
11289
|
-
url: url,
|
|
11290
|
-
data: (config || {}).data
|
|
11291
|
-
}));
|
|
11292
|
-
};
|
|
11293
|
-
});
|
|
11294
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
11295
|
-
Axios.prototype[method] = function (url, data, config) {
|
|
11296
|
-
return this.request(mergeConfig(config || {}, {
|
|
11297
|
-
method: method,
|
|
11298
|
-
url: url,
|
|
11299
|
-
data: data
|
|
11300
|
-
}));
|
|
11301
|
-
};
|
|
11302
|
-
});
|
|
11303
|
-
var Axios_1 = Axios;
|
|
11304
|
-
|
|
11305
|
-
function Cancel(message) {
|
|
11306
|
-
this.message = message;
|
|
11307
|
-
}
|
|
11308
|
-
Cancel.prototype.toString = function toString() {
|
|
11309
|
-
return 'Cancel' + (this.message ? ': ' + this.message : '');
|
|
11310
|
-
};
|
|
11311
|
-
Cancel.prototype.__CANCEL__ = true;
|
|
11312
|
-
var Cancel_1 = Cancel;
|
|
11313
|
-
|
|
11314
|
-
function CancelToken(executor) {
|
|
11315
|
-
if (typeof executor !== 'function') {
|
|
11316
|
-
throw new TypeError('executor must be a function.');
|
|
11317
|
-
}
|
|
11318
|
-
var resolvePromise;
|
|
11319
|
-
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
11320
|
-
resolvePromise = resolve;
|
|
11321
|
-
});
|
|
11322
|
-
var token = this;
|
|
11323
|
-
executor(function cancel(message) {
|
|
11324
|
-
if (token.reason) {
|
|
11325
|
-
return;
|
|
11326
|
-
}
|
|
11327
|
-
token.reason = new Cancel_1(message);
|
|
11328
|
-
resolvePromise(token.reason);
|
|
11329
|
-
});
|
|
11330
|
-
}
|
|
11331
|
-
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
11332
|
-
if (this.reason) {
|
|
11333
|
-
throw this.reason;
|
|
11334
|
-
}
|
|
11335
|
-
};
|
|
11336
|
-
CancelToken.source = function source() {
|
|
11337
|
-
var cancel;
|
|
11338
|
-
var token = new CancelToken(function executor(c) {
|
|
11339
|
-
cancel = c;
|
|
11340
|
-
});
|
|
11341
|
-
return {
|
|
11342
|
-
token: token,
|
|
11343
|
-
cancel: cancel
|
|
11344
|
-
};
|
|
11345
|
-
};
|
|
11346
|
-
var CancelToken_1 = CancelToken;
|
|
11347
|
-
|
|
11348
|
-
var spread = function spread(callback) {
|
|
11349
|
-
return function wrap(arr) {
|
|
11350
|
-
return callback.apply(null, arr);
|
|
11351
|
-
};
|
|
11352
|
-
};
|
|
11353
|
-
|
|
11354
|
-
var isAxiosError = function isAxiosError(payload) {
|
|
11355
|
-
return typeof payload === 'object' && payload.isAxiosError === true;
|
|
11356
|
-
};
|
|
11357
|
-
|
|
11358
|
-
function createInstance(defaultConfig) {
|
|
11359
|
-
var context = new Axios_1(defaultConfig);
|
|
11360
|
-
var instance = bind(Axios_1.prototype.request, context);
|
|
11361
|
-
utils.extend(instance, Axios_1.prototype, context);
|
|
11362
|
-
utils.extend(instance, context);
|
|
11363
|
-
return instance;
|
|
11364
|
-
}
|
|
11365
|
-
var axios = createInstance(defaults_1);
|
|
11366
|
-
axios.Axios = Axios_1;
|
|
11367
|
-
axios.create = function create(instanceConfig) {
|
|
11368
|
-
return createInstance(mergeConfig(axios.defaults, instanceConfig));
|
|
11369
|
-
};
|
|
11370
|
-
axios.Cancel = Cancel_1;
|
|
11371
|
-
axios.CancelToken = CancelToken_1;
|
|
11372
|
-
axios.isCancel = isCancel;
|
|
11373
|
-
axios.all = function all(promises) {
|
|
11374
|
-
return Promise.all(promises);
|
|
11375
|
-
};
|
|
11376
|
-
axios.spread = spread;
|
|
11377
|
-
axios.isAxiosError = isAxiosError;
|
|
11378
|
-
var axios_1 = axios;
|
|
11379
|
-
var _default = axios;
|
|
11380
|
-
axios_1.default = _default;
|
|
11381
|
-
|
|
11382
10603
|
const MyChallanResult = ({
|
|
11383
10604
|
template,
|
|
11384
10605
|
header,
|
|
@@ -11391,10 +10612,9 @@ const MyChallanResult = ({
|
|
|
11391
10612
|
const userInfo = Digit.UserService.getUser();
|
|
11392
10613
|
const tenantId = localStorage.getItem("CITIZEN.CITY");
|
|
11393
10614
|
const [loader, setLoader] = useState(false);
|
|
11394
|
-
const [getChallanData, setChallanData] = useState();
|
|
10615
|
+
const [getChallanData, setChallanData] = useState([]);
|
|
11395
10616
|
const [filters, setFilters] = useState(null);
|
|
11396
10617
|
const [getCount, setCount] = useState();
|
|
11397
|
-
console.log("userInfo", userInfo);
|
|
11398
10618
|
let filter = window.location.href.split("/").pop();
|
|
11399
10619
|
let t1;
|
|
11400
10620
|
let off;
|
|
@@ -11421,28 +10641,24 @@ const MyChallanResult = ({
|
|
|
11421
10641
|
setFilters(initialFilters);
|
|
11422
10642
|
}, [filter, tenantId]);
|
|
11423
10643
|
const fetchChallans = async () => {
|
|
11424
|
-
console.log("filters", filters);
|
|
11425
10644
|
setLoader(true);
|
|
11426
10645
|
try {
|
|
11427
10646
|
const responseData = await Digit.GCService.search({
|
|
11428
10647
|
tenantId,
|
|
11429
10648
|
filters
|
|
11430
10649
|
});
|
|
11431
|
-
console.log("result", responseData);
|
|
11432
10650
|
setCount(responseData === null || responseData === void 0 ? void 0 : responseData.TotalCount);
|
|
11433
10651
|
setChallanData(responseData === null || responseData === void 0 ? void 0 : responseData.GarbageConnection);
|
|
11434
10652
|
setLoader(false);
|
|
11435
10653
|
} catch (error) {
|
|
11436
|
-
console.log("error", error);
|
|
11437
10654
|
setLoader(false);
|
|
11438
10655
|
}
|
|
11439
10656
|
};
|
|
11440
10657
|
useEffect(() => {
|
|
11441
|
-
console.log("filters", filters);
|
|
11442
10658
|
if (filters) fetchChallans();
|
|
11443
10659
|
}, [filters]);
|
|
11444
10660
|
const handleMakePayment = id => {
|
|
11445
|
-
history.push(`/digit-ui/citizen/payment/collect/
|
|
10661
|
+
history.push(`/digit-ui/citizen/payment/collect/GC.ONE_TIME_FEE/${id}/${tenantId}?tenantId=${tenantId}`);
|
|
11446
10662
|
};
|
|
11447
10663
|
const handleLoadMore = () => {
|
|
11448
10664
|
setFilters(prev => ({
|
|
@@ -11450,6 +10666,58 @@ const MyChallanResult = ({
|
|
|
11450
10666
|
limit: Number(prev.limit) + 5
|
|
11451
10667
|
}));
|
|
11452
10668
|
};
|
|
10669
|
+
const handleDiscontinue = async data => {
|
|
10670
|
+
console.log("data", data);
|
|
10671
|
+
setLoader(true);
|
|
10672
|
+
const payload = {
|
|
10673
|
+
GarbageConnection: {
|
|
10674
|
+
...data,
|
|
10675
|
+
applicationType: "DISCONNECT_GARBAGE_CONNECTION",
|
|
10676
|
+
processInstance: {
|
|
10677
|
+
...(data === null || data === void 0 ? void 0 : data.processInstance),
|
|
10678
|
+
action: "INITIATE"
|
|
10679
|
+
}
|
|
10680
|
+
},
|
|
10681
|
+
disconnectRequest: true
|
|
10682
|
+
};
|
|
10683
|
+
console.log("payload===", payload);
|
|
10684
|
+
try {
|
|
10685
|
+
const response = await Digit.GCService.create(payload);
|
|
10686
|
+
console.log("response", response);
|
|
10687
|
+
updateApplication(response === null || response === void 0 ? void 0 : response.GarbageConnection[0]);
|
|
10688
|
+
} catch (error) {
|
|
10689
|
+
setLoader(false);
|
|
10690
|
+
}
|
|
10691
|
+
};
|
|
10692
|
+
const updateApplication = async response => {
|
|
10693
|
+
console.log("uddated response", response);
|
|
10694
|
+
const payload = {
|
|
10695
|
+
GarbageConnection: {
|
|
10696
|
+
...response,
|
|
10697
|
+
processInstance: {
|
|
10698
|
+
...(response === null || response === void 0 ? void 0 : response.processInstance),
|
|
10699
|
+
action: "SUBMIT_APPLICATION"
|
|
10700
|
+
}
|
|
10701
|
+
}
|
|
10702
|
+
};
|
|
10703
|
+
console.log("payload===", payload);
|
|
10704
|
+
try {
|
|
10705
|
+
const _response = await Digit.GCService.update(payload);
|
|
10706
|
+
console.log("response", _response);
|
|
10707
|
+
await fetchChallans();
|
|
10708
|
+
} catch (error) {
|
|
10709
|
+
setLoader(false);
|
|
10710
|
+
}
|
|
10711
|
+
};
|
|
10712
|
+
const connectionCountMap = useMemo(() => {
|
|
10713
|
+
const map = {};
|
|
10714
|
+
getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.forEach(item => {
|
|
10715
|
+
if (item !== null && item !== void 0 && item.connectionNo) {
|
|
10716
|
+
map[item.connectionNo] = (map[item.connectionNo] || 0) + 1;
|
|
10717
|
+
}
|
|
10718
|
+
});
|
|
10719
|
+
return map;
|
|
10720
|
+
}, [getChallanData]);
|
|
11453
10721
|
return /*#__PURE__*/React.createElement("div", {
|
|
11454
10722
|
style: {
|
|
11455
10723
|
marginTop: "16px"
|
|
@@ -11459,6 +10727,8 @@ const MyChallanResult = ({
|
|
|
11459
10727
|
marginLeft: "8px"
|
|
11460
10728
|
}
|
|
11461
10729
|
}, t(header), " (", getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.length, ")"), getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.map((bill, index) => {
|
|
10730
|
+
const connectionCount = connectionCountMap[bill === null || bill === void 0 ? void 0 : bill.connectionNo] || 0;
|
|
10731
|
+
const showDiscontinueButton = bill.applicationStatus === "CONNECTION_ACTIVATED" && connectionCount === 1;
|
|
11462
10732
|
return /*#__PURE__*/React.createElement(Card, {
|
|
11463
10733
|
key: index
|
|
11464
10734
|
}, /*#__PURE__*/React.createElement(KeyNote, {
|
|
@@ -11479,9 +10749,16 @@ const MyChallanResult = ({
|
|
|
11479
10749
|
to: `/digit-ui/citizen/garbagecollection/application/${bill === null || bill === void 0 ? void 0 : bill.applicationNo}/${bill === null || bill === void 0 ? void 0 : bill.tenantId}`
|
|
11480
10750
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
11481
10751
|
label: t("CS_VIEW_DETAILS")
|
|
11482
|
-
})),
|
|
10752
|
+
})), showDiscontinueButton && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
10753
|
+
style: {
|
|
10754
|
+
width: "200px"
|
|
10755
|
+
},
|
|
10756
|
+
label: t("GC_DISCONTINUE_SERVICE"),
|
|
10757
|
+
onSubmit: () => handleDiscontinue(bill),
|
|
10758
|
+
disabled: loader
|
|
10759
|
+
}), bill.applicationStatus == "PENDING_FOR_PAYMENT" && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
11483
10760
|
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
|
|
11484
|
-
onSubmit: () => handleMakePayment(bill === null || bill === void 0 ? void 0 : bill.
|
|
10761
|
+
onSubmit: () => handleMakePayment(bill === null || bill === void 0 ? void 0 : bill.applicationNo)
|
|
11485
10762
|
})));
|
|
11486
10763
|
}), (getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.length) === 0 && !loader && /*#__PURE__*/React.createElement("p", {
|
|
11487
10764
|
style: {
|
|
@@ -11595,24 +10872,24 @@ function baseGetTag(value) {
|
|
|
11595
10872
|
}
|
|
11596
10873
|
var _baseGetTag = baseGetTag;
|
|
11597
10874
|
|
|
11598
|
-
function isObject
|
|
10875
|
+
function isObject(value) {
|
|
11599
10876
|
var type = typeof value;
|
|
11600
10877
|
return value != null && (type == 'object' || type == 'function');
|
|
11601
10878
|
}
|
|
11602
|
-
var isObject_1 = isObject
|
|
10879
|
+
var isObject_1 = isObject;
|
|
11603
10880
|
|
|
11604
10881
|
var asyncTag = '[object AsyncFunction]',
|
|
11605
10882
|
funcTag = '[object Function]',
|
|
11606
10883
|
genTag = '[object GeneratorFunction]',
|
|
11607
10884
|
proxyTag = '[object Proxy]';
|
|
11608
|
-
function isFunction
|
|
10885
|
+
function isFunction(value) {
|
|
11609
10886
|
if (!isObject_1(value)) {
|
|
11610
10887
|
return false;
|
|
11611
10888
|
}
|
|
11612
10889
|
var tag = _baseGetTag(value);
|
|
11613
10890
|
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
11614
10891
|
}
|
|
11615
|
-
var isFunction_1 = isFunction
|
|
10892
|
+
var isFunction_1 = isFunction;
|
|
11616
10893
|
|
|
11617
10894
|
var coreJsData = _root['__core-js_shared__'];
|
|
11618
10895
|
var _coreJsData = coreJsData;
|
|
@@ -12318,13 +11595,10 @@ const GCResponseCitizen = props => {
|
|
|
12318
11595
|
setChbPermissionLoading(false);
|
|
12319
11596
|
}
|
|
12320
11597
|
};
|
|
12321
|
-
const handlePayment = () => {
|
|
12322
|
-
history.push(`/digit-ui/employee/payment/collect/Challan_Generation/${applicationNumber}/${tenantId}?tenantId=${tenantId}`);
|
|
12323
|
-
};
|
|
12324
11598
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Banner, {
|
|
12325
11599
|
message: t("GC_APPLICATION_CREATED"),
|
|
12326
11600
|
applicationNumber: applicationNumber,
|
|
12327
|
-
info: (nocData === null || nocData === void 0 ? void 0 : nocData.applicationStatus) == "REJECTED" ? "" : t(`
|
|
11601
|
+
info: (nocData === null || nocData === void 0 ? void 0 : nocData.applicationStatus) == "REJECTED" ? "" : t(`APPLICATION_NUMBER`),
|
|
12328
11602
|
successful: (nocData === null || nocData === void 0 ? void 0 : nocData.applicationStatus) == "REJECTED" ? false : true,
|
|
12329
11603
|
style: {
|
|
12330
11604
|
padding: "10px"
|
|
@@ -12356,9 +11630,6 @@ const GCResponseCitizen = props => {
|
|
|
12356
11630
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
12357
11631
|
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
12358
11632
|
onSubmit: onSubmit
|
|
12359
|
-
}), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
12360
|
-
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
|
|
12361
|
-
onSubmit: handlePayment
|
|
12362
11633
|
}))), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
12363
11634
|
error: error,
|
|
12364
11635
|
label: getLable,
|
|
@@ -12381,8 +11652,9 @@ const ModalConfig = ({
|
|
|
12381
11652
|
businessService
|
|
12382
11653
|
}) => {
|
|
12383
11654
|
console.log("action=====", action);
|
|
11655
|
+
console.log("uploadedFile=====", uploadedFile);
|
|
12384
11656
|
let checkCondtions = true;
|
|
12385
|
-
if ((action === null || action === void 0 ? void 0 : action.action) == "
|
|
11657
|
+
if ((action === null || action === void 0 ? void 0 : action.action) == "SEND_BACK_TO_CITIZEN" || (action === null || action === void 0 ? void 0 : action.action) == "ACTIVATE_CONNECTION" || (action === null || action === void 0 ? void 0 : action.action) == "REJECT" || (action === null || action === void 0 ? void 0 : action.action) == "SENDBACK" || (action === null || action === void 0 ? void 0 : action.action) == "VERIFIED" || (action === null || action === void 0 ? void 0 : action.action) == "SEND_BACK_FOR_DOCUMENT_VERIFICATION") checkCondtions = false;
|
|
12386
11658
|
if (action.isTerminateState) checkCondtions = false;
|
|
12387
11659
|
console.log("action=====", action.action);
|
|
12388
11660
|
return {
|
|
@@ -12458,13 +11730,19 @@ const NDCModal = ({
|
|
|
12458
11730
|
errorOne,
|
|
12459
11731
|
closeToastOne,
|
|
12460
11732
|
getEmployees,
|
|
12461
|
-
tenantId
|
|
11733
|
+
tenantId,
|
|
11734
|
+
businessService,
|
|
11735
|
+
loader,
|
|
11736
|
+
setLoader
|
|
12462
11737
|
}) => {
|
|
12463
11738
|
const [config, setConfig] = useState({});
|
|
12464
11739
|
const [getAmount, setAmount] = useState();
|
|
12465
11740
|
const [approvers, setApprovers] = useState([]);
|
|
11741
|
+
const [selectedApprover, setSelectedApprover] = useState({});
|
|
11742
|
+
const [file, setFile] = useState(null);
|
|
11743
|
+
const [uploadedFile, setUploadedFile] = useState(null);
|
|
11744
|
+
const [error, setError] = useState(null);
|
|
12466
11745
|
const allRolesNew = [...new Set(getEmployees === null || getEmployees === void 0 ? void 0 : getEmployees.flatMap(a => a.roles))];
|
|
12467
|
-
console.log("allRolesNew", allRolesNew);
|
|
12468
11746
|
const {
|
|
12469
11747
|
data: approverData,
|
|
12470
11748
|
isLoading: PTALoading
|
|
@@ -12496,11 +11774,53 @@ const NDCModal = ({
|
|
|
12496
11774
|
}));
|
|
12497
11775
|
}
|
|
12498
11776
|
}, [approverData]);
|
|
11777
|
+
function selectFile(e) {
|
|
11778
|
+
setFile(e.target.files[0]);
|
|
11779
|
+
}
|
|
11780
|
+
useEffect(() => {
|
|
11781
|
+
(async () => {
|
|
11782
|
+
setError(null);
|
|
11783
|
+
if (file) {
|
|
11784
|
+
if (file.size >= 5242880) {
|
|
11785
|
+
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
11786
|
+
} else {
|
|
11787
|
+
setLoader(true);
|
|
11788
|
+
try {
|
|
11789
|
+
var _response$data, _response$data$files;
|
|
11790
|
+
const response = await Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId());
|
|
11791
|
+
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
11792
|
+
var _response$data2, _response$data2$files;
|
|
11793
|
+
setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId);
|
|
11794
|
+
} else {
|
|
11795
|
+
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
11796
|
+
}
|
|
11797
|
+
setLoader(false);
|
|
11798
|
+
} catch (err) {
|
|
11799
|
+
setLoader(false);
|
|
11800
|
+
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
11801
|
+
}
|
|
11802
|
+
}
|
|
11803
|
+
}
|
|
11804
|
+
})();
|
|
11805
|
+
}, [file]);
|
|
12499
11806
|
function submit(data) {
|
|
11807
|
+
console.log("data", data);
|
|
11808
|
+
console.log("selectedApprover", selectedApprover);
|
|
12500
11809
|
const payload = {
|
|
12501
|
-
|
|
11810
|
+
action: action === null || action === void 0 ? void 0 : action.action,
|
|
11811
|
+
comment: data === null || data === void 0 ? void 0 : data.comments,
|
|
11812
|
+
assignes: !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid) ? null : [{
|
|
11813
|
+
uuid: selectedApprover === null || selectedApprover === void 0 ? void 0 : selectedApprover.uuid
|
|
11814
|
+
}],
|
|
11815
|
+
documents: uploadedFile ? [{
|
|
11816
|
+
documentType: file === null || file === void 0 ? void 0 : file.type,
|
|
11817
|
+
documentUid: file === null || file === void 0 ? void 0 : file.name,
|
|
11818
|
+
fileStoreId: uploadedFile
|
|
11819
|
+
}] : null
|
|
12502
11820
|
};
|
|
12503
|
-
submitAction(
|
|
11821
|
+
submitAction({
|
|
11822
|
+
Licenses: [payload]
|
|
11823
|
+
});
|
|
12504
11824
|
}
|
|
12505
11825
|
useEffect(() => {
|
|
12506
11826
|
if (action) {
|
|
@@ -12508,10 +11828,16 @@ const NDCModal = ({
|
|
|
12508
11828
|
t,
|
|
12509
11829
|
action,
|
|
12510
11830
|
setAmount,
|
|
12511
|
-
approvers
|
|
11831
|
+
approvers,
|
|
11832
|
+
selectedApprover,
|
|
11833
|
+
setSelectedApprover,
|
|
11834
|
+
uploadedFile,
|
|
11835
|
+
selectFile,
|
|
11836
|
+
setUploadedFile,
|
|
11837
|
+
businessService
|
|
12512
11838
|
}));
|
|
12513
11839
|
}
|
|
12514
|
-
}, [action, approvers]);
|
|
11840
|
+
}, [action, approvers, selectedApprover, uploadedFile]);
|
|
12515
11841
|
if (!action || !config.form) return null;
|
|
12516
11842
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
12517
11843
|
headerBarMain: /*#__PURE__*/React.createElement(Heading, {
|
|
@@ -12537,7 +11863,7 @@ const NDCModal = ({
|
|
|
12537
11863
|
label: errorOne,
|
|
12538
11864
|
isDleteBtn: true,
|
|
12539
11865
|
onClose: closeToastOne
|
|
12540
|
-
}), PTALoading && /*#__PURE__*/React.createElement(Loader, {
|
|
11866
|
+
}), (PTALoading || loader) && /*#__PURE__*/React.createElement(Loader, {
|
|
12541
11867
|
page: true
|
|
12542
11868
|
}));
|
|
12543
11869
|
};
|
|
@@ -12584,6 +11910,7 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12584
11910
|
const {
|
|
12585
11911
|
t
|
|
12586
11912
|
} = useTranslation();
|
|
11913
|
+
const history = useHistory();
|
|
12587
11914
|
const {
|
|
12588
11915
|
acknowledgementIds,
|
|
12589
11916
|
id
|
|
@@ -12591,14 +11918,8 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12591
11918
|
const [showToast, setShowToast] = useState(false);
|
|
12592
11919
|
const [getLable, setLable] = useState(false);
|
|
12593
11920
|
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
12594
|
-
const [showOptions, setShowOptions] = useState(false);
|
|
12595
|
-
const {
|
|
12596
|
-
data: storeData
|
|
12597
|
-
} = Digit.Hooks.useStore.getInitData();
|
|
12598
11921
|
const [loader, setLoader] = useState(false);
|
|
12599
11922
|
const [getChallanData, setChallanData] = useState();
|
|
12600
|
-
const [chbPermissionLoading, setChbPermissionLoading] = useState(false);
|
|
12601
|
-
const [printing, setPrinting] = useState(false);
|
|
12602
11923
|
const [error, setError] = useState("");
|
|
12603
11924
|
const [getWorkflowService, setWorkflowService] = useState([]);
|
|
12604
11925
|
const [displayMenu, setDisplayMenu] = useState(false);
|
|
@@ -12608,7 +11929,6 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12608
11929
|
const [getEmployees, setEmployees] = useState([]);
|
|
12609
11930
|
const [errorOne, setErrorOne] = useState(null);
|
|
12610
11931
|
const menuRef = useRef();
|
|
12611
|
-
console.log("acknowledgementIds", acknowledgementIds, id);
|
|
12612
11932
|
const fetchChallans = async filters => {
|
|
12613
11933
|
setLoader(true);
|
|
12614
11934
|
try {
|
|
@@ -12617,15 +11937,12 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12617
11937
|
tenantId,
|
|
12618
11938
|
filters
|
|
12619
11939
|
});
|
|
12620
|
-
console.log("search ", responseData);
|
|
12621
11940
|
setChallanData(responseData === null || responseData === void 0 ? void 0 : (_responseData$Garbage = responseData.GarbageConnection) === null || _responseData$Garbage === void 0 ? void 0 : _responseData$Garbage[0]);
|
|
12622
11941
|
setLoader(false);
|
|
12623
11942
|
} catch (error) {
|
|
12624
|
-
console.log("error", error);
|
|
12625
11943
|
setLoader(false);
|
|
12626
11944
|
}
|
|
12627
11945
|
};
|
|
12628
|
-
let challanEmpData = ChallanData(tenantId, id);
|
|
12629
11946
|
useEffect(() => {
|
|
12630
11947
|
if (id) {
|
|
12631
11948
|
const filters = {};
|
|
@@ -12649,7 +11966,10 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12649
11966
|
const closeToast = () => {
|
|
12650
11967
|
setShowToast(null);
|
|
12651
11968
|
};
|
|
12652
|
-
|
|
11969
|
+
const closeMenu = () => {
|
|
11970
|
+
setDisplayMenu(false);
|
|
11971
|
+
};
|
|
11972
|
+
Digit.Hooks.useClickOutside(menuRef, closeMenu, displayMenu);
|
|
12653
11973
|
if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data = workflowDetails.data) !== null && _workflowDetails$data !== void 0 && (_workflowDetails$data2 = _workflowDetails$data.actionState) !== null && _workflowDetails$data2 !== void 0 && _workflowDetails$data2.nextActions && !workflowDetails.isLoading) workflowDetails.data.actionState.nextActions = [...(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.nextActions)];
|
|
12654
11974
|
if (workflowDetails && workflowDetails.data && !workflowDetails.isLoading) {
|
|
12655
11975
|
var _workflowDetails$data4, _workflowDetails$data5;
|
|
@@ -12678,27 +11998,59 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12678
11998
|
(async (_WorkflowService, _WorkflowService$Busi, _WorkflowService$Busi2) => {
|
|
12679
11999
|
setLoader(true);
|
|
12680
12000
|
WorkflowService = await Digit.WorkflowService.init(tenantId, "NewGC");
|
|
12681
|
-
console.log("WorkflowService===", WorkflowService);
|
|
12682
12001
|
setLoader(false);
|
|
12683
12002
|
setWorkflowService((_WorkflowService = WorkflowService) === null || _WorkflowService === void 0 ? void 0 : (_WorkflowService$Busi = _WorkflowService.BusinessServices) === null || _WorkflowService$Busi === void 0 ? void 0 : (_WorkflowService$Busi2 = _WorkflowService$Busi[0]) === null || _WorkflowService$Busi2 === void 0 ? void 0 : _WorkflowService$Busi2.states);
|
|
12684
12003
|
})();
|
|
12685
12004
|
}, [tenantId]);
|
|
12686
12005
|
function onActionSelect(action) {
|
|
12687
12006
|
var _action$state, _action$state$actions, _filterRoles$;
|
|
12688
|
-
|
|
12007
|
+
if ((action === null || action === void 0 ? void 0 : action.action) == "PAY") {
|
|
12008
|
+
history.push(`/digit-ui/employee/payment/collect/GC.ONE_TIME_FEE/${id}/${tenantId}?tenantId=${tenantId}`);
|
|
12009
|
+
}
|
|
12689
12010
|
const filterNexState = action === null || action === void 0 ? void 0 : (_action$state = action.state) === null || _action$state === void 0 ? void 0 : (_action$state$actions = _action$state.actions) === null || _action$state$actions === void 0 ? void 0 : _action$state$actions.filter(item => item.action == (action === null || action === void 0 ? void 0 : action.action));
|
|
12690
12011
|
const filterRoles = getWorkflowService === null || getWorkflowService === void 0 ? void 0 : getWorkflowService.filter(item => {
|
|
12691
12012
|
var _filterNexState$;
|
|
12692
12013
|
return (item === null || item === void 0 ? void 0 : item.uuid) == ((_filterNexState$ = filterNexState[0]) === null || _filterNexState$ === void 0 ? void 0 : _filterNexState$.nextState);
|
|
12693
12014
|
});
|
|
12694
|
-
console.log("filterRoles", filterRoles);
|
|
12695
12015
|
setEmployees(filterRoles === null || filterRoles === void 0 ? void 0 : (_filterRoles$ = filterRoles[0]) === null || _filterRoles$ === void 0 ? void 0 : _filterRoles$.actions);
|
|
12696
12016
|
setShowModal(true);
|
|
12697
12017
|
setSelectedAction(action);
|
|
12698
12018
|
}
|
|
12699
12019
|
const submitAction = async modalData => {
|
|
12700
|
-
|
|
12701
|
-
|
|
12020
|
+
const action = modalData === null || modalData === void 0 ? void 0 : modalData.Licenses[0];
|
|
12021
|
+
if (!(action !== null && action !== void 0 && action.assignes) && action.action !== "SEND_BACK_TO_CITIZEN" && action.action !== "ACTIVATE_CONNECTION" && action.action !== "REJECT" && action.action !== "SEND_BACK_FOR_DOCUMENT_VERIFICATION") {
|
|
12022
|
+
setErrorOne("Assignee is Mandatory");
|
|
12023
|
+
setShowErrorToastt(true);
|
|
12024
|
+
return;
|
|
12025
|
+
} else if (!(action !== null && action !== void 0 && action.comment)) {
|
|
12026
|
+
setErrorOne("Comment is Mandatory");
|
|
12027
|
+
setShowErrorToastt(true);
|
|
12028
|
+
return;
|
|
12029
|
+
}
|
|
12030
|
+
setLoader(true);
|
|
12031
|
+
const payload = {
|
|
12032
|
+
GarbageConnection: {
|
|
12033
|
+
...getChallanData,
|
|
12034
|
+
processInstance: {
|
|
12035
|
+
...(getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.processInstance),
|
|
12036
|
+
...(modalData === null || modalData === void 0 ? void 0 : modalData.Licenses[0])
|
|
12037
|
+
}
|
|
12038
|
+
}
|
|
12039
|
+
};
|
|
12040
|
+
try {
|
|
12041
|
+
const response = await Digit.GCService.update(payload);
|
|
12042
|
+
setLoader(false);
|
|
12043
|
+
setShowModal(false);
|
|
12044
|
+
setLable("Status is Updated");
|
|
12045
|
+
setError(false);
|
|
12046
|
+
setShowToast(true);
|
|
12047
|
+
setTimeout(() => {
|
|
12048
|
+
history.push("/digit-ui/employee/garbagecollection/inbox");
|
|
12049
|
+
window.location.reload();
|
|
12050
|
+
}, 2000);
|
|
12051
|
+
} catch (error) {
|
|
12052
|
+
setLoader(false);
|
|
12053
|
+
}
|
|
12702
12054
|
};
|
|
12703
12055
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
12704
12056
|
style: {
|
|
@@ -12809,7 +12161,9 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12809
12161
|
errorOne: errorOne,
|
|
12810
12162
|
closeToastOne: closeToastOne,
|
|
12811
12163
|
getLable: getLable,
|
|
12812
|
-
getChallanData: getChallanData
|
|
12164
|
+
getChallanData: getChallanData,
|
|
12165
|
+
loader: loader,
|
|
12166
|
+
setLoader: setLoader
|
|
12813
12167
|
}) : null, showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
12814
12168
|
isDleteBtn: true,
|
|
12815
12169
|
error: error,
|