arco-support-request 0.0.67 → 0.0.68

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.
@@ -1879,6 +1879,37 @@ class GlobalService {
1879
1879
  { name: 'ti-rss-alt' },
1880
1880
  ];
1881
1881
  }
1882
+ getUrls() {
1883
+ let url = {
1884
+ "Test": {
1885
+ "ERPUrl": "https://test.arco.sa/",
1886
+ "ProducivityUrl": "https://test.arco.sa/productivity/",
1887
+ "ManpowerUrl": "https://manpowertest.azurewebsites.net/",
1888
+ "BusinessUrl": "https://test.arco.sa:220/",
1889
+ "FinanceApiUrl": "https://test.arco.sa:520/"
1890
+ },
1891
+ "Live": {
1892
+ "ERPUrl": "https://erp.arco.sa/",
1893
+ "ProducivityUrl": "https://erp.arco.sa/productivity/",
1894
+ "ManpowerUrl": "https://arco-dotnet-core-cicd.azurewebsites.net/",
1895
+ "BusinessUrl": "https://erp.arco.sa:220/",
1896
+ "FinanceApiUrl": "https://erp.arco.sa:520/"
1897
+ }
1898
+ };
1899
+ return url;
1900
+ }
1901
+ getSystemConfig(type) {
1902
+ this.SystemConfigs = this.getUrls();
1903
+ if (type == "Live") {
1904
+ this.SystemConfigs = this.getUrls().Live;
1905
+ }
1906
+ else if (type == "Test") {
1907
+ this.SystemConfigs = this.getUrls().Test;
1908
+ }
1909
+ else {
1910
+ this.SystemConfigs = this.getUrls().Test;
1911
+ }
1912
+ }
1882
1913
  SetValue(value) {
1883
1914
  this.globalScope.isLogedIn = value;
1884
1915
  }
@@ -2572,7 +2603,6 @@ class EntityTypeSetupService {
2572
2603
  let criteria = null;
2573
2604
  parameters.forEach((element) => {
2574
2605
  if (element.IsCriteriaField && element.Type != 'SearchValue') {
2575
- debugger;
2576
2606
  if (searchCriteria && searchCriteria.Where) {
2577
2607
  let filterobj = {
2578
2608
  Field: element.Name,
@@ -3028,7 +3058,6 @@ class EntityTypeSetupService {
3028
3058
  //----------------------myAssigned Cases------------------------------//
3029
3059
  ///////Dynmaic Apis /////
3030
3060
  getDynamicAll(criteriastr, entityTypeRecId, processStageId, CustomerId) {
3031
- debugger;
3032
3061
  let url = dynamic.getDynamicAll(entityTypeRecId, processStageId);
3033
3062
  if (CustomerId) {
3034
3063
  url += '&CustomerId=' + CustomerId;
@@ -3822,10 +3851,12 @@ class SupportRequestService {
3822
3851
  let url = environment.ServerUrl + 'subgroupassingnment?SubGroupId=' + subGroupId;
3823
3852
  return this.http.get(url);
3824
3853
  }
3825
- getStatusListCount(Usertype, UserFieldId) {
3854
+ getStatusListCount(Usertype, UserFieldId, issuType) {
3826
3855
  let url = environment.ServerUrl +
3827
3856
  'entitytype/supportrequestbyrequestertypecount?Usertype=' +
3828
3857
  Usertype + "&UserFieldId=" + UserFieldId;
3858
+ if (issuType)
3859
+ url = url + "&IssueType=" + issuType;
3829
3860
  return this.http.get(url);
3830
3861
  }
3831
3862
  getsupportRequestData(criteriastr, Usertype) {
@@ -5698,6 +5729,7 @@ class RequestFlowComponent {
5698
5729
  this.getPageCount();
5699
5730
  this.getategoryrequestertype();
5700
5731
  }
5732
+ this.globalService.getSystemConfig(this.Host);
5701
5733
  }
5702
5734
  toggleTheme(e) {
5703
5735
  if (this.globalService.CurrentLanguage == 'Eng') {
@@ -5993,7 +6025,7 @@ class RequestFlowComponent {
5993
6025
  getStatusListCount() {
5994
6026
  // let SupportRequestId = localStorage.getItem("RequesterTypeId");
5995
6027
  this.supportService
5996
- .getStatusListCount(this.RequesterTypeId, this.RequesterId)
6028
+ .getStatusListCount(this.RequesterTypeId, this.RequesterId, this.issuType)
5997
6029
  .subscribe((res) => {
5998
6030
  this.StatusList = res;
5999
6031
  if (this.StatusList != null && this.StatusList.length > 0) {
@@ -6229,6 +6261,7 @@ RequestFlowComponent.propDecorators = {
6229
6261
  RequesterField: [{ type: Input }],
6230
6262
  Language: [{ type: Input }],
6231
6263
  HostUrl: [{ type: Input }],
6264
+ Host: [{ type: Input }],
6232
6265
  Source: [{ type: Input }],
6233
6266
  Channel: [{ type: Input }],
6234
6267
  ChannelEn: [{ type: Input }],
@@ -7158,6 +7191,7 @@ class EntityDynamicViewComponent {
7158
7191
  data = {};
7159
7192
  data.Local = localStorage;
7160
7193
  data.Cookies = this.Cookies;
7194
+ data.System = this.globalService.SystemConfigs;
7161
7195
  if (_code && data) {
7162
7196
  let template = compile(_code);
7163
7197
  let result = template(data);
@@ -7777,6 +7811,10 @@ class EntityDynamicFieldComponent {
7777
7811
  columns.push(..._col);
7778
7812
  this.dropDownColumn$[field.Description] = columns;
7779
7813
  /* #endregion */
7814
+ let _handleData = {};
7815
+ if (this.ParameterData) {
7816
+ _handleData.params = this.ParameterData;
7817
+ }
7780
7818
  restData.QueryStrings.forEach((query) => {
7781
7819
  if (query.Type == 'FieldValue') {
7782
7820
  if (!_formvalue[query.Value] && query.IsNullable != true) {
@@ -7789,17 +7827,19 @@ class EntityDynamicFieldComponent {
7789
7827
  }
7790
7828
  }
7791
7829
  else {
7792
- let _handleData = {};
7793
- if (this.ParameterData) {
7794
- _handleData.params = this.ParameterData;
7795
- }
7796
7830
  query.Value = this.hanbleBarData(query.Value, _handleData);
7797
7831
  }
7798
7832
  });
7833
+ restData.Headers = restData.Headers.map(x => {
7834
+ x.Value = this.hanbleBarData(x.Value, _handleData);
7835
+ return x;
7836
+ });
7837
+ restData.URL = this.hanbleBarData(restData.URL, _handleData);
7838
+ restData.Body = this.hanbleBarData(restData.Body, _handleData);
7799
7839
  if (!isDepandancyvalue) {
7800
7840
  return;
7801
7841
  }
7802
- this.entityTypeSetup.dynamicAPi(jsonItem.rest, _formvalue, searchCriteria, SearchText, restData.Havecriteria)
7842
+ this.entityTypeSetup.dynamicAPi(restData, _formvalue, searchCriteria, SearchText, restData.Havecriteria)
7803
7843
  .subscribe((ress) => {
7804
7844
  let res = ress;
7805
7845
  if (restData.ResponseView) {
@@ -8117,6 +8157,10 @@ class EntityDynamicFieldComponent {
8117
8157
  let isDepandancyvalue = true;
8118
8158
  let _formvalue = this.pageForm.form.value;
8119
8159
  let restData = jsonItem.rest;
8160
+ let _handleData = {};
8161
+ if (this.ParameterData) {
8162
+ _handleData.params = this.ParameterData;
8163
+ }
8120
8164
  restData.QueryStrings.forEach((query) => {
8121
8165
  if (query.Type == 'FieldValue') {
8122
8166
  if (!_formvalue[query.Value]) {
@@ -8129,10 +8173,16 @@ class EntityDynamicFieldComponent {
8129
8173
  }
8130
8174
  }
8131
8175
  });
8176
+ restData.Headers = restData.Headers.map(x => {
8177
+ x.Value = this.hanbleBarData(x.Value, _handleData);
8178
+ return x;
8179
+ });
8180
+ restData.URL = this.hanbleBarData(restData.URL, _handleData);
8181
+ restData.Body = this.hanbleBarData(restData.Body, _handleData);
8132
8182
  if (!isDepandancyvalue) {
8133
8183
  return;
8134
8184
  }
8135
- this.entityTypeSetup.dynamicAPi(jsonItem.rest, _formvalue)
8185
+ this.entityTypeSetup.dynamicAPi(restData, _formvalue)
8136
8186
  .subscribe((ress) => {
8137
8187
  let res = ress;
8138
8188
  if (restData.ResponseView) {
@@ -8358,6 +8408,7 @@ class EntityDynamicFieldComponent {
8358
8408
  data.CurrentData = this;
8359
8409
  data.Local = localStorage;
8360
8410
  data.Cookies = this.Cookies;
8411
+ data.System = this.globalService.SystemConfigs;
8361
8412
  if (_code && data) {
8362
8413
  let template = compile(_code);
8363
8414
  let result = template(data);
@@ -9052,7 +9103,6 @@ class SelfServiceFlowComponent {
9052
9103
  this.getIssueGroupRequesterMappingByRequesterType();
9053
9104
  }
9054
9105
  getIssueGroupRequesterMappingByRequesterType() {
9055
- debugger;
9056
9106
  this.IssueAllList = [];
9057
9107
  this.supportService.getIssueGroupRequesterMappingByRequesterType(this.RequesterTypeId).subscribe((res) => {
9058
9108
  this.IssueAllList = res.filter(x => x.IssueType == this.IssueType);
@@ -9070,7 +9120,6 @@ class SelfServiceFlowComponent {
9070
9120
  });
9071
9121
  }
9072
9122
  selectCase(item) {
9073
- debugger;
9074
9123
  this.selectedCaseItem = item;
9075
9124
  }
9076
9125
  backtoCard() {
@@ -9204,13 +9253,11 @@ class CaseListComponent {
9204
9253
  return;
9205
9254
  this.selfServiceRequestData.forEach(x => {
9206
9255
  this.entityTypeSetup.urlGetWfStageAction(x.EntityTypeId, x.ProcessStage).subscribe((res) => {
9207
- debugger;
9208
9256
  // res =[{ActionDescription:'asim'}]
9209
9257
  x.wfActionData = res;
9210
9258
  // this.wfActionData = res;
9211
9259
  console.log('wfact', res);
9212
9260
  }, (error) => {
9213
- debugger;
9214
9261
  error.error;
9215
9262
  });
9216
9263
  });
@@ -9222,7 +9269,6 @@ class CaseListComponent {
9222
9269
  });
9223
9270
  }
9224
9271
  loadGrid(data, TotalRecord) {
9225
- debugger;
9226
9272
  if (data) {
9227
9273
  if (data.length > 0)
9228
9274
  this.gridServiceService.onGridRefresh.next({
@@ -9256,9 +9302,7 @@ class CaseListComponent {
9256
9302
  }
9257
9303
  getStatusField(data) {
9258
9304
  this.action = data.ActionRecId;
9259
- debugger;
9260
9305
  this.entityTypeSetup.urlGetStatusField(data.ActionRecId).subscribe((res) => {
9261
- debugger;
9262
9306
  this.wfStatusFields = res.Data;
9263
9307
  this.entityTypeSetup.onshowWorkflowPopup.next({
9264
9308
  showWorkflowPopup: true,
@@ -9267,7 +9311,6 @@ class CaseListComponent {
9267
9311
  // this.showWorkflowPopup = true;
9268
9312
  console.log(res);
9269
9313
  }, (error) => {
9270
- debugger;
9271
9314
  error.error;
9272
9315
  });
9273
9316
  }
@@ -9277,11 +9320,9 @@ class CaseListComponent {
9277
9320
  this.supportService.IsShowBackBtn = false;
9278
9321
  }
9279
9322
  getEntityTypeDetails() {
9280
- debugger;
9281
9323
  this.entityTypeSetup
9282
9324
  .getSingleEntityTypeSetupById(this.EntityTypeId)
9283
9325
  .subscribe((res) => {
9284
- debugger;
9285
9326
  this.EntityTypeDetail = res;
9286
9327
  if (this.globalService.CurrentLanguage == 'Ar') {
9287
9328
  this.pageTitle = this.EntityTypeDetail.DescriptionAr;
@@ -9290,18 +9331,14 @@ class CaseListComponent {
9290
9331
  this.pageTitle = this.EntityTypeDetail.Description;
9291
9332
  }
9292
9333
  }, (error) => {
9293
- debugger;
9294
9334
  console.log(error);
9295
9335
  });
9296
9336
  }
9297
9337
  getActiveEntityForm() {
9298
- debugger;
9299
9338
  this.entityTypeSetup.getActiveEntityFormByList(this.EntityTypeId).subscribe((res) => {
9300
- debugger;
9301
9339
  this.ActiveEntityTypeForm = res;
9302
9340
  this.getFormList();
9303
9341
  }, (error) => {
9304
- debugger;
9305
9342
  console.log(error);
9306
9343
  });
9307
9344
  }
@@ -9335,7 +9372,6 @@ class CaseListComponent {
9335
9372
  }
9336
9373
  }
9337
9374
  openPopupCreatePage() {
9338
- debugger;
9339
9375
  this.CreateItemId = this.EntityTypeId;
9340
9376
  this.isShowCreateRequest = true;
9341
9377
  this.supportService.IsShowBackBtn = true;
@@ -9358,7 +9394,6 @@ class CaseListComponent {
9358
9394
  this.pageCount = Math.ceil(this.totalRecordCount / this.pageSize);
9359
9395
  }
9360
9396
  openDetailsPopup(data) {
9361
- debugger;
9362
9397
  this.isDetails = true;
9363
9398
  this.CaseId = data.CaseId;
9364
9399
  this.detailsRecId = data.RecId; // RefRecId is the main recid
@@ -9409,7 +9444,6 @@ class CaseListComponent {
9409
9444
  this.entityTypeSetup
9410
9445
  .getAllWfStage(this.Searchcriteria, this.EntityTypeId, true)
9411
9446
  .subscribe((res) => {
9412
- debugger;
9413
9447
  this.StatusAndStageList = res.Data.sort((a, b) => {
9414
9448
  if (a.StageId < b.StageId)
9415
9449
  return -1;
@@ -9426,13 +9460,11 @@ class CaseListComponent {
9426
9460
  console.log(res.Data);
9427
9461
  }, (error) => {
9428
9462
  var _a;
9429
- debugger;
9430
9463
  console.log(error);
9431
9464
  Swal.fire(this.translatePipe.transform((_a = error.error) === null || _a === void 0 ? void 0 : _a.ExceptionMessage), this.translatePipe.transform(error === null || error === void 0 ? void 0 : error.message), 'error');
9432
9465
  });
9433
9466
  }
9434
9467
  selectStage(item) {
9435
- debugger;
9436
9468
  this.totalRecordCount = 0;
9437
9469
  this.selectedStage = item.RecId;
9438
9470
  if (item.StageId != null) {
@@ -9446,11 +9478,9 @@ class CaseListComponent {
9446
9478
  }
9447
9479
  getWfStageAction(EntityTypeId, StageId) {
9448
9480
  this.entityTypeSetup.urlGetWfStageAction(EntityTypeId, StageId).subscribe((res) => {
9449
- debugger;
9450
9481
  this.wfActionData = res;
9451
9482
  console.log(res);
9452
9483
  }, (error) => {
9453
- debugger;
9454
9484
  error.error;
9455
9485
  });
9456
9486
  }
@@ -9513,7 +9543,6 @@ class WorkflowDynamicPopupComponent {
9513
9543
  this.entityTypeService.onshowWorkflowPopup.subscribe((resData) => {
9514
9544
  try {
9515
9545
  // alert("ss")
9516
- debugger;
9517
9546
  this.isFileAttach = false;
9518
9547
  this.MenuRecId = 0;
9519
9548
  this.GridRecId = 0;
@@ -9572,7 +9601,6 @@ class WorkflowDynamicPopupComponent {
9572
9601
  Swal.fire('Mandatory file must be upload before submitting ', 'warning');
9573
9602
  return;
9574
9603
  }
9575
- debugger;
9576
9604
  if (this.dynamicFormGroup.valid)
9577
9605
  this.getWorkflowActionComments.emit({
9578
9606
  comments: this.workflowComments,
@@ -9641,14 +9669,12 @@ class WorkflowDynamicPopupComponent {
9641
9669
  if (jsonItem.options &&
9642
9670
  Array.isArray(jsonItem.options) &&
9643
9671
  jsonItem.options.length > 0) {
9644
- debugger;
9645
9672
  if (this.ActionCondition == 'hidecustomer') {
9646
9673
  jsonItem.options = jsonItem.options.filter((x) => {
9647
9674
  if (x.value != '1')
9648
9675
  return x;
9649
9676
  });
9650
9677
  }
9651
- debugger;
9652
9678
  obx.next(jsonItem.options.map((x) => Object.assign({
9653
9679
  Id: x.value,
9654
9680
  Description: x.text,
@@ -9663,7 +9689,6 @@ class WorkflowDynamicPopupComponent {
9663
9689
  }
9664
9690
  }
9665
9691
  uploadFile(event) {
9666
- debugger;
9667
9692
  if (event.target && event.target.files && event.target.files.length > 0) {
9668
9693
  const file = event.target.files[0];
9669
9694
  try {
@@ -9681,7 +9706,6 @@ class WorkflowDynamicPopupComponent {
9681
9706
  }
9682
9707
  }
9683
9708
  changeFile(files, item) {
9684
- debugger;
9685
9709
  this.DocumentItem = item;
9686
9710
  this.SelectedFiles = files.item(0);
9687
9711
  }
@@ -9698,14 +9722,12 @@ class WorkflowDynamicPopupComponent {
9698
9722
  return false;
9699
9723
  }
9700
9724
  getShortCodeCannedResponse(event) {
9701
- debugger;
9702
9725
  // columns.push(...short);
9703
9726
  event = '';
9704
9727
  if (this.showshortcode && (!this.shortcode || this.shortcode.length < 1)) {
9705
9728
  this.entityTypeService
9706
9729
  .getShortKeyCannedResponse(event)
9707
9730
  .subscribe((res) => {
9708
- debugger;
9709
9731
  this.shortcode = res;
9710
9732
  this.shortcutkey = res;
9711
9733
  });
@@ -9715,8 +9737,6 @@ class WorkflowDynamicPopupComponent {
9715
9737
  this.closeShortCanned = false;
9716
9738
  }
9717
9739
  selectShortKey(item) {
9718
- debugger;
9719
- debugger;
9720
9740
  if (this.activeInputId)
9721
9741
  this.typeInTextarea($('#' + this.activeInputId), item.Message);
9722
9742
  return false;