@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.js
CHANGED
|
@@ -9579,7 +9579,7 @@ function ChallanDocument(_ref2) {
|
|
|
9579
9579
|
}
|
|
9580
9580
|
|
|
9581
9581
|
function CHBSummary(_ref) {
|
|
9582
|
-
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;
|
|
9582
|
+
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;
|
|
9583
9583
|
let {
|
|
9584
9584
|
formData,
|
|
9585
9585
|
goNext,
|
|
@@ -9672,7 +9672,13 @@ function CHBSummary(_ref) {
|
|
|
9672
9672
|
style: {
|
|
9673
9673
|
fontSize: "24px"
|
|
9674
9674
|
}
|
|
9675
|
-
}, 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__default.createElement(
|
|
9675
|
+
}, 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__default.createElement("div", {
|
|
9676
|
+
style: sectionStyle
|
|
9677
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
|
|
9678
|
+
style: {
|
|
9679
|
+
fontSize: "24px"
|
|
9680
|
+
}
|
|
9681
|
+
}, 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__default.createElement(digitUiReactComponents.CardSubHeader, {
|
|
9676
9682
|
style: {
|
|
9677
9683
|
fontSize: "24px",
|
|
9678
9684
|
marginTop: "30px"
|
|
@@ -10688,791 +10694,6 @@ const config = [{
|
|
|
10688
10694
|
}]
|
|
10689
10695
|
}];
|
|
10690
10696
|
|
|
10691
|
-
var bind = function bind(fn, thisArg) {
|
|
10692
|
-
return function wrap() {
|
|
10693
|
-
var args = new Array(arguments.length);
|
|
10694
|
-
for (var i = 0; i < args.length; i++) {
|
|
10695
|
-
args[i] = arguments[i];
|
|
10696
|
-
}
|
|
10697
|
-
return fn.apply(thisArg, args);
|
|
10698
|
-
};
|
|
10699
|
-
};
|
|
10700
|
-
|
|
10701
|
-
var toString = Object.prototype.toString;
|
|
10702
|
-
function isArray(val) {
|
|
10703
|
-
return toString.call(val) === '[object Array]';
|
|
10704
|
-
}
|
|
10705
|
-
function isUndefined(val) {
|
|
10706
|
-
return typeof val === 'undefined';
|
|
10707
|
-
}
|
|
10708
|
-
function isBuffer(val) {
|
|
10709
|
-
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
|
|
10710
|
-
}
|
|
10711
|
-
function isArrayBuffer(val) {
|
|
10712
|
-
return toString.call(val) === '[object ArrayBuffer]';
|
|
10713
|
-
}
|
|
10714
|
-
function isFormData(val) {
|
|
10715
|
-
return typeof FormData !== 'undefined' && val instanceof FormData;
|
|
10716
|
-
}
|
|
10717
|
-
function isArrayBufferView(val) {
|
|
10718
|
-
var result;
|
|
10719
|
-
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
10720
|
-
result = ArrayBuffer.isView(val);
|
|
10721
|
-
} else {
|
|
10722
|
-
result = val && val.buffer && val.buffer instanceof ArrayBuffer;
|
|
10723
|
-
}
|
|
10724
|
-
return result;
|
|
10725
|
-
}
|
|
10726
|
-
function isString(val) {
|
|
10727
|
-
return typeof val === 'string';
|
|
10728
|
-
}
|
|
10729
|
-
function isNumber(val) {
|
|
10730
|
-
return typeof val === 'number';
|
|
10731
|
-
}
|
|
10732
|
-
function isObject(val) {
|
|
10733
|
-
return val !== null && typeof val === 'object';
|
|
10734
|
-
}
|
|
10735
|
-
function isPlainObject(val) {
|
|
10736
|
-
if (toString.call(val) !== '[object Object]') {
|
|
10737
|
-
return false;
|
|
10738
|
-
}
|
|
10739
|
-
var prototype = Object.getPrototypeOf(val);
|
|
10740
|
-
return prototype === null || prototype === Object.prototype;
|
|
10741
|
-
}
|
|
10742
|
-
function isDate$1(val) {
|
|
10743
|
-
return toString.call(val) === '[object Date]';
|
|
10744
|
-
}
|
|
10745
|
-
function isFile(val) {
|
|
10746
|
-
return toString.call(val) === '[object File]';
|
|
10747
|
-
}
|
|
10748
|
-
function isBlob(val) {
|
|
10749
|
-
return toString.call(val) === '[object Blob]';
|
|
10750
|
-
}
|
|
10751
|
-
function isFunction(val) {
|
|
10752
|
-
return toString.call(val) === '[object Function]';
|
|
10753
|
-
}
|
|
10754
|
-
function isStream(val) {
|
|
10755
|
-
return isObject(val) && isFunction(val.pipe);
|
|
10756
|
-
}
|
|
10757
|
-
function isURLSearchParams(val) {
|
|
10758
|
-
return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
|
|
10759
|
-
}
|
|
10760
|
-
function trim(str) {
|
|
10761
|
-
return str.replace(/^\s*/, '').replace(/\s*$/, '');
|
|
10762
|
-
}
|
|
10763
|
-
function isStandardBrowserEnv() {
|
|
10764
|
-
if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) {
|
|
10765
|
-
return false;
|
|
10766
|
-
}
|
|
10767
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
10768
|
-
}
|
|
10769
|
-
function forEach(obj, fn) {
|
|
10770
|
-
if (obj === null || typeof obj === 'undefined') {
|
|
10771
|
-
return;
|
|
10772
|
-
}
|
|
10773
|
-
if (typeof obj !== 'object') {
|
|
10774
|
-
obj = [obj];
|
|
10775
|
-
}
|
|
10776
|
-
if (isArray(obj)) {
|
|
10777
|
-
for (var i = 0, l = obj.length; i < l; i++) {
|
|
10778
|
-
fn.call(null, obj[i], i, obj);
|
|
10779
|
-
}
|
|
10780
|
-
} else {
|
|
10781
|
-
for (var key in obj) {
|
|
10782
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
10783
|
-
fn.call(null, obj[key], key, obj);
|
|
10784
|
-
}
|
|
10785
|
-
}
|
|
10786
|
-
}
|
|
10787
|
-
}
|
|
10788
|
-
function merge() {
|
|
10789
|
-
var result = {};
|
|
10790
|
-
function assignValue(val, key) {
|
|
10791
|
-
if (isPlainObject(result[key]) && isPlainObject(val)) {
|
|
10792
|
-
result[key] = merge(result[key], val);
|
|
10793
|
-
} else if (isPlainObject(val)) {
|
|
10794
|
-
result[key] = merge({}, val);
|
|
10795
|
-
} else if (isArray(val)) {
|
|
10796
|
-
result[key] = val.slice();
|
|
10797
|
-
} else {
|
|
10798
|
-
result[key] = val;
|
|
10799
|
-
}
|
|
10800
|
-
}
|
|
10801
|
-
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
10802
|
-
forEach(arguments[i], assignValue);
|
|
10803
|
-
}
|
|
10804
|
-
return result;
|
|
10805
|
-
}
|
|
10806
|
-
function extend(a, b, thisArg) {
|
|
10807
|
-
forEach(b, function assignValue(val, key) {
|
|
10808
|
-
if (thisArg && typeof val === 'function') {
|
|
10809
|
-
a[key] = bind(val, thisArg);
|
|
10810
|
-
} else {
|
|
10811
|
-
a[key] = val;
|
|
10812
|
-
}
|
|
10813
|
-
});
|
|
10814
|
-
return a;
|
|
10815
|
-
}
|
|
10816
|
-
function stripBOM(content) {
|
|
10817
|
-
if (content.charCodeAt(0) === 0xFEFF) {
|
|
10818
|
-
content = content.slice(1);
|
|
10819
|
-
}
|
|
10820
|
-
return content;
|
|
10821
|
-
}
|
|
10822
|
-
var utils = {
|
|
10823
|
-
isArray: isArray,
|
|
10824
|
-
isArrayBuffer: isArrayBuffer,
|
|
10825
|
-
isBuffer: isBuffer,
|
|
10826
|
-
isFormData: isFormData,
|
|
10827
|
-
isArrayBufferView: isArrayBufferView,
|
|
10828
|
-
isString: isString,
|
|
10829
|
-
isNumber: isNumber,
|
|
10830
|
-
isObject: isObject,
|
|
10831
|
-
isPlainObject: isPlainObject,
|
|
10832
|
-
isUndefined: isUndefined,
|
|
10833
|
-
isDate: isDate$1,
|
|
10834
|
-
isFile: isFile,
|
|
10835
|
-
isBlob: isBlob,
|
|
10836
|
-
isFunction: isFunction,
|
|
10837
|
-
isStream: isStream,
|
|
10838
|
-
isURLSearchParams: isURLSearchParams,
|
|
10839
|
-
isStandardBrowserEnv: isStandardBrowserEnv,
|
|
10840
|
-
forEach: forEach,
|
|
10841
|
-
merge: merge,
|
|
10842
|
-
extend: extend,
|
|
10843
|
-
trim: trim,
|
|
10844
|
-
stripBOM: stripBOM
|
|
10845
|
-
};
|
|
10846
|
-
|
|
10847
|
-
function encode(val) {
|
|
10848
|
-
return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');
|
|
10849
|
-
}
|
|
10850
|
-
var buildURL = function buildURL(url, params, paramsSerializer) {
|
|
10851
|
-
if (!params) {
|
|
10852
|
-
return url;
|
|
10853
|
-
}
|
|
10854
|
-
var serializedParams;
|
|
10855
|
-
if (paramsSerializer) {
|
|
10856
|
-
serializedParams = paramsSerializer(params);
|
|
10857
|
-
} else if (utils.isURLSearchParams(params)) {
|
|
10858
|
-
serializedParams = params.toString();
|
|
10859
|
-
} else {
|
|
10860
|
-
var parts = [];
|
|
10861
|
-
utils.forEach(params, function serialize(val, key) {
|
|
10862
|
-
if (val === null || typeof val === 'undefined') {
|
|
10863
|
-
return;
|
|
10864
|
-
}
|
|
10865
|
-
if (utils.isArray(val)) {
|
|
10866
|
-
key = key + '[]';
|
|
10867
|
-
} else {
|
|
10868
|
-
val = [val];
|
|
10869
|
-
}
|
|
10870
|
-
utils.forEach(val, function parseValue(v) {
|
|
10871
|
-
if (utils.isDate(v)) {
|
|
10872
|
-
v = v.toISOString();
|
|
10873
|
-
} else if (utils.isObject(v)) {
|
|
10874
|
-
v = JSON.stringify(v);
|
|
10875
|
-
}
|
|
10876
|
-
parts.push(encode(key) + '=' + encode(v));
|
|
10877
|
-
});
|
|
10878
|
-
});
|
|
10879
|
-
serializedParams = parts.join('&');
|
|
10880
|
-
}
|
|
10881
|
-
if (serializedParams) {
|
|
10882
|
-
var hashmarkIndex = url.indexOf('#');
|
|
10883
|
-
if (hashmarkIndex !== -1) {
|
|
10884
|
-
url = url.slice(0, hashmarkIndex);
|
|
10885
|
-
}
|
|
10886
|
-
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
|
10887
|
-
}
|
|
10888
|
-
return url;
|
|
10889
|
-
};
|
|
10890
|
-
|
|
10891
|
-
function InterceptorManager() {
|
|
10892
|
-
this.handlers = [];
|
|
10893
|
-
}
|
|
10894
|
-
InterceptorManager.prototype.use = function use(fulfilled, rejected) {
|
|
10895
|
-
this.handlers.push({
|
|
10896
|
-
fulfilled: fulfilled,
|
|
10897
|
-
rejected: rejected
|
|
10898
|
-
});
|
|
10899
|
-
return this.handlers.length - 1;
|
|
10900
|
-
};
|
|
10901
|
-
InterceptorManager.prototype.eject = function eject(id) {
|
|
10902
|
-
if (this.handlers[id]) {
|
|
10903
|
-
this.handlers[id] = null;
|
|
10904
|
-
}
|
|
10905
|
-
};
|
|
10906
|
-
InterceptorManager.prototype.forEach = function forEach(fn) {
|
|
10907
|
-
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
10908
|
-
if (h !== null) {
|
|
10909
|
-
fn(h);
|
|
10910
|
-
}
|
|
10911
|
-
});
|
|
10912
|
-
};
|
|
10913
|
-
var InterceptorManager_1 = InterceptorManager;
|
|
10914
|
-
|
|
10915
|
-
var transformData = function transformData(data, headers, fns) {
|
|
10916
|
-
utils.forEach(fns, function transform(fn) {
|
|
10917
|
-
data = fn(data, headers);
|
|
10918
|
-
});
|
|
10919
|
-
return data;
|
|
10920
|
-
};
|
|
10921
|
-
|
|
10922
|
-
var isCancel = function isCancel(value) {
|
|
10923
|
-
return !!(value && value.__CANCEL__);
|
|
10924
|
-
};
|
|
10925
|
-
|
|
10926
|
-
var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {
|
|
10927
|
-
utils.forEach(headers, function processHeader(value, name) {
|
|
10928
|
-
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
|
10929
|
-
headers[normalizedName] = value;
|
|
10930
|
-
delete headers[name];
|
|
10931
|
-
}
|
|
10932
|
-
});
|
|
10933
|
-
};
|
|
10934
|
-
|
|
10935
|
-
var enhanceError = function enhanceError(error, config, code, request, response) {
|
|
10936
|
-
error.config = config;
|
|
10937
|
-
if (code) {
|
|
10938
|
-
error.code = code;
|
|
10939
|
-
}
|
|
10940
|
-
error.request = request;
|
|
10941
|
-
error.response = response;
|
|
10942
|
-
error.isAxiosError = true;
|
|
10943
|
-
error.toJSON = function toJSON() {
|
|
10944
|
-
return {
|
|
10945
|
-
message: this.message,
|
|
10946
|
-
name: this.name,
|
|
10947
|
-
description: this.description,
|
|
10948
|
-
number: this.number,
|
|
10949
|
-
fileName: this.fileName,
|
|
10950
|
-
lineNumber: this.lineNumber,
|
|
10951
|
-
columnNumber: this.columnNumber,
|
|
10952
|
-
stack: this.stack,
|
|
10953
|
-
config: this.config,
|
|
10954
|
-
code: this.code
|
|
10955
|
-
};
|
|
10956
|
-
};
|
|
10957
|
-
return error;
|
|
10958
|
-
};
|
|
10959
|
-
|
|
10960
|
-
var createError = function createError(message, config, code, request, response) {
|
|
10961
|
-
var error = new Error(message);
|
|
10962
|
-
return enhanceError(error, config, code, request, response);
|
|
10963
|
-
};
|
|
10964
|
-
|
|
10965
|
-
var settle = function settle(resolve, reject, response) {
|
|
10966
|
-
var validateStatus = response.config.validateStatus;
|
|
10967
|
-
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
10968
|
-
resolve(response);
|
|
10969
|
-
} else {
|
|
10970
|
-
reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));
|
|
10971
|
-
}
|
|
10972
|
-
};
|
|
10973
|
-
|
|
10974
|
-
var cookies = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
|
|
10975
|
-
return {
|
|
10976
|
-
write: function write(name, value, expires, path, domain, secure) {
|
|
10977
|
-
var cookie = [];
|
|
10978
|
-
cookie.push(name + '=' + encodeURIComponent(value));
|
|
10979
|
-
if (utils.isNumber(expires)) {
|
|
10980
|
-
cookie.push('expires=' + new Date(expires).toGMTString());
|
|
10981
|
-
}
|
|
10982
|
-
if (utils.isString(path)) {
|
|
10983
|
-
cookie.push('path=' + path);
|
|
10984
|
-
}
|
|
10985
|
-
if (utils.isString(domain)) {
|
|
10986
|
-
cookie.push('domain=' + domain);
|
|
10987
|
-
}
|
|
10988
|
-
if (secure === true) {
|
|
10989
|
-
cookie.push('secure');
|
|
10990
|
-
}
|
|
10991
|
-
document.cookie = cookie.join('; ');
|
|
10992
|
-
},
|
|
10993
|
-
read: function read(name) {
|
|
10994
|
-
var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
10995
|
-
return match ? decodeURIComponent(match[3]) : null;
|
|
10996
|
-
},
|
|
10997
|
-
remove: function remove(name) {
|
|
10998
|
-
this.write(name, '', Date.now() - 86400000);
|
|
10999
|
-
}
|
|
11000
|
-
};
|
|
11001
|
-
}() : function nonStandardBrowserEnv() {
|
|
11002
|
-
return {
|
|
11003
|
-
write: function write() {},
|
|
11004
|
-
read: function read() {
|
|
11005
|
-
return null;
|
|
11006
|
-
},
|
|
11007
|
-
remove: function remove() {}
|
|
11008
|
-
};
|
|
11009
|
-
}();
|
|
11010
|
-
|
|
11011
|
-
var isAbsoluteURL = function isAbsoluteURL(url) {
|
|
11012
|
-
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
|
11013
|
-
};
|
|
11014
|
-
|
|
11015
|
-
var combineURLs = function combineURLs(baseURL, relativeURL) {
|
|
11016
|
-
return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
|
|
11017
|
-
};
|
|
11018
|
-
|
|
11019
|
-
var buildFullPath = function buildFullPath(baseURL, requestedURL) {
|
|
11020
|
-
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
11021
|
-
return combineURLs(baseURL, requestedURL);
|
|
11022
|
-
}
|
|
11023
|
-
return requestedURL;
|
|
11024
|
-
};
|
|
11025
|
-
|
|
11026
|
-
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'];
|
|
11027
|
-
var parseHeaders = function parseHeaders(headers) {
|
|
11028
|
-
var parsed = {};
|
|
11029
|
-
var key;
|
|
11030
|
-
var val;
|
|
11031
|
-
var i;
|
|
11032
|
-
if (!headers) {
|
|
11033
|
-
return parsed;
|
|
11034
|
-
}
|
|
11035
|
-
utils.forEach(headers.split('\n'), function parser(line) {
|
|
11036
|
-
i = line.indexOf(':');
|
|
11037
|
-
key = utils.trim(line.substr(0, i)).toLowerCase();
|
|
11038
|
-
val = utils.trim(line.substr(i + 1));
|
|
11039
|
-
if (key) {
|
|
11040
|
-
if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
|
11041
|
-
return;
|
|
11042
|
-
}
|
|
11043
|
-
if (key === 'set-cookie') {
|
|
11044
|
-
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
|
11045
|
-
} else {
|
|
11046
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
11047
|
-
}
|
|
11048
|
-
}
|
|
11049
|
-
});
|
|
11050
|
-
return parsed;
|
|
11051
|
-
};
|
|
11052
|
-
|
|
11053
|
-
var isURLSameOrigin = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
|
|
11054
|
-
var msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
11055
|
-
var urlParsingNode = document.createElement('a');
|
|
11056
|
-
var originURL;
|
|
11057
|
-
function resolveURL(url) {
|
|
11058
|
-
var href = url;
|
|
11059
|
-
if (msie) {
|
|
11060
|
-
urlParsingNode.setAttribute('href', href);
|
|
11061
|
-
href = urlParsingNode.href;
|
|
11062
|
-
}
|
|
11063
|
-
urlParsingNode.setAttribute('href', href);
|
|
11064
|
-
return {
|
|
11065
|
-
href: urlParsingNode.href,
|
|
11066
|
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
11067
|
-
host: urlParsingNode.host,
|
|
11068
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
11069
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
11070
|
-
hostname: urlParsingNode.hostname,
|
|
11071
|
-
port: urlParsingNode.port,
|
|
11072
|
-
pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname
|
|
11073
|
-
};
|
|
11074
|
-
}
|
|
11075
|
-
originURL = resolveURL(window.location.href);
|
|
11076
|
-
return function isURLSameOrigin(requestURL) {
|
|
11077
|
-
var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
11078
|
-
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
11079
|
-
};
|
|
11080
|
-
}() : function nonStandardBrowserEnv() {
|
|
11081
|
-
return function isURLSameOrigin() {
|
|
11082
|
-
return true;
|
|
11083
|
-
};
|
|
11084
|
-
}();
|
|
11085
|
-
|
|
11086
|
-
var xhr = function xhrAdapter(config) {
|
|
11087
|
-
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
11088
|
-
var requestData = config.data;
|
|
11089
|
-
var requestHeaders = config.headers;
|
|
11090
|
-
if (utils.isFormData(requestData)) {
|
|
11091
|
-
delete requestHeaders['Content-Type'];
|
|
11092
|
-
}
|
|
11093
|
-
var request = new XMLHttpRequest();
|
|
11094
|
-
if (config.auth) {
|
|
11095
|
-
var username = config.auth.username || '';
|
|
11096
|
-
var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
|
|
11097
|
-
requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
|
|
11098
|
-
}
|
|
11099
|
-
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
11100
|
-
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
11101
|
-
request.timeout = config.timeout;
|
|
11102
|
-
request.onreadystatechange = function handleLoad() {
|
|
11103
|
-
if (!request || request.readyState !== 4) {
|
|
11104
|
-
return;
|
|
11105
|
-
}
|
|
11106
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
11107
|
-
return;
|
|
11108
|
-
}
|
|
11109
|
-
var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
|
|
11110
|
-
var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
|
|
11111
|
-
var response = {
|
|
11112
|
-
data: responseData,
|
|
11113
|
-
status: request.status,
|
|
11114
|
-
statusText: request.statusText,
|
|
11115
|
-
headers: responseHeaders,
|
|
11116
|
-
config: config,
|
|
11117
|
-
request: request
|
|
11118
|
-
};
|
|
11119
|
-
settle(resolve, reject, response);
|
|
11120
|
-
request = null;
|
|
11121
|
-
};
|
|
11122
|
-
request.onabort = function handleAbort() {
|
|
11123
|
-
if (!request) {
|
|
11124
|
-
return;
|
|
11125
|
-
}
|
|
11126
|
-
reject(createError('Request aborted', config, 'ECONNABORTED', request));
|
|
11127
|
-
request = null;
|
|
11128
|
-
};
|
|
11129
|
-
request.onerror = function handleError() {
|
|
11130
|
-
reject(createError('Network Error', config, null, request));
|
|
11131
|
-
request = null;
|
|
11132
|
-
};
|
|
11133
|
-
request.ontimeout = function handleTimeout() {
|
|
11134
|
-
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
|
11135
|
-
if (config.timeoutErrorMessage) {
|
|
11136
|
-
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
11137
|
-
}
|
|
11138
|
-
reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', request));
|
|
11139
|
-
request = null;
|
|
11140
|
-
};
|
|
11141
|
-
if (utils.isStandardBrowserEnv()) {
|
|
11142
|
-
var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined;
|
|
11143
|
-
if (xsrfValue) {
|
|
11144
|
-
requestHeaders[config.xsrfHeaderName] = xsrfValue;
|
|
11145
|
-
}
|
|
11146
|
-
}
|
|
11147
|
-
if ('setRequestHeader' in request) {
|
|
11148
|
-
utils.forEach(requestHeaders, function setRequestHeader(val, key) {
|
|
11149
|
-
if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
|
|
11150
|
-
delete requestHeaders[key];
|
|
11151
|
-
} else {
|
|
11152
|
-
request.setRequestHeader(key, val);
|
|
11153
|
-
}
|
|
11154
|
-
});
|
|
11155
|
-
}
|
|
11156
|
-
if (!utils.isUndefined(config.withCredentials)) {
|
|
11157
|
-
request.withCredentials = !!config.withCredentials;
|
|
11158
|
-
}
|
|
11159
|
-
if (config.responseType) {
|
|
11160
|
-
try {
|
|
11161
|
-
request.responseType = config.responseType;
|
|
11162
|
-
} catch (e) {
|
|
11163
|
-
if (config.responseType !== 'json') {
|
|
11164
|
-
throw e;
|
|
11165
|
-
}
|
|
11166
|
-
}
|
|
11167
|
-
}
|
|
11168
|
-
if (typeof config.onDownloadProgress === 'function') {
|
|
11169
|
-
request.addEventListener('progress', config.onDownloadProgress);
|
|
11170
|
-
}
|
|
11171
|
-
if (typeof config.onUploadProgress === 'function' && request.upload) {
|
|
11172
|
-
request.upload.addEventListener('progress', config.onUploadProgress);
|
|
11173
|
-
}
|
|
11174
|
-
if (config.cancelToken) {
|
|
11175
|
-
config.cancelToken.promise.then(function onCanceled(cancel) {
|
|
11176
|
-
if (!request) {
|
|
11177
|
-
return;
|
|
11178
|
-
}
|
|
11179
|
-
request.abort();
|
|
11180
|
-
reject(cancel);
|
|
11181
|
-
request = null;
|
|
11182
|
-
});
|
|
11183
|
-
}
|
|
11184
|
-
if (!requestData) {
|
|
11185
|
-
requestData = null;
|
|
11186
|
-
}
|
|
11187
|
-
request.send(requestData);
|
|
11188
|
-
});
|
|
11189
|
-
};
|
|
11190
|
-
|
|
11191
|
-
var DEFAULT_CONTENT_TYPE = {
|
|
11192
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
11193
|
-
};
|
|
11194
|
-
function setContentTypeIfUnset(headers, value) {
|
|
11195
|
-
if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
|
|
11196
|
-
headers['Content-Type'] = value;
|
|
11197
|
-
}
|
|
11198
|
-
}
|
|
11199
|
-
function getDefaultAdapter() {
|
|
11200
|
-
var adapter;
|
|
11201
|
-
if (typeof XMLHttpRequest !== 'undefined') {
|
|
11202
|
-
adapter = xhr;
|
|
11203
|
-
} else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
|
|
11204
|
-
adapter = xhr;
|
|
11205
|
-
}
|
|
11206
|
-
return adapter;
|
|
11207
|
-
}
|
|
11208
|
-
var defaults = {
|
|
11209
|
-
adapter: getDefaultAdapter(),
|
|
11210
|
-
transformRequest: [function transformRequest(data, headers) {
|
|
11211
|
-
normalizeHeaderName(headers, 'Accept');
|
|
11212
|
-
normalizeHeaderName(headers, 'Content-Type');
|
|
11213
|
-
if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
|
|
11214
|
-
return data;
|
|
11215
|
-
}
|
|
11216
|
-
if (utils.isArrayBufferView(data)) {
|
|
11217
|
-
return data.buffer;
|
|
11218
|
-
}
|
|
11219
|
-
if (utils.isURLSearchParams(data)) {
|
|
11220
|
-
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
|
|
11221
|
-
return data.toString();
|
|
11222
|
-
}
|
|
11223
|
-
if (utils.isObject(data)) {
|
|
11224
|
-
setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
|
|
11225
|
-
return JSON.stringify(data);
|
|
11226
|
-
}
|
|
11227
|
-
return data;
|
|
11228
|
-
}],
|
|
11229
|
-
transformResponse: [function transformResponse(data) {
|
|
11230
|
-
if (typeof data === 'string') {
|
|
11231
|
-
try {
|
|
11232
|
-
data = JSON.parse(data);
|
|
11233
|
-
} catch (e) {}
|
|
11234
|
-
}
|
|
11235
|
-
return data;
|
|
11236
|
-
}],
|
|
11237
|
-
timeout: 0,
|
|
11238
|
-
xsrfCookieName: 'XSRF-TOKEN',
|
|
11239
|
-
xsrfHeaderName: 'X-XSRF-TOKEN',
|
|
11240
|
-
maxContentLength: -1,
|
|
11241
|
-
maxBodyLength: -1,
|
|
11242
|
-
validateStatus: function validateStatus(status) {
|
|
11243
|
-
return status >= 200 && status < 300;
|
|
11244
|
-
}
|
|
11245
|
-
};
|
|
11246
|
-
defaults.headers = {
|
|
11247
|
-
common: {
|
|
11248
|
-
'Accept': 'application/json, text/plain, */*'
|
|
11249
|
-
}
|
|
11250
|
-
};
|
|
11251
|
-
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
|
11252
|
-
defaults.headers[method] = {};
|
|
11253
|
-
});
|
|
11254
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
11255
|
-
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
|
11256
|
-
});
|
|
11257
|
-
var defaults_1 = defaults;
|
|
11258
|
-
|
|
11259
|
-
function throwIfCancellationRequested(config) {
|
|
11260
|
-
if (config.cancelToken) {
|
|
11261
|
-
config.cancelToken.throwIfRequested();
|
|
11262
|
-
}
|
|
11263
|
-
}
|
|
11264
|
-
var dispatchRequest = function dispatchRequest(config) {
|
|
11265
|
-
throwIfCancellationRequested(config);
|
|
11266
|
-
config.headers = config.headers || {};
|
|
11267
|
-
config.data = transformData(config.data, config.headers, config.transformRequest);
|
|
11268
|
-
config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
|
|
11269
|
-
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) {
|
|
11270
|
-
delete config.headers[method];
|
|
11271
|
-
});
|
|
11272
|
-
var adapter = config.adapter || defaults_1.adapter;
|
|
11273
|
-
return adapter(config).then(function onAdapterResolution(response) {
|
|
11274
|
-
throwIfCancellationRequested(config);
|
|
11275
|
-
response.data = transformData(response.data, response.headers, config.transformResponse);
|
|
11276
|
-
return response;
|
|
11277
|
-
}, function onAdapterRejection(reason) {
|
|
11278
|
-
if (!isCancel(reason)) {
|
|
11279
|
-
throwIfCancellationRequested(config);
|
|
11280
|
-
if (reason && reason.response) {
|
|
11281
|
-
reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse);
|
|
11282
|
-
}
|
|
11283
|
-
}
|
|
11284
|
-
return Promise.reject(reason);
|
|
11285
|
-
});
|
|
11286
|
-
};
|
|
11287
|
-
|
|
11288
|
-
var mergeConfig = function mergeConfig(config1, config2) {
|
|
11289
|
-
config2 = config2 || {};
|
|
11290
|
-
var config = {};
|
|
11291
|
-
var valueFromConfig2Keys = ['url', 'method', 'data'];
|
|
11292
|
-
var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
|
|
11293
|
-
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'];
|
|
11294
|
-
var directMergeKeys = ['validateStatus'];
|
|
11295
|
-
function getMergedValue(target, source) {
|
|
11296
|
-
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
11297
|
-
return utils.merge(target, source);
|
|
11298
|
-
} else if (utils.isPlainObject(source)) {
|
|
11299
|
-
return utils.merge({}, source);
|
|
11300
|
-
} else if (utils.isArray(source)) {
|
|
11301
|
-
return source.slice();
|
|
11302
|
-
}
|
|
11303
|
-
return source;
|
|
11304
|
-
}
|
|
11305
|
-
function mergeDeepProperties(prop) {
|
|
11306
|
-
if (!utils.isUndefined(config2[prop])) {
|
|
11307
|
-
config[prop] = getMergedValue(config1[prop], config2[prop]);
|
|
11308
|
-
} else if (!utils.isUndefined(config1[prop])) {
|
|
11309
|
-
config[prop] = getMergedValue(undefined, config1[prop]);
|
|
11310
|
-
}
|
|
11311
|
-
}
|
|
11312
|
-
utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
|
|
11313
|
-
if (!utils.isUndefined(config2[prop])) {
|
|
11314
|
-
config[prop] = getMergedValue(undefined, config2[prop]);
|
|
11315
|
-
}
|
|
11316
|
-
});
|
|
11317
|
-
utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
|
11318
|
-
utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
|
|
11319
|
-
if (!utils.isUndefined(config2[prop])) {
|
|
11320
|
-
config[prop] = getMergedValue(undefined, config2[prop]);
|
|
11321
|
-
} else if (!utils.isUndefined(config1[prop])) {
|
|
11322
|
-
config[prop] = getMergedValue(undefined, config1[prop]);
|
|
11323
|
-
}
|
|
11324
|
-
});
|
|
11325
|
-
utils.forEach(directMergeKeys, function merge(prop) {
|
|
11326
|
-
if (prop in config2) {
|
|
11327
|
-
config[prop] = getMergedValue(config1[prop], config2[prop]);
|
|
11328
|
-
} else if (prop in config1) {
|
|
11329
|
-
config[prop] = getMergedValue(undefined, config1[prop]);
|
|
11330
|
-
}
|
|
11331
|
-
});
|
|
11332
|
-
var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);
|
|
11333
|
-
var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key) {
|
|
11334
|
-
return axiosKeys.indexOf(key) === -1;
|
|
11335
|
-
});
|
|
11336
|
-
utils.forEach(otherKeys, mergeDeepProperties);
|
|
11337
|
-
return config;
|
|
11338
|
-
};
|
|
11339
|
-
|
|
11340
|
-
function Axios(instanceConfig) {
|
|
11341
|
-
this.defaults = instanceConfig;
|
|
11342
|
-
this.interceptors = {
|
|
11343
|
-
request: new InterceptorManager_1(),
|
|
11344
|
-
response: new InterceptorManager_1()
|
|
11345
|
-
};
|
|
11346
|
-
}
|
|
11347
|
-
Axios.prototype.request = function request(config) {
|
|
11348
|
-
if (typeof config === 'string') {
|
|
11349
|
-
config = arguments[1] || {};
|
|
11350
|
-
config.url = arguments[0];
|
|
11351
|
-
} else {
|
|
11352
|
-
config = config || {};
|
|
11353
|
-
}
|
|
11354
|
-
config = mergeConfig(this.defaults, config);
|
|
11355
|
-
if (config.method) {
|
|
11356
|
-
config.method = config.method.toLowerCase();
|
|
11357
|
-
} else if (this.defaults.method) {
|
|
11358
|
-
config.method = this.defaults.method.toLowerCase();
|
|
11359
|
-
} else {
|
|
11360
|
-
config.method = 'get';
|
|
11361
|
-
}
|
|
11362
|
-
var chain = [dispatchRequest, undefined];
|
|
11363
|
-
var promise = Promise.resolve(config);
|
|
11364
|
-
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
11365
|
-
chain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
11366
|
-
});
|
|
11367
|
-
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
11368
|
-
chain.push(interceptor.fulfilled, interceptor.rejected);
|
|
11369
|
-
});
|
|
11370
|
-
while (chain.length) {
|
|
11371
|
-
promise = promise.then(chain.shift(), chain.shift());
|
|
11372
|
-
}
|
|
11373
|
-
return promise;
|
|
11374
|
-
};
|
|
11375
|
-
Axios.prototype.getUri = function getUri(config) {
|
|
11376
|
-
config = mergeConfig(this.defaults, config);
|
|
11377
|
-
return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
|
|
11378
|
-
};
|
|
11379
|
-
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
11380
|
-
Axios.prototype[method] = function (url, config) {
|
|
11381
|
-
return this.request(mergeConfig(config || {}, {
|
|
11382
|
-
method: method,
|
|
11383
|
-
url: url,
|
|
11384
|
-
data: (config || {}).data
|
|
11385
|
-
}));
|
|
11386
|
-
};
|
|
11387
|
-
});
|
|
11388
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
11389
|
-
Axios.prototype[method] = function (url, data, config) {
|
|
11390
|
-
return this.request(mergeConfig(config || {}, {
|
|
11391
|
-
method: method,
|
|
11392
|
-
url: url,
|
|
11393
|
-
data: data
|
|
11394
|
-
}));
|
|
11395
|
-
};
|
|
11396
|
-
});
|
|
11397
|
-
var Axios_1 = Axios;
|
|
11398
|
-
|
|
11399
|
-
function Cancel(message) {
|
|
11400
|
-
this.message = message;
|
|
11401
|
-
}
|
|
11402
|
-
Cancel.prototype.toString = function toString() {
|
|
11403
|
-
return 'Cancel' + (this.message ? ': ' + this.message : '');
|
|
11404
|
-
};
|
|
11405
|
-
Cancel.prototype.__CANCEL__ = true;
|
|
11406
|
-
var Cancel_1 = Cancel;
|
|
11407
|
-
|
|
11408
|
-
function CancelToken(executor) {
|
|
11409
|
-
if (typeof executor !== 'function') {
|
|
11410
|
-
throw new TypeError('executor must be a function.');
|
|
11411
|
-
}
|
|
11412
|
-
var resolvePromise;
|
|
11413
|
-
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
11414
|
-
resolvePromise = resolve;
|
|
11415
|
-
});
|
|
11416
|
-
var token = this;
|
|
11417
|
-
executor(function cancel(message) {
|
|
11418
|
-
if (token.reason) {
|
|
11419
|
-
return;
|
|
11420
|
-
}
|
|
11421
|
-
token.reason = new Cancel_1(message);
|
|
11422
|
-
resolvePromise(token.reason);
|
|
11423
|
-
});
|
|
11424
|
-
}
|
|
11425
|
-
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
11426
|
-
if (this.reason) {
|
|
11427
|
-
throw this.reason;
|
|
11428
|
-
}
|
|
11429
|
-
};
|
|
11430
|
-
CancelToken.source = function source() {
|
|
11431
|
-
var cancel;
|
|
11432
|
-
var token = new CancelToken(function executor(c) {
|
|
11433
|
-
cancel = c;
|
|
11434
|
-
});
|
|
11435
|
-
return {
|
|
11436
|
-
token: token,
|
|
11437
|
-
cancel: cancel
|
|
11438
|
-
};
|
|
11439
|
-
};
|
|
11440
|
-
var CancelToken_1 = CancelToken;
|
|
11441
|
-
|
|
11442
|
-
var spread = function spread(callback) {
|
|
11443
|
-
return function wrap(arr) {
|
|
11444
|
-
return callback.apply(null, arr);
|
|
11445
|
-
};
|
|
11446
|
-
};
|
|
11447
|
-
|
|
11448
|
-
var isAxiosError = function isAxiosError(payload) {
|
|
11449
|
-
return typeof payload === 'object' && payload.isAxiosError === true;
|
|
11450
|
-
};
|
|
11451
|
-
|
|
11452
|
-
function createInstance(defaultConfig) {
|
|
11453
|
-
var context = new Axios_1(defaultConfig);
|
|
11454
|
-
var instance = bind(Axios_1.prototype.request, context);
|
|
11455
|
-
utils.extend(instance, Axios_1.prototype, context);
|
|
11456
|
-
utils.extend(instance, context);
|
|
11457
|
-
return instance;
|
|
11458
|
-
}
|
|
11459
|
-
var axios = createInstance(defaults_1);
|
|
11460
|
-
axios.Axios = Axios_1;
|
|
11461
|
-
axios.create = function create(instanceConfig) {
|
|
11462
|
-
return createInstance(mergeConfig(axios.defaults, instanceConfig));
|
|
11463
|
-
};
|
|
11464
|
-
axios.Cancel = Cancel_1;
|
|
11465
|
-
axios.CancelToken = CancelToken_1;
|
|
11466
|
-
axios.isCancel = isCancel;
|
|
11467
|
-
axios.all = function all(promises) {
|
|
11468
|
-
return Promise.all(promises);
|
|
11469
|
-
};
|
|
11470
|
-
axios.spread = spread;
|
|
11471
|
-
axios.isAxiosError = isAxiosError;
|
|
11472
|
-
var axios_1 = axios;
|
|
11473
|
-
var _default = axios;
|
|
11474
|
-
axios_1.default = _default;
|
|
11475
|
-
|
|
11476
10697
|
const MyChallanResult = _ref => {
|
|
11477
10698
|
let {
|
|
11478
10699
|
template,
|
|
@@ -11486,10 +10707,9 @@ const MyChallanResult = _ref => {
|
|
|
11486
10707
|
const userInfo = Digit.UserService.getUser();
|
|
11487
10708
|
const tenantId = localStorage.getItem("CITIZEN.CITY");
|
|
11488
10709
|
const [loader, setLoader] = React.useState(false);
|
|
11489
|
-
const [getChallanData, setChallanData] = React.useState();
|
|
10710
|
+
const [getChallanData, setChallanData] = React.useState([]);
|
|
11490
10711
|
const [filters, setFilters] = React.useState(null);
|
|
11491
10712
|
const [getCount, setCount] = React.useState();
|
|
11492
|
-
console.log("userInfo", userInfo);
|
|
11493
10713
|
let filter = window.location.href.split("/").pop();
|
|
11494
10714
|
let t1;
|
|
11495
10715
|
let off;
|
|
@@ -11517,20 +10737,17 @@ const MyChallanResult = _ref => {
|
|
|
11517
10737
|
}, [filter, tenantId]);
|
|
11518
10738
|
const fetchChallans = function () {
|
|
11519
10739
|
try {
|
|
11520
|
-
console.log("filters", filters);
|
|
11521
10740
|
setLoader(true);
|
|
11522
10741
|
const _temp = _catch(function () {
|
|
11523
10742
|
return Promise.resolve(Digit.GCService.search({
|
|
11524
10743
|
tenantId,
|
|
11525
10744
|
filters
|
|
11526
10745
|
})).then(function (responseData) {
|
|
11527
|
-
console.log("result", responseData);
|
|
11528
10746
|
setCount(responseData === null || responseData === void 0 ? void 0 : responseData.TotalCount);
|
|
11529
10747
|
setChallanData(responseData === null || responseData === void 0 ? void 0 : responseData.GarbageConnection);
|
|
11530
10748
|
setLoader(false);
|
|
11531
10749
|
});
|
|
11532
|
-
}, function (
|
|
11533
|
-
console.log("error", error);
|
|
10750
|
+
}, function () {
|
|
11534
10751
|
setLoader(false);
|
|
11535
10752
|
});
|
|
11536
10753
|
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
@@ -11539,17 +10756,76 @@ const MyChallanResult = _ref => {
|
|
|
11539
10756
|
}
|
|
11540
10757
|
};
|
|
11541
10758
|
React.useEffect(() => {
|
|
11542
|
-
console.log("filters", filters);
|
|
11543
10759
|
if (filters) fetchChallans();
|
|
11544
10760
|
}, [filters]);
|
|
11545
10761
|
const handleMakePayment = id => {
|
|
11546
|
-
history.push("/digit-ui/citizen/payment/collect/
|
|
10762
|
+
history.push("/digit-ui/citizen/payment/collect/GC.ONE_TIME_FEE/" + id + "/" + tenantId + "?tenantId=" + tenantId);
|
|
11547
10763
|
};
|
|
11548
10764
|
const handleLoadMore = () => {
|
|
11549
10765
|
setFilters(prev => _extends({}, prev, {
|
|
11550
10766
|
limit: Number(prev.limit) + 5
|
|
11551
10767
|
}));
|
|
11552
10768
|
};
|
|
10769
|
+
const handleDiscontinue = function (data) {
|
|
10770
|
+
try {
|
|
10771
|
+
console.log("data", data);
|
|
10772
|
+
setLoader(true);
|
|
10773
|
+
const payload = {
|
|
10774
|
+
GarbageConnection: _extends({}, data, {
|
|
10775
|
+
applicationType: "DISCONNECT_GARBAGE_CONNECTION",
|
|
10776
|
+
processInstance: _extends({}, data === null || data === void 0 ? void 0 : data.processInstance, {
|
|
10777
|
+
action: "INITIATE"
|
|
10778
|
+
})
|
|
10779
|
+
}),
|
|
10780
|
+
disconnectRequest: true
|
|
10781
|
+
};
|
|
10782
|
+
console.log("payload===", payload);
|
|
10783
|
+
const _temp2 = _catch(function () {
|
|
10784
|
+
return Promise.resolve(Digit.GCService.create(payload)).then(function (response) {
|
|
10785
|
+
console.log("response", response);
|
|
10786
|
+
updateApplication(response === null || response === void 0 ? void 0 : response.GarbageConnection[0]);
|
|
10787
|
+
});
|
|
10788
|
+
}, function () {
|
|
10789
|
+
setLoader(false);
|
|
10790
|
+
});
|
|
10791
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
10792
|
+
} catch (e) {
|
|
10793
|
+
return Promise.reject(e);
|
|
10794
|
+
}
|
|
10795
|
+
};
|
|
10796
|
+
const updateApplication = function (response) {
|
|
10797
|
+
try {
|
|
10798
|
+
console.log("uddated response", response);
|
|
10799
|
+
const payload = {
|
|
10800
|
+
GarbageConnection: _extends({}, response, {
|
|
10801
|
+
processInstance: _extends({}, response === null || response === void 0 ? void 0 : response.processInstance, {
|
|
10802
|
+
action: "SUBMIT_APPLICATION"
|
|
10803
|
+
})
|
|
10804
|
+
})
|
|
10805
|
+
};
|
|
10806
|
+
console.log("payload===", payload);
|
|
10807
|
+
const _temp3 = _catch(function () {
|
|
10808
|
+
return Promise.resolve(Digit.GCService.update(payload)).then(function (response) {
|
|
10809
|
+
console.log("response", response);
|
|
10810
|
+
return Promise.resolve(fetchChallans()).then(function () {});
|
|
10811
|
+
});
|
|
10812
|
+
}, function () {
|
|
10813
|
+
setLoader(false);
|
|
10814
|
+
});
|
|
10815
|
+
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
|
|
10816
|
+
} catch (e) {
|
|
10817
|
+
return Promise.reject(e);
|
|
10818
|
+
}
|
|
10819
|
+
};
|
|
10820
|
+
const connectionCountMap = React.useMemo(() => {
|
|
10821
|
+
const map = {};
|
|
10822
|
+
getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.forEach(item => {
|
|
10823
|
+
if (item !== null && item !== void 0 && item.connectionNo) {
|
|
10824
|
+
map[item.connectionNo] = (map[item.connectionNo] || 0) + 1;
|
|
10825
|
+
}
|
|
10826
|
+
});
|
|
10827
|
+
return map;
|
|
10828
|
+
}, [getChallanData]);
|
|
11553
10829
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
11554
10830
|
style: {
|
|
11555
10831
|
marginTop: "16px"
|
|
@@ -11559,6 +10835,8 @@ const MyChallanResult = _ref => {
|
|
|
11559
10835
|
marginLeft: "8px"
|
|
11560
10836
|
}
|
|
11561
10837
|
}, t(header), " (", getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.length, ")"), getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.map((bill, index) => {
|
|
10838
|
+
const connectionCount = connectionCountMap[bill === null || bill === void 0 ? void 0 : bill.connectionNo] || 0;
|
|
10839
|
+
const showDiscontinueButton = bill.applicationStatus === "CONNECTION_ACTIVATED" && connectionCount === 1;
|
|
11562
10840
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
11563
10841
|
key: index
|
|
11564
10842
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
|
|
@@ -11579,9 +10857,16 @@ const MyChallanResult = _ref => {
|
|
|
11579
10857
|
to: "/digit-ui/citizen/garbagecollection/application/" + (bill === null || bill === void 0 ? void 0 : bill.applicationNo) + "/" + (bill === null || bill === void 0 ? void 0 : bill.tenantId)
|
|
11580
10858
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
11581
10859
|
label: t("CS_VIEW_DETAILS")
|
|
11582
|
-
})),
|
|
10860
|
+
})), showDiscontinueButton && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
10861
|
+
style: {
|
|
10862
|
+
width: "200px"
|
|
10863
|
+
},
|
|
10864
|
+
label: t("GC_DISCONTINUE_SERVICE"),
|
|
10865
|
+
onSubmit: () => handleDiscontinue(bill),
|
|
10866
|
+
disabled: loader
|
|
10867
|
+
}), bill.applicationStatus == "PENDING_FOR_PAYMENT" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
11583
10868
|
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
|
|
11584
|
-
onSubmit: () => handleMakePayment(bill === null || bill === void 0 ? void 0 : bill.
|
|
10869
|
+
onSubmit: () => handleMakePayment(bill === null || bill === void 0 ? void 0 : bill.applicationNo)
|
|
11585
10870
|
})));
|
|
11586
10871
|
}), (getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.length) === 0 && !loader && /*#__PURE__*/React__default.createElement("p", {
|
|
11587
10872
|
style: {
|
|
@@ -11694,24 +10979,24 @@ function baseGetTag(value) {
|
|
|
11694
10979
|
}
|
|
11695
10980
|
var _baseGetTag = baseGetTag;
|
|
11696
10981
|
|
|
11697
|
-
function isObject
|
|
10982
|
+
function isObject(value) {
|
|
11698
10983
|
var type = typeof value;
|
|
11699
10984
|
return value != null && (type == 'object' || type == 'function');
|
|
11700
10985
|
}
|
|
11701
|
-
var isObject_1 = isObject
|
|
10986
|
+
var isObject_1 = isObject;
|
|
11702
10987
|
|
|
11703
10988
|
var asyncTag = '[object AsyncFunction]',
|
|
11704
10989
|
funcTag = '[object Function]',
|
|
11705
10990
|
genTag = '[object GeneratorFunction]',
|
|
11706
10991
|
proxyTag = '[object Proxy]';
|
|
11707
|
-
function isFunction
|
|
10992
|
+
function isFunction(value) {
|
|
11708
10993
|
if (!isObject_1(value)) {
|
|
11709
10994
|
return false;
|
|
11710
10995
|
}
|
|
11711
10996
|
var tag = _baseGetTag(value);
|
|
11712
10997
|
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
11713
10998
|
}
|
|
11714
|
-
var isFunction_1 = isFunction
|
|
10999
|
+
var isFunction_1 = isFunction;
|
|
11715
11000
|
|
|
11716
11001
|
var coreJsData = _root['__core-js_shared__'];
|
|
11717
11002
|
var _coreJsData = coreJsData;
|
|
@@ -12459,13 +11744,10 @@ const GCResponseCitizen = props => {
|
|
|
12459
11744
|
return Promise.reject(e);
|
|
12460
11745
|
}
|
|
12461
11746
|
};
|
|
12462
|
-
const handlePayment = () => {
|
|
12463
|
-
history.push("/digit-ui/employee/payment/collect/Challan_Generation/" + applicationNumber + "/" + tenantId + "?tenantId=" + tenantId);
|
|
12464
|
-
};
|
|
12465
11747
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Banner, {
|
|
12466
11748
|
message: t("GC_APPLICATION_CREATED"),
|
|
12467
11749
|
applicationNumber: applicationNumber,
|
|
12468
|
-
info: (nocData === null || nocData === void 0 ? void 0 : nocData.applicationStatus) == "REJECTED" ? "" : t("
|
|
11750
|
+
info: (nocData === null || nocData === void 0 ? void 0 : nocData.applicationStatus) == "REJECTED" ? "" : t("APPLICATION_NUMBER"),
|
|
12469
11751
|
successful: (nocData === null || nocData === void 0 ? void 0 : nocData.applicationStatus) == "REJECTED" ? false : true,
|
|
12470
11752
|
style: {
|
|
12471
11753
|
padding: "10px"
|
|
@@ -12497,9 +11779,6 @@ const GCResponseCitizen = props => {
|
|
|
12497
11779
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
12498
11780
|
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
12499
11781
|
onSubmit: onSubmit
|
|
12500
|
-
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
12501
|
-
label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
|
|
12502
|
-
onSubmit: handlePayment
|
|
12503
11782
|
}))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
12504
11783
|
error: error,
|
|
12505
11784
|
label: getLable,
|
|
@@ -12523,8 +11802,9 @@ const ModalConfig = _ref => {
|
|
|
12523
11802
|
businessService
|
|
12524
11803
|
} = _ref;
|
|
12525
11804
|
console.log("action=====", action);
|
|
11805
|
+
console.log("uploadedFile=====", uploadedFile);
|
|
12526
11806
|
let checkCondtions = true;
|
|
12527
|
-
if ((action === null || action === void 0 ? void 0 : action.action) == "
|
|
11807
|
+
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;
|
|
12528
11808
|
if (action.isTerminateState) checkCondtions = false;
|
|
12529
11809
|
console.log("action=====", action.action);
|
|
12530
11810
|
return {
|
|
@@ -12601,13 +11881,19 @@ const NDCModal = _ref => {
|
|
|
12601
11881
|
errorOne,
|
|
12602
11882
|
closeToastOne,
|
|
12603
11883
|
getEmployees,
|
|
12604
|
-
tenantId
|
|
11884
|
+
tenantId,
|
|
11885
|
+
businessService,
|
|
11886
|
+
loader,
|
|
11887
|
+
setLoader
|
|
12605
11888
|
} = _ref;
|
|
12606
11889
|
const [config, setConfig] = React.useState({});
|
|
12607
11890
|
const [getAmount, setAmount] = React.useState();
|
|
12608
11891
|
const [approvers, setApprovers] = React.useState([]);
|
|
11892
|
+
const [selectedApprover, setSelectedApprover] = React.useState({});
|
|
11893
|
+
const [file, setFile] = React.useState(null);
|
|
11894
|
+
const [uploadedFile, setUploadedFile] = React.useState(null);
|
|
11895
|
+
const [error, setError] = React.useState(null);
|
|
12609
11896
|
const allRolesNew = [...new Set(getEmployees === null || getEmployees === void 0 ? void 0 : getEmployees.flatMap(a => a.roles))];
|
|
12610
|
-
console.log("allRolesNew", allRolesNew);
|
|
12611
11897
|
const {
|
|
12612
11898
|
data: approverData,
|
|
12613
11899
|
isLoading: PTALoading
|
|
@@ -12639,11 +11925,65 @@ const NDCModal = _ref => {
|
|
|
12639
11925
|
}));
|
|
12640
11926
|
}
|
|
12641
11927
|
}, [approverData]);
|
|
11928
|
+
function selectFile(e) {
|
|
11929
|
+
setFile(e.target.files[0]);
|
|
11930
|
+
}
|
|
11931
|
+
React.useEffect(() => {
|
|
11932
|
+
(function () {
|
|
11933
|
+
try {
|
|
11934
|
+
setError(null);
|
|
11935
|
+
const _temp3 = function () {
|
|
11936
|
+
if (file) {
|
|
11937
|
+
const _temp2 = function () {
|
|
11938
|
+
if (file.size >= 5242880) {
|
|
11939
|
+
setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
11940
|
+
} else {
|
|
11941
|
+
setLoader(true);
|
|
11942
|
+
const _temp = _catch(function () {
|
|
11943
|
+
return Promise.resolve(Digit.UploadServices.Filestorage("PT", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
11944
|
+
var _response$data, _response$data$files;
|
|
11945
|
+
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) {
|
|
11946
|
+
var _response$data2, _response$data2$files;
|
|
11947
|
+
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);
|
|
11948
|
+
} else {
|
|
11949
|
+
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
11950
|
+
}
|
|
11951
|
+
setLoader(false);
|
|
11952
|
+
});
|
|
11953
|
+
}, function () {
|
|
11954
|
+
setLoader(false);
|
|
11955
|
+
setError(t("CS_FILE_UPLOAD_ERROR"));
|
|
11956
|
+
});
|
|
11957
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
11958
|
+
}
|
|
11959
|
+
}();
|
|
11960
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
11961
|
+
}
|
|
11962
|
+
}();
|
|
11963
|
+
return _temp3 && _temp3.then ? _temp3.then(function () {}) : void 0;
|
|
11964
|
+
} catch (e) {
|
|
11965
|
+
Promise.reject(e);
|
|
11966
|
+
}
|
|
11967
|
+
})();
|
|
11968
|
+
}, [file]);
|
|
12642
11969
|
function submit(data) {
|
|
11970
|
+
console.log("data", data);
|
|
11971
|
+
console.log("selectedApprover", selectedApprover);
|
|
12643
11972
|
const payload = {
|
|
12644
|
-
|
|
11973
|
+
action: action === null || action === void 0 ? void 0 : action.action,
|
|
11974
|
+
comment: data === null || data === void 0 ? void 0 : data.comments,
|
|
11975
|
+
assignes: !(selectedApprover !== null && selectedApprover !== void 0 && selectedApprover.uuid) ? null : [{
|
|
11976
|
+
uuid: selectedApprover === null || selectedApprover === void 0 ? void 0 : selectedApprover.uuid
|
|
11977
|
+
}],
|
|
11978
|
+
documents: uploadedFile ? [{
|
|
11979
|
+
documentType: file === null || file === void 0 ? void 0 : file.type,
|
|
11980
|
+
documentUid: file === null || file === void 0 ? void 0 : file.name,
|
|
11981
|
+
fileStoreId: uploadedFile
|
|
11982
|
+
}] : null
|
|
12645
11983
|
};
|
|
12646
|
-
submitAction(
|
|
11984
|
+
submitAction({
|
|
11985
|
+
Licenses: [payload]
|
|
11986
|
+
});
|
|
12647
11987
|
}
|
|
12648
11988
|
React.useEffect(() => {
|
|
12649
11989
|
if (action) {
|
|
@@ -12651,10 +11991,16 @@ const NDCModal = _ref => {
|
|
|
12651
11991
|
t,
|
|
12652
11992
|
action,
|
|
12653
11993
|
setAmount,
|
|
12654
|
-
approvers
|
|
11994
|
+
approvers,
|
|
11995
|
+
selectedApprover,
|
|
11996
|
+
setSelectedApprover,
|
|
11997
|
+
uploadedFile,
|
|
11998
|
+
selectFile,
|
|
11999
|
+
setUploadedFile,
|
|
12000
|
+
businessService
|
|
12655
12001
|
}));
|
|
12656
12002
|
}
|
|
12657
|
-
}, [action, approvers]);
|
|
12003
|
+
}, [action, approvers, selectedApprover, uploadedFile]);
|
|
12658
12004
|
if (!action || !config.form) return null;
|
|
12659
12005
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
12660
12006
|
headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
|
|
@@ -12680,7 +12026,7 @@ const NDCModal = _ref => {
|
|
|
12680
12026
|
label: errorOne,
|
|
12681
12027
|
isDleteBtn: true,
|
|
12682
12028
|
onClose: closeToastOne
|
|
12683
|
-
}), PTALoading && /*#__PURE__*/React__default.createElement(Loader, {
|
|
12029
|
+
}), (PTALoading || loader) && /*#__PURE__*/React__default.createElement(Loader, {
|
|
12684
12030
|
page: true
|
|
12685
12031
|
}));
|
|
12686
12032
|
};
|
|
@@ -12727,6 +12073,7 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12727
12073
|
const {
|
|
12728
12074
|
t
|
|
12729
12075
|
} = reactI18next.useTranslation();
|
|
12076
|
+
const history = reactRouterDom.useHistory();
|
|
12730
12077
|
const {
|
|
12731
12078
|
acknowledgementIds,
|
|
12732
12079
|
id
|
|
@@ -12734,14 +12081,8 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12734
12081
|
const [showToast, setShowToast] = React.useState(false);
|
|
12735
12082
|
const [getLable, setLable] = React.useState(false);
|
|
12736
12083
|
const tenantId = window.location.href.includes("citizen") ? window.localStorage.getItem("CITIZEN.CITY") : window.localStorage.getItem("Employee.tenant-id");
|
|
12737
|
-
const [showOptions, setShowOptions] = React.useState(false);
|
|
12738
|
-
const {
|
|
12739
|
-
data: storeData
|
|
12740
|
-
} = Digit.Hooks.useStore.getInitData();
|
|
12741
12084
|
const [loader, setLoader] = React.useState(false);
|
|
12742
12085
|
const [getChallanData, setChallanData] = React.useState();
|
|
12743
|
-
const [chbPermissionLoading, setChbPermissionLoading] = React.useState(false);
|
|
12744
|
-
const [printing, setPrinting] = React.useState(false);
|
|
12745
12086
|
const [error, setError] = React.useState("");
|
|
12746
12087
|
const [getWorkflowService, setWorkflowService] = React.useState([]);
|
|
12747
12088
|
const [displayMenu, setDisplayMenu] = React.useState(false);
|
|
@@ -12751,7 +12092,6 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12751
12092
|
const [getEmployees, setEmployees] = React.useState([]);
|
|
12752
12093
|
const [errorOne, setErrorOne] = React.useState(null);
|
|
12753
12094
|
const menuRef = React.useRef();
|
|
12754
|
-
console.log("acknowledgementIds", acknowledgementIds, id);
|
|
12755
12095
|
const fetchChallans = function (filters) {
|
|
12756
12096
|
try {
|
|
12757
12097
|
setLoader(true);
|
|
@@ -12761,12 +12101,10 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12761
12101
|
filters
|
|
12762
12102
|
})).then(function (responseData) {
|
|
12763
12103
|
var _responseData$Garbage;
|
|
12764
|
-
console.log("search ", responseData);
|
|
12765
12104
|
setChallanData(responseData === null || responseData === void 0 ? void 0 : (_responseData$Garbage = responseData.GarbageConnection) === null || _responseData$Garbage === void 0 ? void 0 : _responseData$Garbage[0]);
|
|
12766
12105
|
setLoader(false);
|
|
12767
12106
|
});
|
|
12768
|
-
}, function (
|
|
12769
|
-
console.log("error", error);
|
|
12107
|
+
}, function () {
|
|
12770
12108
|
setLoader(false);
|
|
12771
12109
|
});
|
|
12772
12110
|
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
@@ -12774,7 +12112,6 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12774
12112
|
return Promise.reject(e);
|
|
12775
12113
|
}
|
|
12776
12114
|
};
|
|
12777
|
-
let challanEmpData = ChallanData(tenantId, id);
|
|
12778
12115
|
React.useEffect(() => {
|
|
12779
12116
|
if (id) {
|
|
12780
12117
|
const filters = {};
|
|
@@ -12798,7 +12135,10 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12798
12135
|
const closeToast = () => {
|
|
12799
12136
|
setShowToast(null);
|
|
12800
12137
|
};
|
|
12801
|
-
|
|
12138
|
+
const closeMenu = () => {
|
|
12139
|
+
setDisplayMenu(false);
|
|
12140
|
+
};
|
|
12141
|
+
Digit.Hooks.useClickOutside(menuRef, closeMenu, displayMenu);
|
|
12802
12142
|
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)];
|
|
12803
12143
|
if (workflowDetails && workflowDetails.data && !workflowDetails.isLoading) {
|
|
12804
12144
|
var _workflowDetails$data4, _workflowDetails$data5;
|
|
@@ -12825,7 +12165,6 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12825
12165
|
return Promise.resolve(Digit.WorkflowService.init(tenantId, "NewGC")).then(function (_Digit$WorkflowServic) {
|
|
12826
12166
|
var _WorkflowService, _WorkflowService$Busi, _WorkflowService$Busi2;
|
|
12827
12167
|
WorkflowService = _Digit$WorkflowServic;
|
|
12828
|
-
console.log("WorkflowService===", WorkflowService);
|
|
12829
12168
|
setLoader(false);
|
|
12830
12169
|
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);
|
|
12831
12170
|
});
|
|
@@ -12835,67 +12174,52 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
12835
12174
|
}, [tenantId]);
|
|
12836
12175
|
function onActionSelect(action) {
|
|
12837
12176
|
var _action$state, _action$state$actions, _filterRoles$;
|
|
12838
|
-
|
|
12177
|
+
if ((action === null || action === void 0 ? void 0 : action.action) == "PAY") {
|
|
12178
|
+
history.push("/digit-ui/employee/payment/collect/GC.ONE_TIME_FEE/" + id + "/" + tenantId + "?tenantId=" + tenantId);
|
|
12179
|
+
}
|
|
12839
12180
|
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));
|
|
12840
12181
|
const filterRoles = getWorkflowService === null || getWorkflowService === void 0 ? void 0 : getWorkflowService.filter(item => {
|
|
12841
12182
|
var _filterNexState$;
|
|
12842
12183
|
return (item === null || item === void 0 ? void 0 : item.uuid) == ((_filterNexState$ = filterNexState[0]) === null || _filterNexState$ === void 0 ? void 0 : _filterNexState$.nextState);
|
|
12843
12184
|
});
|
|
12844
|
-
console.log("filterRoles", filterRoles);
|
|
12845
12185
|
setEmployees(filterRoles === null || filterRoles === void 0 ? void 0 : (_filterRoles$ = filterRoles[0]) === null || _filterRoles$ === void 0 ? void 0 : _filterRoles$.actions);
|
|
12846
12186
|
setShowModal(true);
|
|
12847
12187
|
setSelectedAction(action);
|
|
12848
12188
|
}
|
|
12849
12189
|
const submitAction = function (modalData) {
|
|
12850
12190
|
try {
|
|
12851
|
-
|
|
12852
|
-
|
|
12853
|
-
|
|
12854
|
-
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
|
|
12858
|
-
|
|
12859
|
-
|
|
12860
|
-
|
|
12861
|
-
|
|
12862
|
-
|
|
12863
|
-
|
|
12864
|
-
|
|
12865
|
-
|
|
12866
|
-
|
|
12867
|
-
|
|
12868
|
-
|
|
12869
|
-
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12883
|
-
setShowToast(true);
|
|
12884
|
-
setTimeout(() => {
|
|
12885
|
-
history.push("/digit-ui/employee/challangeneration/inbox");
|
|
12886
|
-
window.location.reload();
|
|
12887
|
-
}, 2000);
|
|
12888
|
-
});
|
|
12889
|
-
}, function () {
|
|
12890
|
-
setLoader(false);
|
|
12891
|
-
});
|
|
12892
|
-
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
12893
|
-
}
|
|
12894
|
-
}();
|
|
12895
|
-
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
12896
|
-
}
|
|
12897
|
-
}();
|
|
12898
|
-
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
|
|
12191
|
+
const action = modalData === null || modalData === void 0 ? void 0 : modalData.Licenses[0];
|
|
12192
|
+
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") {
|
|
12193
|
+
setErrorOne("Assignee is Mandatory");
|
|
12194
|
+
setShowErrorToastt(true);
|
|
12195
|
+
return Promise.resolve();
|
|
12196
|
+
} else if (!(action !== null && action !== void 0 && action.comment)) {
|
|
12197
|
+
setErrorOne("Comment is Mandatory");
|
|
12198
|
+
setShowErrorToastt(true);
|
|
12199
|
+
return Promise.resolve();
|
|
12200
|
+
}
|
|
12201
|
+
setLoader(true);
|
|
12202
|
+
const payload = {
|
|
12203
|
+
GarbageConnection: _extends({}, getChallanData, {
|
|
12204
|
+
processInstance: _extends({}, getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.processInstance, modalData === null || modalData === void 0 ? void 0 : modalData.Licenses[0])
|
|
12205
|
+
})
|
|
12206
|
+
};
|
|
12207
|
+
const _temp2 = _catch(function () {
|
|
12208
|
+
return Promise.resolve(Digit.GCService.update(payload)).then(function (response) {
|
|
12209
|
+
setLoader(false);
|
|
12210
|
+
setShowModal(false);
|
|
12211
|
+
setLable("Status is Updated");
|
|
12212
|
+
setError(false);
|
|
12213
|
+
setShowToast(true);
|
|
12214
|
+
setTimeout(() => {
|
|
12215
|
+
history.push("/digit-ui/employee/garbagecollection/inbox");
|
|
12216
|
+
window.location.reload();
|
|
12217
|
+
}, 2000);
|
|
12218
|
+
});
|
|
12219
|
+
}, function () {
|
|
12220
|
+
setLoader(false);
|
|
12221
|
+
});
|
|
12222
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
12899
12223
|
} catch (e) {
|
|
12900
12224
|
return Promise.reject(e);
|
|
12901
12225
|
}
|
|
@@ -13009,7 +12333,9 @@ const ChallanApplicationDetails$1 = () => {
|
|
|
13009
12333
|
errorOne: errorOne,
|
|
13010
12334
|
closeToastOne: closeToastOne,
|
|
13011
12335
|
getLable: getLable,
|
|
13012
|
-
getChallanData: getChallanData
|
|
12336
|
+
getChallanData: getChallanData,
|
|
12337
|
+
loader: loader,
|
|
12338
|
+
setLoader: setLoader
|
|
13013
12339
|
}) : null, showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
13014
12340
|
isDleteBtn: true,
|
|
13015
12341
|
error: error,
|