arco-support-request 0.0.83 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- import { ɵɵdefineInjectable, Injectable, Component, Pipe, NgModule, ViewEncapsulation, ɵɵinject, Inject, Input, EventEmitter, Output, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
1
+ import { ɵɵdefineInjectable, Injectable, Component, Pipe, NgModule, ViewEncapsulation, ɵɵinject, Input, EventEmitter, Output, Inject, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
2
  import { DOCUMENT, CommonModule } from '@angular/common';
3
3
  import { Validators, FormBuilder, FormArray, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
4
4
  import { HttpClient, HttpHeaders, HttpClientModule } from '@angular/common/http';
5
5
  import { BehaviorSubject, Subject, Observable } from 'rxjs';
6
6
  import { Title, BrowserModule } from '@angular/platform-browser';
7
7
  import Swal from 'sweetalert2';
8
- import { ActivatedRoute, Router } from '@angular/router';
8
+ import { ActivatedRoute, Router, NavigationStart, NavigationEnd } from '@angular/router';
9
9
  import { NgSelectModule } from '@ng-select/ng-select';
10
10
  import { AngularEditorModule } from '@kolkov/angular-editor';
11
11
  import * as handlebars from 'handlebars';
@@ -4751,283 +4751,297 @@ TranslatePipe.ctorParameters = () => [
4751
4751
  { type: GlobalService }
4752
4752
  ];
4753
4753
 
4754
- class CaseListComponent {
4755
- constructor(supportService, entityTypeSetup, globalService, gridServiceService, document) {
4756
- this.supportService = supportService;
4757
- this.entityTypeSetup = entityTypeSetup;
4758
- this.globalService = globalService;
4754
+ class SupportRequestDetailsComponent {
4755
+ constructor(taskService, EntityTypeSetupService, fb, actRoute, gridServiceService, ticketService, globalService, route) {
4756
+ this.taskService = taskService;
4757
+ this.EntityTypeSetupService = EntityTypeSetupService;
4758
+ this.fb = fb;
4759
+ this.actRoute = actRoute;
4759
4760
  this.gridServiceService = gridServiceService;
4760
- this.document = document;
4761
+ this.ticketService = ticketService;
4762
+ this.globalService = globalService;
4763
+ this.route = route;
4764
+ this.ViewFrom = "Page";
4765
+ this.IsWfAction = false;
4766
+ this.environment = environment;
4767
+ // _TaskDetail: TaskVM =null;
4768
+ this._TaskDetail = null;
4769
+ this.stageId = null;
4761
4770
  this.EntityTypeId = null;
4762
- this.IssueType = 11;
4763
- this.Channel = '3';
4764
- this.ChannelEn = 'Portal';
4765
- this.ChannelAr = 'صفحة العميل';
4766
- this.translatePipe = new TranslatePipe(this.globalService);
4767
- this.selfServiceRequestData = [];
4768
- this.GridSearchType = E_GridSearchType.None;
4769
- this.IsClientPagination = false;
4770
- this.totalCount = 0;
4771
- this.totalRecordCount = 0;
4772
- this.pageCount = 0;
4773
- this.pageNo = 1;
4774
- this.pageSize = 10;
4775
- this.SortingField = { field: null, direction: null };
4771
+ this.EntityTypeIdRecId = null;
4772
+ this.refRecId = null;
4773
+ this.EntityFormId = null;
4774
+ this.EntityPageGroupsData = [];
4775
+ this.EntityDefaultPageGroupsData = [];
4776
+ this.pageTitle = "Process Stage";
4777
+ this.pageDesp = "Process Stage";
4778
+ this.selectMode = E_SelectMode.Multi;
4779
+ this.isAttach = false;
4780
+ this.isCreate = false;
4781
+ this.isEdit = false;
4782
+ this.isDelete = false;
4783
+ this.isExport = false;
4784
+ this.gridActionList = [];
4785
+ this.columnDefs = [
4786
+ { Field: 'ProcessStage', Name: 'Process Stage Id' },
4787
+ { Field: 'ProcessStageEn', Name: 'Process Stage' },
4788
+ { Field: 'Comments', Name: 'Comments' },
4789
+ { Field: 'StartDate', Name: 'Start Date', DataType: E_DataType.date },
4790
+ { Field: 'EndDate', Name: 'End Date', DataType: E_DataType.date },
4791
+ ];
4792
+ this.commentsData = [];
4793
+ this.commentsDataCount = 0;
4776
4794
  this.Searchcriteria = {
4777
4795
  Pagging: {
4778
- PageNo: this.pageNo,
4779
- PageSize: this.pageSize,
4796
+ PageNo: 1,
4797
+ PageSize: 10,
4780
4798
  },
4781
4799
  Where: [],
4782
- SortOrder: this.SortingField,
4800
+ SortOrder: 1,
4783
4801
  };
4784
- this.columnDefs = [
4785
- { Field: 'CaseId', Name: 'Case Id', FieldType: E_FieldType.details },
4786
- { Field: 'LabourId', Name: 'Labour Id' },
4787
- { Field: 'LaborName', Name: 'Labor Name' },
4788
- { Field: 'IqamaNumber', Name: 'Iqama Number' },
4789
- { Field: 'PassportNumber', Name: 'Passport Number' },
4790
- { Field: 'BorderNumber', Name: 'Border Number' },
4791
- { Field: 'MobileNumber', Name: 'Mobile Number' },
4792
- { Field: 'NationalityEn', Name: 'Nationality' },
4793
- { Field: 'ProfessionEn', Name: 'Profession' },
4794
- { Field: 'DateofRequest', Name: 'Request Date', DataType: E_DataType.date },
4795
- { Field: 'StartDate', Name: 'Start Date', DataType: E_DataType.date },
4796
- { Field: 'EndDate', Name: 'End Date', DataType: E_DataType.date },
4797
- { Field: 'ProcessStageEn', Name: 'Process Stage En' },
4798
- { Field: 'ProcessStageAr', Name: 'Process Stage Ar' },
4799
- ];
4800
- this.viewTypes = [
4801
- { id: 1, name: 'Tab View', class: 'la la-table' },
4802
- { id: 2, name: 'Details View', class: 'la la-id-card-o' },
4803
- ];
4804
- this.selectedIndex = 0;
4805
- this.viewTypeData = 1;
4806
- this.selectMode = E_SelectMode.None;
4807
- this.EntityTypeDetail = null;
4808
- this.ActiveEntityTypeForm = null;
4802
+ this.displayPopupCreateView = false;
4809
4803
  this.CreateItemId = null;
4810
- this.detailsRecId = null;
4811
- this.detailsEntityTypeRecId = null;
4812
- this.displayPopupDetailView = false;
4813
- this.CaseId = null;
4814
- this.isDetails = false;
4815
- this.FieldListDDL = [
4816
- { Id: 1, Name: 'Iqama Number', Field: 'IqamaNumber', FieldAr: 'رقم الاقامة' },
4817
- { Id: 2, Name: 'CaseId', Field: 'CaseId', FieldAr: 'CaseId' },
4818
- { Id: 3, Name: 'LabourId', Field: 'LabourId', FieldAr: 'LabourId' },
4819
- { Id: 4, Name: 'LaborName', Field: 'LaborName', FieldAr: 'LaborName' },
4820
- { Id: 4, Name: 'PassportNumber', Field: 'PassportNumber', FieldAr: 'رقم الباسبور' },
4821
- { Id: 4, Name: 'BorderNumber', Field: 'BorderNumber', FieldAr: 'رقم الحدود' },
4822
- { Id: 4, Name: 'MobileNumber', Field: 'MobileNumber', FieldAr: 'رقم الجوال' },
4823
- ];
4824
- this.isShowCreateRequest = false;
4804
+ this.selectedActivityItem = null;
4805
+ this.commentsActivityItem = null;
4806
+ this.detailsEntityTypeId = null;
4807
+ this.Activity = null;
4808
+ this.ActivityType = [];
4809
+ this.ActivityTypeReadonly = [];
4810
+ this.TotalActivity = 0;
4825
4811
  this.StatusAndStageList = [];
4826
- this.StatusId = 1;
4827
- this.selectedStage = 0;
4828
- this.selectedStageobj = 0;
4829
- this.wfActionData = [];
4830
- this.workflowEntityFormId = null;
4812
+ this.showStageDetails = false;
4813
+ this.selectedProcessList = [];
4814
+ this.tabDisplayView = 1;
4815
+ this.SortingField = { field: null, direction: null };
4816
+ this.activitySearchcriteria = {
4817
+ Pagging: {
4818
+ PageNo: 1,
4819
+ PageSize: 10,
4820
+ },
4821
+ Where: [],
4822
+ SortOrder: this.SortingField,
4823
+ };
4824
+ this.TaskList = [];
4825
+ this.ProcessStageList = [];
4826
+ this.TimelineList = [];
4827
+ this.TimelineListReadonly = [];
4828
+ this.TaskCommentFile = null;
4829
+ this.wfActionData = [
4830
+ { id: 1, name: "New" },
4831
+ { id: 2, name: "Forward" },
4832
+ { id: 3, name: "Reply" },
4833
+ { id: 4, name: "Esculation" },
4834
+ { id: 5, name: "Delegation" },
4835
+ { id: 6, name: "Complete" },
4836
+ { id: 7, name: "Cancel" },
4837
+ ];
4838
+ this.wfStageAction = null;
4831
4839
  this.action = null;
4832
4840
  this.showWorkflowPopup = false;
4833
- this.GridCheckedData = [];
4841
+ this.workflowEntityFormId = null;
4842
+ this.assignmentForm = this.fb.group({
4843
+ ActionStatus: [''],
4844
+ AssignedTo: [''],
4845
+ TargetDate: [''],
4846
+ Description: [''],
4847
+ Comments: [''],
4848
+ });
4849
+ this.updateStatusAssignTo = [];
4850
+ this.actionPopup = false;
4851
+ this.targetDate = null;
4852
+ this.columnDef = [
4853
+ { Field: "Description", Name: "Description" },
4854
+ { Field: "AssignedTo", Name: "AssignedTo" },
4855
+ { Field: "TargetDate", Name: "TargetDate", DataType: E_DataType.date },
4856
+ { Field: "IsDoneEn", Name: "IsDone", },
4857
+ ];
4858
+ this.translatePipe = new TranslatePipe(this.globalService);
4834
4859
  }
4835
4860
  ngOnInit() {
4836
- this.loadGrid([], 0);
4837
- if (this.EntityTypeId) {
4838
- this.getEntityTypeDetails();
4839
- this.getWorkflowStatusWithStage();
4840
- this.getActiveEntityForm();
4861
+ // this.actRoute.paramMap.subscribe((res) => {
4862
+ //
4863
+ // console.log(res);
4864
+ // if (this.ViewFrom != 'Popup') {
4865
+ // this.RecId = Number(res.get('RecId'));
4866
+ // this.EntityTypeRecId = Number(res.get('EntityTypeRecId'));
4867
+ // }
4868
+ // });
4869
+ this.getTaskDetails();
4870
+ this.getActivity();
4871
+ this.getWorkflowStatusWithStage();
4872
+ // this.getAssignGroupData();
4873
+ // this.getTaskAssignData();
4874
+ }
4875
+ getTaskDetails() {
4876
+ if (this.RecId != null) {
4877
+ this.EntityTypeSetupService.getDynamicById(this.EntityTypeRecId, this.RecId).subscribe((x) => {
4878
+ // alert("a");
4879
+ // ;
4880
+ this._TaskDetail = x;
4881
+ this.stageId = x.ProcessStage;
4882
+ this.EntityTypeId = x.EntityTypeId;
4883
+ this.EntityTypeIdRecId = x.EntityTypeRecId;
4884
+ this.refRecId = x.RecId;
4885
+ this.GetPageList(this.storeCriteria);
4886
+ if (this._TaskDetail && this._TaskDetail.uploadFiles && this._TaskDetail.uploadFiles.length > 0) {
4887
+ this._TaskDetail.uploadFiles.map(x => {
4888
+ if (x.Ext) {
4889
+ x.ExtSm = x.Ext.toLowerCase();
4890
+ x.ExtSm = x.ExtSm.replace('.', '');
4891
+ }
4892
+ });
4893
+ }
4894
+ this.getActivities();
4895
+ this.getEntityFormDetails();
4896
+ // this.getComments();
4897
+ if (this.IsWfAction) {
4898
+ this.getWfStageAction(x.EntityTypeId, x.ProcessStage);
4899
+ }
4900
+ }, (error) => error.error);
4841
4901
  }
4842
- this.getListDatas(this.Searchcriteria);
4843
4902
  }
4844
- getListDatas(Criteria) {
4845
- this.Searchcriteria = Criteria;
4846
- this.entityTypeSetup.getDynamicAll(Criteria, this.EntityTypeId, this.StatusId, this.RequesterId).subscribe((res) => {
4847
- // alert("data");
4848
- this.selfServiceRequestData = res.Data;
4849
- this.totalRecordCount = res.TotalCount;
4850
- console.log('datas', res);
4851
- if (res && res.Data) {
4852
- res.Data = res.Data.map(x => {
4853
- if (x.DateOfRequest) {
4854
- x.DateofRequest = x.DateOfRequest;
4903
+ getEntityFormDetails() {
4904
+ this.EntityDefaultPageGroupsData = [];
4905
+ this.EntityPageGroupsData = [];
4906
+ this.EntityTypeSetupService.getActiveEntityFormByDetails(this.EntityTypeId).subscribe((res) => {
4907
+ if (res.FormData) {
4908
+ let _FormData = JSON.parse(res.FormData);
4909
+ if (_FormData.PageGroup) {
4910
+ if (Array.isArray(_FormData.PageGroup)) {
4911
+ this.EntityPageGroupsData = _FormData.PageGroup;
4855
4912
  }
4856
- return x;
4857
- });
4913
+ }
4914
+ if (_FormData.defaultPageGroups) {
4915
+ if (Array.isArray(_FormData.defaultPageGroups)) {
4916
+ this.EntityDefaultPageGroupsData = _FormData.defaultPageGroups;
4917
+ }
4918
+ }
4858
4919
  }
4859
- this.loadGrid(res.Data, res.TotalCount);
4860
- this.getPageCount();
4920
+ this.EntityFormId = res.RecId;
4861
4921
  }, (error) => {
4862
4922
  console.log(error);
4863
- Swal.fire({
4864
- title: this.translatePipe.transform(error.error),
4865
- });
4866
4923
  });
4867
4924
  }
4868
- loadGrid(data, TotalRecord) {
4869
- if (data) {
4870
- if (data.length > 0)
4871
- this.gridServiceService.onGridRefresh.next({
4872
- isTrue: true,
4873
- list: data,
4874
- count: data.length,
4875
- grid: 1,
4876
- totalRecordCount: TotalRecord,
4877
- });
4878
- else
4879
- this.gridServiceService.onGridRefresh.next({
4880
- isTrue: true,
4881
- grid: 1,
4882
- list: [],
4883
- count: 0,
4884
- totalRecordCount: 0,
4925
+ getWorkflowActionComments(comments, updateFileds, updateFieldsObject) {
4926
+ // alert("zz");
4927
+ let updateFieldsObjectString = JSON.stringify(updateFieldsObject);
4928
+ this.EntityTypeSetupService.urlPostTaskWfAction(this.RecId, this.stageId, this.action, comments, updateFileds, updateFieldsObjectString, this.EntityTypeId).subscribe((res) => {
4929
+ // this.wfActionData = res;
4930
+ this.getTaskDetails();
4931
+ console.log(res);
4932
+ }, (error) => {
4933
+ var _a, _b, _c;
4934
+ error.error;
4935
+ if (((_a = error.error) === null || _a === void 0 ? void 0 : _a.status) == false) {
4936
+ let msg = JSON.parse((_b = error.error) === null || _b === void 0 ? void 0 : _b.msg);
4937
+ if (msg && msg.msg) {
4938
+ msg = msg.msg;
4939
+ }
4940
+ else {
4941
+ msg = (_c = error.error) === null || _c === void 0 ? void 0 : _c.msg;
4942
+ }
4943
+ Swal.fire(this.translatePipe.transform(msg));
4944
+ }
4945
+ else {
4946
+ Swal.fire(this.translatePipe.transform(error.ExceptionMessage), this.translatePipe.transform(error.message));
4947
+ }
4948
+ });
4949
+ }
4950
+ getComments() {
4951
+ // alert("getcommends");
4952
+ if (this.refRecId != null) {
4953
+ this.ticketService.urlGetTicketUpdateByRecId(this.refRecId).subscribe((x) => {
4954
+ // alert("getcommends");
4955
+ this.commentsData = x.Data;
4956
+ this.commentsDataCount = x.TotalCount;
4957
+ }, (error) => {
4958
+ // Swal.fire(error);
4959
+ Swal.fire({
4960
+ title: this.translatePipe.transform(error.error),
4885
4961
  });
4886
- }
4887
- else
4888
- this.gridServiceService.onGridRefresh.next({
4889
- isTrue: true,
4890
- grid: 1,
4891
- list: [],
4892
- count: 0,
4893
- totalRecordCount: 0,
4962
+ // error.error
4894
4963
  });
4964
+ }
4895
4965
  }
4896
- viewType(data, index) {
4897
- this.selectedIndex = index;
4898
- this.viewTypeData = data.id;
4899
- }
4900
- backtoCard() {
4901
- this.CreateItemId = null;
4902
- this.isShowCreateRequest = false;
4903
- this.supportService.IsShowBackBtn = false;
4904
- }
4905
- getEntityTypeDetails() {
4906
- this.entityTypeSetup
4907
- .getSingleEntityTypeSetupById(this.EntityTypeId)
4966
+ getActivity() {
4967
+ //this.EntityType = data.EntityType;
4968
+ this.EntityTypeSetupService.getAllAssinedActivites(this.Searchcriteria, this.EntityTypeRecId)
4969
+ // this.EntityTypeSetupService.getActiveEntityTypeSetup(this.Searchcriteria, this.EntityType, "")
4908
4970
  .subscribe((res) => {
4909
- this.EntityTypeDetail = res;
4910
- if (this.globalService.CurrentLanguage == 'Ar') {
4911
- this.pageTitle = this.EntityTypeDetail.DescriptionAr;
4912
- }
4913
- else {
4914
- this.pageTitle = this.EntityTypeDetail.Description;
4971
+ this.ActivityFields = res.Data;
4972
+ if (this.ActivityFields.length > 0) {
4973
+ const sortBy = ['Task', 'SMS', 'Email', 'Notes', 'Comments']; //sort by descending order
4974
+ this.ActivityFields = this.ActivityFields.sort((a, b) => sortBy.indexOf(b.Description) - sortBy.indexOf(a.Description));
4975
+ let taskActivity = { Description: 'Task', RecId: 58, Type: 'Task' };
4976
+ this.ActivityFields.push(taskActivity);
4977
+ this.openDefaultComments();
4915
4978
  }
4916
- }, (error) => {
4917
- console.log(error);
4918
4979
  });
4919
4980
  }
4920
- getActiveEntityForm() {
4921
- this.entityTypeSetup.getActiveEntityFormByList(this.EntityTypeId).subscribe((res) => {
4922
- this.ActiveEntityTypeForm = res;
4923
- this.getFormList();
4924
- }, (error) => {
4925
- console.log(error);
4926
- });
4981
+ getActivityFileUploads(item) {
4982
+ if (item.showform && item.RecId && item.ActivityTypeId) {
4983
+ this.EntityTypeSetupService.getActivityUploadFile(item.RecId, this.EntityTypeRecId, item.ActivityTypeId)
4984
+ .subscribe((res) => {
4985
+ if (res && res.length > 0) {
4986
+ item.uploadFiles = res;
4987
+ }
4988
+ });
4989
+ }
4927
4990
  }
4928
- getFormList() {
4929
- let _listdata = this.ActiveEntityTypeForm.DetailsViewData;
4930
- if (_listdata) {
4931
- let list = JSON.parse(_listdata);
4932
- if (list && list.length > 0) {
4933
- this.columnDefs = [];
4934
- this.columnDefs.push({
4935
- Field: 'CaseId',
4936
- Name: 'CaseId',
4937
- FieldType: E_FieldType.details,
4938
- });
4939
- for (let index = 0; index < list.length; index++) {
4940
- let fields = list[index].Fields;
4941
- if (fields) {
4942
- let _column = {
4943
- Field: fields.Description,
4944
- Name: fields.Label,
4945
- DataType: fields.DataType,
4946
- };
4947
- this.columnDefs.push(_column);
4948
- }
4949
- else {
4950
- let _currfield = list[index];
4951
- this.columnDefs.push(_currfield);
4952
- }
4991
+ getActivityFileUploadsReadonly(item) {
4992
+ if (item.RecId && item.ActivityTypeId) {
4993
+ this.EntityTypeSetupService.getActivityUploadFile(item.RecId, this.EntityTypeRecId, item.ActivityTypeId)
4994
+ .subscribe((res) => {
4995
+ if (res && res.length > 0) {
4996
+ item.uploadFiles = res;
4953
4997
  }
4954
- this.columnDefs.push({ Field: "ProcessStageEn", Name: 'Process Stage' });
4955
- }
4998
+ this.ActivityTypeReadonly.push(item);
4999
+ });
4956
5000
  }
4957
5001
  }
4958
- openPopupCreatePage() {
4959
- this.CreateItemId = this.EntityTypeId;
4960
- this.isShowCreateRequest = true;
4961
- this.supportService.IsShowBackBtn = true;
5002
+ addEvents(data) {
5003
+ this.openPopupCreatePage(data);
4962
5004
  }
4963
- closePopupCreateView(Type, Data) {
5005
+ openPopupCreatePage(item) {
4964
5006
  this.CreateItemId = null;
4965
- this.isShowCreateRequest = false;
4966
- }
4967
- getPaginationListData(pageNo, pageSize) {
4968
- this.pageNo = pageNo;
4969
- if (pageSize)
4970
- this.pageSize = pageSize;
4971
- this.Searchcriteria.Pagging.PageNo = this.pageNo;
4972
- this.Searchcriteria.Pagging.PageSize = this.pageSize;
4973
- //this._getPageList();
4974
- this.getListDatas(this.Searchcriteria);
4975
- this.getPageCount();
4976
- }
4977
- getPageCount() {
4978
- this.pageCount = Math.ceil(this.totalRecordCount / this.pageSize);
4979
- }
4980
- openDetailsPopup(data) {
4981
- this.isDetails = true;
4982
- this.CaseId = data.CaseId;
4983
- this.detailsRecId = data.RecId; // RefRecId is the main recid
4984
- this.detailsEntityTypeRecId = data.EntityTypeRecId;
4985
- this.supportService.IsShowBackBtn = true;
4986
- this.displayPopupDetailView = true;
4987
- }
4988
- closePopupDetailView() {
4989
- this.isDetails = false;
4990
- this.detailsRecId = null;
4991
- this.detailsEntityTypeRecId = null;
4992
- this.displayPopupDetailView = false;
4993
- this.supportService.IsShowBackBtn = false;
5007
+ setTimeout(() => (this.CreateItemId = item.RecId), 0);
5008
+ this.selectedActivityItem = item;
5009
+ if (item.Description != 'Comments')
5010
+ this.displayPopupCreateView = true;
5011
+ // this.Activity=item.RecId;
4994
5012
  }
4995
- SortGridData(item) {
4996
- if (item) {
4997
- this.CurrentSortingField = item.Name;
4998
- if (this.SortingField.direction == '0')
4999
- this.SortingField.direction = '1';
5000
- else
5001
- this.SortingField.direction = '0';
5002
- this.SortingField.field = item.Field;
5003
- }
5004
- else {
5005
- this.CurrentSortingField = null;
5006
- this.SortingField.direction = '0';
5013
+ closePopupCreateView(Type) {
5014
+ this.CreateItemId = null;
5015
+ this.displayPopupCreateView = false;
5016
+ if (Type == 'Create') {
5017
+ this.getActivities();
5018
+ this.openDefaultComments();
5007
5019
  }
5008
- this.getListDatas(this.Searchcriteria);
5009
5020
  }
5010
- SortDirection(direction) {
5011
- this.SortingField.direction = direction;
5012
- this.getListDatas(this.Searchcriteria);
5021
+ slider(direction, Id) {
5022
+ this.slide(direction, Id);
5013
5023
  }
5014
- searchData(event) {
5015
- let filtervals = [];
5016
- if (event.keyCode == 13 && this.SearchBox != null) {
5017
- filtervals.push({
5018
- Field: 'CaseId:IqamaNumber:PassportNumber:BorderNumber:MobileNumber:LabourId:LaborName',
5019
- TableAlias: '',
5020
- Operator: '',
5021
- Value: this.SearchBox,
5022
- });
5023
- this.Searchcriteria.Where = filtervals;
5024
- this.getListDatas(this.Searchcriteria);
5025
- }
5024
+ slide(direction, Id) {
5025
+ debugger;
5026
+ let container = document.getElementById(Id);
5027
+ let scrollCompleted = 0;
5028
+ let slideVar = setInterval(function () {
5029
+ if (direction == 'left') {
5030
+ container.scrollLeft -= 50;
5031
+ }
5032
+ else {
5033
+ container.scrollLeft += 50;
5034
+ }
5035
+ scrollCompleted += 10;
5036
+ if (scrollCompleted >= 50) {
5037
+ window.clearInterval(slideVar);
5038
+ }
5039
+ }, 50);
5026
5040
  }
5027
5041
  getWorkflowStatusWithStage() {
5028
- this.entityTypeSetup
5029
- .getAllWfStage(null, this.EntityTypeId, true)
5042
+ this.EntityTypeSetupService.getAllWfStage(null, this.EntityTypeRecId, true)
5030
5043
  .subscribe((res) => {
5044
+ // alert("StatusAndStageList");
5031
5045
  this.StatusAndStageList = res.Data;
5032
5046
  // .sort((a, b) => {
5033
5047
  // if (a.StageId < b.StageId) return -1;
@@ -5035,640 +5049,212 @@ class CaseListComponent {
5035
5049
  // else return 0;
5036
5050
  // });
5037
5051
  let showallIndex = this.StatusAndStageList.findIndex(x => x.OrderId == -1);
5038
- let arrayindex = this.StatusAndStageList.length - 1;
5039
- let element = this.StatusAndStageList.splice(showallIndex, 1)[0];
5040
- this.StatusAndStageList.splice(arrayindex, 0, element);
5041
- this.selectStage(this.StatusAndStageList[0]);
5042
- console.log(res.Data);
5052
+ this.StatusAndStageList.splice(showallIndex, 1);
5053
+ let showPendingIndex = this.StatusAndStageList.findIndex(x => x.OrderId == 0);
5054
+ this.StatusAndStageList.splice(showPendingIndex, 1);
5043
5055
  }, (error) => {
5044
5056
  var _a;
5045
5057
  console.log(error);
5046
5058
  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');
5047
5059
  });
5048
5060
  }
5049
- selectStage(item) {
5050
- this.totalRecordCount = 0;
5051
- this.selectedStage = item.RecId;
5052
- this.selectedStageobj = item;
5053
- if (item.StageId != null) {
5054
- this.StatusId = item.StageId;
5061
+ selectProcess(item) {
5062
+ if (this.selectedProcess)
5063
+ this.showStageDetails = false;
5064
+ if (this.selectedProcess && this.selectedProcess.ProcessStage == item.StageId) {
5065
+ setTimeout(() => (this.selectedProcess = null), 500);
5055
5066
  }
5056
5067
  else {
5057
- this.StatusId = null;
5058
- this.Searchcriteria.Where = null;
5068
+ this.showStageDetails = true;
5069
+ this.selectedProcessList = this.ProcessStageList.filter((x) => x.ProcessStage == item.StageId);
5070
+ this.selectedProcess =
5071
+ this.selectedProcessList[this.selectedProcessList.length - 1];
5059
5072
  }
5060
- this.getWfStageAction(this.EntityTypeId, this.StatusId);
5061
- this.getListDatas(this.Searchcriteria);
5062
5073
  }
5063
- getWfStageAction(EntityTypeId, StageId) {
5064
- this.entityTypeSetup.urlGetWfStageAction(EntityTypeId, StageId).subscribe((res) => {
5065
- this.wfActionData = res;
5066
- console.log(res);
5067
- }, (error) => {
5068
- error.error;
5069
- });
5074
+ closeProcess() {
5075
+ this.showStageDetails = false;
5076
+ setTimeout(() => (this.selectedProcess = null), 500);
5070
5077
  }
5071
- getStatusField(data) {
5072
- if (this.GridCheckedData.length <= 0) {
5073
- Swal.fire(this.translatePipe.transform('Atleast Select One Row'));
5074
- return;
5075
- }
5076
- this.action = data.ActionRecId;
5077
- this.workflowEntityFormId = data.WorkFlowForm;
5078
- this.showWorkflowPopup = true;
5079
- this.entityTypeSetup.onshowWorkflowPopup.next({
5080
- showWorkflowPopup: true,
5081
- fieldConfig: [],
5078
+ gridChangeTabs(data) {
5079
+ this.tabDisplayView = Number(data);
5080
+ }
5081
+ loadMoreActivities() {
5082
+ this.activitySearchcriteria.Pagging.PageSize += 10;
5083
+ this.getActivities();
5084
+ }
5085
+ getActivities() {
5086
+ debugger;
5087
+ // let ActivityId = 5;
5088
+ this.EntityTypeSetupService
5089
+ .getDynamicByEntityRefrecid(this.EntityTypeRecId, this.refRecId, this.activitySearchcriteria, this.Activity)
5090
+ .subscribe((res) => {
5091
+ debugger;
5092
+ this.ActivityType = res.Data;
5093
+ if (res && res.Data)
5094
+ this.ActivityTypeReadonly = [];
5095
+ res.Data.forEach(x => {
5096
+ this.getActivityFileUploadsReadonly(x);
5097
+ });
5098
+ this.setTimeline();
5099
+ this.TotalActivity = res.TotalCount;
5100
+ console.log('Activity', res.Data);
5082
5101
  });
5083
- // this.EntityTypeSetupService.urlGetStatusField(data.ActionRecId).subscribe(
5084
- // (res: any) => {
5085
- //
5086
- // this.wfStatusFields = res.Data;
5087
- // this.EntityTypeSetupService.onshowWorkflowPopup.next({
5088
- // showWorkflowPopup: true,
5089
- // fieldConfig: res.Data,
5102
+ (error) => {
5103
+ error.error;
5104
+ };
5105
+ }
5106
+ setTimeline() {
5107
+ this.TimelineList = [];
5108
+ this.TimelineListReadonly = [];
5109
+ if (Array.isArray(this.ActivityType)) {
5110
+ if (this.ActivityType.length > 0)
5111
+ this.TimelineList.push(...this.ActivityType);
5112
+ this.TimelineListReadonly.push(...this.ActivityType);
5113
+ }
5114
+ if (Array.isArray(this.ActivityTypeReadonly)) {
5115
+ if (this.ActivityTypeReadonly.length > 0)
5116
+ this.TimelineListReadonly.push(...this.ActivityTypeReadonly);
5117
+ }
5118
+ // if (Array.isArray(this.TaskList)) {
5119
+ // if (this.TaskList.length > 0) this.TimelineList.push(...this.TaskList);
5120
+ // }
5121
+ // if (Array.isArray(this.ProcessStageList)) {
5122
+ // if (this.ProcessStageList.length > 0) {
5123
+ // this.ProcessStageList = this.ProcessStageList.map((x) => {
5124
+ // x.Type = 'Workflow';
5125
+ // x.ActivityTypeIdEn = 'Comments';
5126
+ // return x;
5090
5127
  // });
5091
- // // this.showWorkflowPopup = true;
5092
- // console.log(res);
5093
- // },
5094
- // (error) => {
5095
- //
5096
- // error.error;
5128
+ // this.TimelineList.push(...this.ProcessStageList);
5097
5129
  // }
5098
- // );
5099
- }
5100
- getgridCheckedData(item) {
5101
- this.GridCheckedData = item;
5130
+ // }
5131
+ this.TimelineList.sort((a, b) => {
5132
+ if (a.CreatedDatetime < b.CreatedDatetime)
5133
+ return -1;
5134
+ else if (a.CreatedDatetime > b.CreatedDatetime)
5135
+ return 1;
5136
+ else
5137
+ return 0;
5138
+ });
5139
+ this.TimelineListReadonly.sort((a, b) => {
5140
+ if (a.CreatedDatetime < b.CreatedDatetime)
5141
+ return -1;
5142
+ else if (a.CreatedDatetime > b.CreatedDatetime)
5143
+ return 1;
5144
+ else
5145
+ return 0;
5146
+ });
5102
5147
  }
5103
- getWorkflowActionComments(comments, updateFileds, updateFieldsObject) {
5104
- // alert("zz");
5105
- // let updateFieldsObjectString = JSON.stringify(updateFieldsObject);
5106
- let updateFieldsObjectString = '';
5107
- let RecIds = [];
5108
- if (this.GridCheckedData.length > 0) {
5109
- this.GridCheckedData.forEach(x => {
5110
- RecIds.push(x.RecId);
5148
+ GetPageList(Criteria) {
5149
+ if (this.EntityTypeId != null) {
5150
+ this.storeCriteria = Criteria;
5151
+ // let data: Observable<IEntityWFstageVM[]>;
5152
+ this.EntityTypeSetupService.getWfInsProcessStageComments(Criteria, this.EntityTypeId, this.refRecId).subscribe((res) => {
5153
+ // alert("grid data");
5154
+ this.ProcessStageList = res.Data;
5155
+ this.setTimeline();
5156
+ console.log(res);
5157
+ this.loadGrid(res.Data, res.TotalCount);
5158
+ }, (error) => {
5159
+ var _a;
5160
+ console.log(error);
5161
+ this.loadGrid([], 0);
5162
+ 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');
5111
5163
  });
5112
5164
  }
5113
- this.entityTypeSetup.urlPostTicketWfActionMultiple(RecIds, this.StatusId, this.action, comments, updateFileds, updateFieldsObjectString, this.EntityTypeId).subscribe((res) => {
5114
- Swal.fire('Action Updated Successfully');
5115
- this.getListDatas(this.Searchcriteria);
5165
+ }
5166
+ fileChange(event) {
5167
+ this.fileList = event.target.files;
5168
+ }
5169
+ commentSubmit() {
5170
+ let data = {
5171
+ commnets: this.Comments,
5172
+ refRecId: this.RecId,
5173
+ entitytyperecid: this.EntityTypeRecId
5174
+ };
5175
+ // this.service.urlComments(data).subscribe(
5176
+ // (x: any) => this.taskAssignData = x);
5177
+ let formData = new FormData();
5178
+ if (this.fileList && this.fileList.length > 0) {
5179
+ let file = this.fileList[0];
5180
+ formData.append('Files', file, file.name);
5181
+ }
5182
+ this.EntityTypeSetupService.postTaskComments(this.fileList, data).subscribe((x) => {
5183
+ this.Comments = null;
5184
+ this.CommentsTitle = null;
5185
+ this.TaskCommentFile = null;
5186
+ this.getComments();
5187
+ }, (error) => error.error);
5188
+ }
5189
+ // commentsActivityItem:any = null;
5190
+ openDefaultComments() {
5191
+ this.commentsActivityItem = this.ActivityFields.filter((x) => x.ActionType == '5')[0];
5192
+ // if (comments && comments.length > 0) {
5193
+ // this.commentsActivityItem = null;
5194
+ // setTimeout(() => (this.commentsActivityItem = comments[0]), 0);
5195
+ // this.commentsActivityItem = comments[0];
5196
+ // this.openPopupCreatePage(comments[0]);
5197
+ // }
5198
+ // else {
5199
+ // this.openPopupCreatePage(this.ActivityFields[0]);
5200
+ // }
5201
+ }
5202
+ getWfStageAction(EntityTypeId, StageId) {
5203
+ if (EntityTypeId == null)
5204
+ return;
5205
+ this.EntityTypeSetupService.urlGetWfStageAction(EntityTypeId, StageId).subscribe((res) => {
5206
+ // res = [{"Action":10,"ActionDescription":"InProgress","StageRecId":1,"ActionComplete":null,"ProcessId":null,"StageId":1,"StageTypeId":1,"ActionRecId":1,"StageDescription":"New"}]
5207
+ this.wfStageAction = res;
5116
5208
  console.log(res);
5117
5209
  }, (error) => {
5118
- var _a, _b, _c;
5119
5210
  error.error;
5120
- if (((_a = error.error) === null || _a === void 0 ? void 0 : _a.status) == false) {
5121
- let msg = JSON.parse((_b = error.error) === null || _b === void 0 ? void 0 : _b.msg);
5122
- if (msg && msg.msg) {
5123
- msg = msg.msg;
5124
- }
5125
- else {
5126
- msg = (_c = error.error) === null || _c === void 0 ? void 0 : _c.msg;
5127
- }
5128
- Swal.fire(this.translatePipe.transform(msg));
5129
- }
5130
- else {
5131
- Swal.fire(this.translatePipe.transform(error.ExceptionMessage), this.translatePipe.transform(error.message));
5132
- }
5133
5211
  });
5134
5212
  }
5135
- slider(direction, Id) {
5136
- slide(direction, Id);
5213
+ getStatusField(data) {
5214
+ this.action = data.ActionRecId;
5215
+ this.workflowEntityFormId = data.WorkFlowForm;
5216
+ this.showWorkflowPopup = true;
5217
+ this.EntityTypeSetupService.onshowWorkflowPopup.next({
5218
+ showWorkflowPopup: true,
5219
+ fieldConfig: [],
5220
+ });
5137
5221
  }
5138
- }
5139
- CaseListComponent.decorators = [
5140
- { type: Component, args: [{
5141
- selector: 'app-case-list',
5142
- template: "<div class=\"req_page whole\" [ngClass]=\"{'lang_Arabic': globalService.CurrentLanguage=='Ar'}\">\r\n <div class=\"whole m-t-10\">\r\n <div class=\"clearfix\" *ngIf=\"!isShowCreateRequest && !isDetails\">\r\n <div class=\"float-left\" style=\"width: calc(100% - 50px);\">\r\n <div class=\"progress-wrap\">\r\n <div id=\"progress-container\">\r\n <div class=\"line\"></div>\r\n <ul id=\"slider-arrow\">\r\n <li class=\"clearfix\" *ngFor=\"let item of StatusAndStageList;let i= index\" (click)=\"selectStage(item)\">\r\n <span class=\"circle-content\" [ngClass]=\"{'active':selectedStage==item.RecId}\">\r\n <i *ngIf=\"item.StageIcon else elseicon;\" [ngClass]=\"item.StageIcon\"></i>\r\n <ng-template #elseicon>\r\n <i class=\"la la-list-alt\" *ngIf=\"item?.StageId == -1\"></i>\r\n <i class=\"la la-hourglass-half\" *ngIf=\"item?.StageId == 0\"></i>\r\n <i class=\"las la-clipboard-check\" *ngIf=\"item?.StageId != 0 && item?.StageId != -1\"></i>\r\n </ng-template>\r\n </span>\r\n <br>\r\n <a href=\"javascript:void(0);\" class=\"text-center\">\r\n {{item.StageDescription |translate}} \r\n <br>\r\n <span class=\"badge\" *ngIf=\"selectedStage==item.RecId\">{{totalRecordCount}}</span>\r\n <!-- <br>\r\n <span> {{item?.StageId}} - {{item?.RecordsStatusEn |translate}}</span> -->\r\n </a>\r\n </li>\r\n </ul>\r\n <!-- <ul>\r\n <li><i class=\"fa fa-check-square-o\"></i> <p>Step 1</p></li>\r\n <li><i class=\"fa fa-times\"></i><p>Step 2</p></li>\r\n <li><p>Step 3</p></li>\r\n </ul> -->\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!isShowCreateRequest && !isDetails\" class=\"float-right\" style=\"width: 50px;border-radius: 5px 5px 0 0;background: #dddddd;\">\r\n <a href=\"javascript:void(0);\" class=\"arrownext\" style=\"font-size:22px;\" (click)=\"slider('left','slider-arrow')\"><i class=\"fa fa-arrow-left\"></i></a>\r\n <a href=\"javascript:void(0);\" class=\"arrownext\" style=\"font-size:22px;\" (click)=\"slider('right','slider-arrow')\"><i class=\"fa fa-arrow-right\"></i></a>\r\n </div> \r\n </div>\r\n <div class=\"workflow\" *ngIf=\"!isShowCreateRequest && !isDetails && false\">\r\n <ul>\r\n <li *ngFor=\"let item of StatusAndStageList\" class=\"clearfix\">\r\n <a href=\"javascript:void(0);\" (click)=\"selectStage(item)\">StageDescriptionAr\r\n {{globalService.CurrentLanguage=='Ar' ? (item.StageDescriptionAr ? item.StageDescriptionAr : (item.StageDescription|translate) ) : (item.StageDescription |translate)}} - <sup *ngIf=\"selectedStage==item.RecId\"> {{totalRecordCount}}</sup>\r\n <span> {{item?.StageId}} - {{item?.RecordsStatusEn |translate}}</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n <h2 class=\"heading pull-left\" style=\"font-size: 23px !important;\">{{pageTitle |translate}}\r\n <span *ngIf=\"isShowCreateRequest\">- {{'Create'|translate}}</span>\r\n <span *ngIf=\"displayPopupDetailView\">- {{'Details'|translate}}</span>\r\n </h2>\r\n <div class=\"pull-left\" *ngIf=\"!(isShowCreateRequest || isDetails)\">\r\n <div class=\"pull-left create_req hierarchy-view\">\r\n <button class=\"add_req_btn\" (click)=\"openPopupCreatePage()\">\r\n {{'CreateNew'|translate}}\r\n <i class=\"fa fa-plus\" style=\"float: right;margin: 4px 1px 2px 8px;\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"pull-right m-r-10\" *ngIf=\"isDetails\">\r\n <button class=\"btn btn-outline btn-danger\" (click)=\"closePopupDetailView()\">\r\n <i class=\"la la-arrow-left\"></i>\r\n {{'Back'|translate}}\r\n </button>\r\n </div>\r\n <div class=\"pull-right m-r-10\" *ngIf=\"isShowCreateRequest\">\r\n <button class=\"btn btn-outline btn-danger\" (click)=\"backtoCard()\">\r\n <i class=\"la la-arrow-left\"></i>\r\n {{'Back'|translate}}\r\n </button>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"!(isShowCreateRequest || isDetails)\">\r\n \r\n <div class=\"whole bg-white p-3\">\r\n <div class=\"m-r-10 pull-left status_dropdown_div\" *ngIf=\"false\">\r\n <div class=\"dropdown status_dropdown pull-left\" style=\"min-width: 200px;\" *ngIf=\"false\">\r\n\r\n <ng-select *ngIf=\"globalService.CurrentLanguage == 'Ar' else elseEng\" (change)=\"filterStatus()\"\r\n [(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\" [placeholder]=\"'\u062D\u0627\u0644\u0629'\" bindLabel=\"NameAr\"\r\n bindValue=\"Name\">\r\n </ng-select>\r\n <ng-template #elseEng>\r\n <ng-select (change)=\"filterStatus()\" [(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\"\r\n [placeholder]=\"'Status'\" bindLabel=\"Name\" bindValue=\"Name\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class=\"pull-left\">\r\n <div class=\"m-r-10 pull-left sort_div\">\r\n <div class=\"dropdown sort_dropdown pull-left\" style=\"min-width: 240px;\">\r\n\r\n <ng-select *ngIf=\"globalService.CurrentLanguage == 'Ar' else elseTemplate\" [items]=\"FieldListDDL\"\r\n [placeholder]=\"'\u0646\u0648\u0639'\" bindLabel=\"FieldAr\" bindValue=\"Name\" (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n\r\n <ng-template #elseTemplate>\r\n <ng-select [items]=\"FieldListDDL\" [placeholder]=\"'Sort'\" bindLabel=\"Name\" bindValue=\"Field\"\r\n (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n <ng-container *ngIf=\"CurrentSortingField\">\r\n <span class=\"pull-right sort-icon\" style=\" font-size: 20px;\">\r\n <i class=\"la la-sort-amount-asc\" *ngIf=\"SortingField.direction=='0'\" (click)=\"SortDirection(1)\"></i>\r\n <i class=\"la la-sort-amount-desc\" *ngIf=\"SortingField.direction=='1'\" (click)=\"SortDirection(0)\"></i>\r\n </span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"pull-right\">\r\n <div class=\"custom-dropdown\" *ngIf=\"wfActionData.length > 0\">\r\n <!-- -->\r\n <div class=\"custom-dropdown\" style=\"color: #fff;border-radius: 10px;margin-bottom: 10px;background: #339e33;\">\r\n <div class=\"dropdown\">\r\n <button class=\"dropbtn btn btn-success\">{{'Action'|translate}}</button>\r\n <div class=\"dropdown-content\">\r\n <span *ngIf=\"wfActionData.length<= 0\">\r\n <a href=\"javascript:void(0);\" class=\"dropdownlist\">\r\n {{'No Action Found'|translate}}\r\n </a>\r\n </span>\r\n <span *ngFor=\"let item of wfActionData\">\r\n <a href=\"javascript:void(0);\" class=\"dropdownlist\" (click)=\"getStatusField(item)\">{{item.ActionDescription |translate}}</a>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"pull-right\">\r\n\r\n <input placeholder=\"{{'Search the CaseId/Iqama/Name here' | translate }}\" type=\"text\" class=\"serach_box pull-left\"\r\n [(ngModel)]=\"SearchBox\" (keyup)=\"searchData($event)\">\r\n\r\n <a href=\"javascript:void(0)\" class=\"themecolor action-btn m-r-10\" style=\"color: #000;font-size: 20px;\"\r\n *ngFor=\"let item of viewTypes; let i = index\" [ngClass]=\"{'themecolor':selectedIndex != i}\">\r\n <span [class.active]=\"selectedIndex === i\" (click)=\"viewType(item, i)\">\r\n <i class=\"la {{item.class}}\"></i>\r\n </span>\r\n </a>\r\n\r\n\r\n </div>\r\n \r\n </div>\r\n\r\n <div class=\"body whole\">\r\n <div *ngIf=\"viewTypeData ==2\">\r\n <div class=\"lists\" *ngFor=\"let item of selfServiceRequestData\">\r\n\r\n <div class=\"assign_to_div\" (click)=\"openDetailsPopup(item)\">\r\n <p>{{'ID' | translate}}</p>\r\n <span>#{{item?.CaseId}}</span>\r\n </div>\r\n\r\n <div class=\"content\" (click)=\"openDetailsPopup(item)\">\r\n <h4 class=\"themecolor\">{{'#'+item.LabourId}} | {{item.LaborName}} </h4>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Iqama Number'|translate}} </i>: {{item.IqamaNumber}}</span>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Passport Number'|translate}} </i>: {{item.PassportNumber}}</span>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Border Number'|translate}} </i>: {{item.BorderNumber}}</span>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Mobile Number'|translate}} </i>: {{item.MobileNumber}}</span>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Nationality'|translate}} </i>: {{item.NationalityEn}}</span>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Profession'|translate}} </i>: {{item.ProfessionEn}}</span>\r\n <div class=\"line_2\">\r\n <div class=\"pull-left\">{{'Added On'|translate}} {{item.CreatedDatetime | date}} {{'By'|translate}}\r\n {{item.CreatedBy}}</div>\r\n </div>\r\n <p>{{item.Description}}</p>\r\n <!-- <span><i class=\"text-bold\">Assigned Date </i>: {{item.AssignedDate | date}}</span>\r\n <span><i class=\"text-bold\">DeadLine Date </i>: {{item.DeadLineDateTime | date}}</span> -->\r\n <!-- <p>Steps:1.Login to Bugasura with valid user.2.Select respective project and open it 3.In issues list search enter text for search and hit enter button4.</p> -->\r\n </div>\r\n\r\n <div class=\"req_id\" (click)=\"openDetailsPopup(item)\">\r\n <!-- <label>{{item.CaseTypeIdEn}}</label>\r\n <p>{{item.CaseTypeId}}</p> -->\r\n <span><span class=\"text-bold\">{{globalService.CurrentLanguage =='Ar' ? (item.CaseTypeIdAr ? item.CaseTypeIdAr\r\n :\r\n (item.CaseTypeIdEn |translate)) : item.CaseTypeIdEn}}</span></span>\r\n <span><i class=\"text-bold\">{{'Request Date'|translate}} </i>: {{(item.DateofRequest ? item.DateofRequest : DateOfRequest) | date}}</span>\r\n <span><i class=\"text-bold\">{{'Start Date'|translate}} </i>: {{item.StartDate | date}}</span>\r\n <span><i class=\"text-bold\">{{'End Date'|translate}} </i>: {{item.EndDate | date}}</span>\r\n <!-- <span><i class=\"text-bold\"> {{'DeadLine Date' | translate}} </i>: {{item.DeadLineDateTime | date}}</span> -->\r\n </div>\r\n <div class=\"prioritys\">\r\n <div class=\"custom-dropdown\" *ngIf=\"wfActionData.length > 0 && false\">\r\n <!-- *ngIf=\"wfActionData.length > 0\" -->\r\n <div class=\"custom-dropdown\" style=\"color: #fff;border-radius: 10px;margin-bottom: 10px;background: #339e33;\">\r\n <div class=\"dropdown\">\r\n <a href=\"javascript:void(0)\" class=\"dropbtn atext\">{{'Action'|translate}} <i class=\"fa fa-sort-desc m-r-5\"></i></a>\r\n <div class=\"dropdown-content\">\r\n <span *ngIf=\"wfActionData.length<= 0\">\r\n <a href=\"javascript:void(0);\" class=\"dropdownlist\">\r\n {{'No Action Found'|translate}}\r\n </a>\r\n </span>\r\n <span *ngFor=\"let item of wfActionData\">\r\n <a href=\"javascript:void(0);\" class=\"dropdownlist\" (click)=\"getStatusField(item)\">{{item.ActionDescription |translate}}</a>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span class=\"priority\" [ngClass]=\"item?.PriorityEn\">{{globalService.CurrentLanguage =='Ar' ? (item?.PriorityAr\r\n ?\r\n item?.PriorityAr : (item?.PriorityEn |translate)) : item?.PriorityEn }}\r\n <ng-container *ngIf=\"item.PriorityEn == null\">{{'Medium'|translate}}</ng-container>\r\n </span>\r\n <span class=\"priority\" style=\"background: #3535f238;color: #9c5145;\">{{globalService.CurrentLanguage =='Ar' ? (item?.ProcessStageAr\r\n ?\r\n item?.ProcessStageAr : (item?.ProcessStageEn |translate)) : item?.ProcessStageEn }}\r\n </span>\r\n\r\n <div class=\"status\" [ngClass]=\"item?.StatusIdEn\">\r\n <span>{{item?.StatusIdEn |translate}}\r\n <ng-container *ngIf=\"item.StatusIdEn == null\">{{'New'|translate}}</ng-container>\r\n </span>\r\n </div>\r\n\r\n </div>\r\n <!-- <div class=\"assign_to_div\">\r\n <p>{{'Assigned To' | translate}}</p>\r\n <i class=\"las la-user-circle\" title=\"{{item.AssignedTo }}\"></i>\r\n </div> -->\r\n <div class=\"comments\" (click)=\"openDetailsPopup(item)\">\r\n <div>\r\n <i class=\"fa fa-comments-o\" aria-hidden=\"true\"></i>\r\n <span>{{item.CommentsCount}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <app-pagination *ngIf=\"!IsClientPagination\" [totalCount]=\"totalRecordCount\" [pageCount]=\"pageCount\"\r\n [currentPage]=\"pageNo\" [pageSize]=\"pageSize\" [gridSearchType]=\"GridSearchType\"\r\n (getPaginationListData)=\"getPaginationListData($event.pageCount,$event.pageSize)\">\r\n </app-pagination>\r\n </div>\r\n <div *ngIf=\"viewTypeData ==1\">\r\n <app-grid [columnDefs]=\"columnDefs\" [GridTitle]=\"pageTitle\" \r\n [selectMode]=\"selectMode\" [IsCreate]=\"false\" [IsDelete]=\"false\"\r\n [IsEdit]=\"false\" [grid]=\"1\" (getPageList)=\"getListDatas($event.Criteria)\" (getGridCheckedData)=\"getgridCheckedData($event.gridData)\" (goToDetails)=\"openDetailsPopup($event.data)\">\r\n </app-grid>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"isDetails && detailsRecId\">\r\n\r\n <app-support-request-details [ViewFrom]=\"'Popup'\" [IsWfAction]=\"true\" [RecId]=\"detailsRecId\" [EntityTypeRecId]=\"detailsEntityTypeRecId\">\r\n </app-support-request-details>\r\n\r\n </ng-container>\r\n\r\n\r\n <ng-container *ngIf=\"isShowCreateRequest\">\r\n\r\n <app-support-request-create class=\"support_req_div\" *ngIf=\"CreateItemId\" [ViewFrom]=\"'Popup'\" [Source]=\"Source\"\r\n [IssueType]=\"11\" [IssueTypeEn]=\"'Customer Self Service'\"\r\n [CreatedByUserType]=\"RequesterTypeId\" [Channel]=\"Channel\" [ChannelEn]=\"ChannelEn\" [ChannelAr]=\"ChannelAr\"\r\n [RequesterId]=\"RequesterId\" [RequesterIdEn]=\"RequesterTypeIdEn\" [RequestField]=\"RequesterField\" [Type]=\"'Create'\"\r\n [EntityTypeId]=\"CreateItemId\" (closeCreate)=\"closePopupCreateView($event.Type,$event.Data)\">\r\n </app-support-request-create>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"showWorkflowPopup\">\r\n\r\n <app-workflow-dynamic-popup [showWorkflowPopups]=\"showWorkflowPopup\"\r\n [EntityTypeId]=\"EntityTypeId\"\r\n [EntityFormId]=\"workflowEntityFormId\"\r\n (getWorkflowActionComments)=\"getWorkflowActionComments($event.comments, $event.updateFileds, $event.updateFieldsObject)\">\r\n </app-workflow-dynamic-popup>\r\n </ng-container>\r\n</div>",
5143
- styles: ["@charset \"UTF-8\";.f-s-12{font-size:12px!important}.workflow ul{list-style-type:none;margin:0;padding:0;overflow:hidden}.workflow li{float:left;background:#ea6a6a}.workflow li a{display:block;color:#fff;text-align:center;padding:16px;text-decoration:none;cursor:pointer!important}.workflow li a:hover{background-color:#111}body,html{background-color:#f2f2f2;display:flex;justify-content:center;align-items:center;width:100%}.progress-wrap{padding-bottom:70px;margin-bottom:20px;width:100%;overflow:hidden}#progress-container{display:flex;position:relative;height:100%;width:100%;overflow:hidden;margin:auto}#progress-container a{font-size:10px;line-height:10px;max-width:70px;float:left;text-decoration:none}#progress-container a span.badge{margin-top:6px}#progress-container .line{height:1px;width:100%;border-bottom:4px solid #d4d4d4;position:absolute;margin-top:25px;z-index:0}@media (max-width:600px){#progress-container .line{width:100%}}#progress-container ul{list-style-type:none;margin:0;padding:0;overflow:hidden;display:flex;z-index:1}#progress-container li{float:left}#progress-container li:last-child span{margin-right:0!important}#progress-container li .circle-content{margin-right:70px;display:inline-flex;border:4px solid #d4d4d4;background:#fff;padding:10px;border-radius:50%;text-align:center;justify-content:center;align-items:center;font-weight:700;color:#000;font-size:25px;cursor:pointer}#progress-container li .circle-content:before{font-size:12px;position:absolute;margin-top:50px;color:#2b2020}#progress-container li .circle-content a{color:#312a2a}#progress-container li .done{font-family:FontAwesome;border:4px solid #8cc43d;color:#8cc43d}#progress-container li .done:after{content:\"\uF00C\"}#progress-container li .done a{color:#8cc43d}#progress-container li .active{color:#fff;border:4px solid #b9dfc5;background:#225d34}#progress-container li .active a{color:#225d34}.custom-dropdown .dropdown-content{display:none;position:absolute;background-color:#f9f9f9;min-width:160px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1}.custom-dropdown .dropdown-content a{color:#000;padding:6px 8px;text-decoration:none;font-size:15px;display:block;text-align:left}.custom-dropdown .dropdown-content a:hover{background-color:#f1f1f1}.custom-dropdown .dropdown:hover .dropdown-content{display:block}.atext{color:#fff!important;text-decoration:none!important}"]
5144
- },] }
5145
- ];
5146
- CaseListComponent.ctorParameters = () => [
5147
- { type: SupportRequestService },
5148
- { type: EntityTypeSetupService },
5149
- { type: GlobalService },
5150
- { type: GridServiceService },
5151
- { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
5152
- ];
5153
- CaseListComponent.propDecorators = {
5154
- EntityTypeId: [{ type: Input }],
5155
- RequesterTypeId: [{ type: Input }],
5156
- RequesterTypeIdEn: [{ type: Input }],
5157
- RequesterId: [{ type: Input }],
5158
- RequesterField: [{ type: Input }],
5159
- IssueType: [{ type: Input }],
5160
- Source: [{ type: Input }],
5161
- Channel: [{ type: Input }],
5162
- ChannelEn: [{ type: Input }],
5163
- ChannelAr: [{ type: Input }],
5164
- GridSearchType: [{ type: Input }],
5165
- IsClientPagination: [{ type: Input }]
5166
- };
5167
- function slide(direction, Id) {
5168
- debugger;
5169
- let container = document.getElementById(Id);
5170
- let scrollCompleted = 0;
5171
- let slideVar = setInterval(function () {
5172
- if (direction == 'left') {
5173
- container.scrollLeft -= 50;
5222
+ backToList() {
5223
+ this.route.navigate(['/EntityTypeSetup/task', this.EntityTypeRecId]);
5224
+ }
5225
+ ngOnDestroy() {
5226
+ this.globalService.showBackIcon = false;
5227
+ }
5228
+ closeModelPopup() {
5229
+ this.actionPopup = false;
5230
+ }
5231
+ GetFormattedDate(_date) {
5232
+ var todayTime = new Date(_date);
5233
+ var month = todayTime.getMonth() + 1;
5234
+ var day = todayTime.getDate();
5235
+ var year = todayTime.getFullYear();
5236
+ return year + "-" + month + "-" + day;
5237
+ }
5238
+ assignSubmit() {
5239
+ if (this.assignmentForm.value.TargetDate != "" && this.assignmentForm.value.TargetDate != null) {
5240
+ this.targetDate = this.GetFormattedDate(this.assignmentForm.value.TargetDate);
5241
+ this.submitData = {
5242
+ recId: this.RecId,
5243
+ ActionStatus: this.actionFormActionId,
5244
+ AssignedTo: this.assignmentForm.value.AssignedTo,
5245
+ Description: this.assignmentForm.value.Description,
5246
+ Comments: this.assignmentForm.value.Comments,
5247
+ };
5174
5248
  }
5175
5249
  else {
5176
- container.scrollLeft += 50;
5177
- }
5178
- scrollCompleted += 10;
5179
- if (scrollCompleted >= 50) {
5180
- window.clearInterval(slideVar);
5181
- }
5182
- }, 50);
5183
- }
5184
-
5185
- class SupportRequestDetailsComponent {
5186
- constructor(taskService, EntityTypeSetupService, fb, actRoute, gridServiceService, ticketService, globalService, route) {
5187
- this.taskService = taskService;
5188
- this.EntityTypeSetupService = EntityTypeSetupService;
5189
- this.fb = fb;
5190
- this.actRoute = actRoute;
5191
- this.gridServiceService = gridServiceService;
5192
- this.ticketService = ticketService;
5193
- this.globalService = globalService;
5194
- this.route = route;
5195
- this.ViewFrom = "Page";
5196
- this.IsWfAction = false;
5197
- this.environment = environment;
5198
- // _TaskDetail: TaskVM =null;
5199
- this._TaskDetail = null;
5200
- this.stageId = null;
5201
- this.EntityTypeId = null;
5202
- this.EntityTypeIdRecId = null;
5203
- this.refRecId = null;
5204
- this.EntityFormId = null;
5205
- this.EntityPageGroupsData = [];
5206
- this.EntityDefaultPageGroupsData = [];
5207
- this.pageTitle = "Process Stage";
5208
- this.pageDesp = "Process Stage";
5209
- this.selectMode = E_SelectMode.Multi;
5210
- this.isAttach = false;
5211
- this.isCreate = false;
5212
- this.isEdit = false;
5213
- this.isDelete = false;
5214
- this.isExport = false;
5215
- this.gridActionList = [];
5216
- this.columnDefs = [
5217
- { Field: 'ProcessStage', Name: 'Process Stage Id' },
5218
- { Field: 'ProcessStageEn', Name: 'Process Stage' },
5219
- { Field: 'Comments', Name: 'Comments' },
5220
- { Field: 'StartDate', Name: 'Start Date', DataType: E_DataType.date },
5221
- { Field: 'EndDate', Name: 'End Date', DataType: E_DataType.date },
5222
- ];
5223
- this.commentsData = [];
5224
- this.commentsDataCount = 0;
5225
- this.Searchcriteria = {
5226
- Pagging: {
5227
- PageNo: 1,
5228
- PageSize: 10,
5229
- },
5230
- Where: [],
5231
- SortOrder: 1,
5232
- };
5233
- this.displayPopupCreateView = false;
5234
- this.CreateItemId = null;
5235
- this.selectedActivityItem = null;
5236
- this.commentsActivityItem = null;
5237
- this.detailsEntityTypeId = null;
5238
- this.Activity = null;
5239
- this.ActivityType = [];
5240
- this.ActivityTypeReadonly = [];
5241
- this.TotalActivity = 0;
5242
- this.StatusAndStageList = [];
5243
- this.showStageDetails = false;
5244
- this.selectedProcessList = [];
5245
- this.tabDisplayView = 1;
5246
- this.SortingField = { field: null, direction: null };
5247
- this.activitySearchcriteria = {
5248
- Pagging: {
5249
- PageNo: 1,
5250
- PageSize: 10,
5251
- },
5252
- Where: [],
5253
- SortOrder: this.SortingField,
5254
- };
5255
- this.TaskList = [];
5256
- this.ProcessStageList = [];
5257
- this.TimelineList = [];
5258
- this.TimelineListReadonly = [];
5259
- this.TaskCommentFile = null;
5260
- this.wfActionData = [
5261
- { id: 1, name: "New" },
5262
- { id: 2, name: "Forward" },
5263
- { id: 3, name: "Reply" },
5264
- { id: 4, name: "Esculation" },
5265
- { id: 5, name: "Delegation" },
5266
- { id: 6, name: "Complete" },
5267
- { id: 7, name: "Cancel" },
5268
- ];
5269
- this.wfStageAction = null;
5270
- this.action = null;
5271
- this.showWorkflowPopup = false;
5272
- this.workflowEntityFormId = null;
5273
- this.assignmentForm = this.fb.group({
5274
- ActionStatus: [''],
5275
- AssignedTo: [''],
5276
- TargetDate: [''],
5277
- Description: [''],
5278
- Comments: [''],
5279
- });
5280
- this.updateStatusAssignTo = [];
5281
- this.actionPopup = false;
5282
- this.targetDate = null;
5283
- this.columnDef = [
5284
- { Field: "Description", Name: "Description" },
5285
- { Field: "AssignedTo", Name: "AssignedTo" },
5286
- { Field: "TargetDate", Name: "TargetDate", DataType: E_DataType.date },
5287
- { Field: "IsDoneEn", Name: "IsDone", },
5288
- ];
5289
- this.translatePipe = new TranslatePipe(this.globalService);
5290
- }
5291
- ngOnInit() {
5292
- // this.actRoute.paramMap.subscribe((res) => {
5293
- //
5294
- // console.log(res);
5295
- // if (this.ViewFrom != 'Popup') {
5296
- // this.RecId = Number(res.get('RecId'));
5297
- // this.EntityTypeRecId = Number(res.get('EntityTypeRecId'));
5298
- // }
5299
- // });
5300
- this.getTaskDetails();
5301
- this.getActivity();
5302
- this.getWorkflowStatusWithStage();
5303
- // this.getAssignGroupData();
5304
- // this.getTaskAssignData();
5305
- }
5306
- getTaskDetails() {
5307
- if (this.RecId != null) {
5308
- this.EntityTypeSetupService.getDynamicById(this.EntityTypeRecId, this.RecId).subscribe((x) => {
5309
- // alert("a");
5310
- // ;
5311
- this._TaskDetail = x;
5312
- this.stageId = x.ProcessStage;
5313
- this.EntityTypeId = x.EntityTypeId;
5314
- this.EntityTypeIdRecId = x.EntityTypeRecId;
5315
- this.refRecId = x.RecId;
5316
- this.GetPageList(this.storeCriteria);
5317
- if (this._TaskDetail && this._TaskDetail.uploadFiles && this._TaskDetail.uploadFiles.length > 0) {
5318
- this._TaskDetail.uploadFiles.map(x => {
5319
- if (x.Ext) {
5320
- x.ExtSm = x.Ext.toLowerCase();
5321
- x.ExtSm = x.ExtSm.replace('.', '');
5322
- }
5323
- });
5324
- }
5325
- this.getActivities();
5326
- this.getEntityFormDetails();
5327
- // this.getComments();
5328
- if (this.IsWfAction) {
5329
- this.getWfStageAction(x.EntityTypeId, x.ProcessStage);
5330
- }
5331
- }, (error) => error.error);
5332
- }
5333
- }
5334
- getEntityFormDetails() {
5335
- this.EntityDefaultPageGroupsData = [];
5336
- this.EntityPageGroupsData = [];
5337
- this.EntityTypeSetupService.getActiveEntityFormByDetails(this.EntityTypeId).subscribe((res) => {
5338
- if (res.FormData) {
5339
- let _FormData = JSON.parse(res.FormData);
5340
- if (_FormData.PageGroup) {
5341
- if (Array.isArray(_FormData.PageGroup)) {
5342
- this.EntityPageGroupsData = _FormData.PageGroup;
5343
- }
5344
- }
5345
- if (_FormData.defaultPageGroups) {
5346
- if (Array.isArray(_FormData.defaultPageGroups)) {
5347
- this.EntityDefaultPageGroupsData = _FormData.defaultPageGroups;
5348
- }
5349
- }
5350
- }
5351
- this.EntityFormId = res.RecId;
5352
- }, (error) => {
5353
- console.log(error);
5354
- });
5355
- }
5356
- getWorkflowActionComments(comments, updateFileds, updateFieldsObject) {
5357
- // alert("zz");
5358
- let updateFieldsObjectString = JSON.stringify(updateFieldsObject);
5359
- this.EntityTypeSetupService.urlPostTaskWfAction(this.RecId, this.stageId, this.action, comments, updateFileds, updateFieldsObjectString, this.EntityTypeId).subscribe((res) => {
5360
- // this.wfActionData = res;
5361
- this.getTaskDetails();
5362
- console.log(res);
5363
- }, (error) => {
5364
- var _a, _b, _c;
5365
- error.error;
5366
- if (((_a = error.error) === null || _a === void 0 ? void 0 : _a.status) == false) {
5367
- let msg = JSON.parse((_b = error.error) === null || _b === void 0 ? void 0 : _b.msg);
5368
- if (msg && msg.msg) {
5369
- msg = msg.msg;
5370
- }
5371
- else {
5372
- msg = (_c = error.error) === null || _c === void 0 ? void 0 : _c.msg;
5373
- }
5374
- Swal.fire(this.translatePipe.transform(msg));
5375
- }
5376
- else {
5377
- Swal.fire(this.translatePipe.transform(error.ExceptionMessage), this.translatePipe.transform(error.message));
5378
- }
5379
- });
5380
- }
5381
- getComments() {
5382
- // alert("getcommends");
5383
- if (this.refRecId != null) {
5384
- this.ticketService.urlGetTicketUpdateByRecId(this.refRecId).subscribe((x) => {
5385
- // alert("getcommends");
5386
- this.commentsData = x.Data;
5387
- this.commentsDataCount = x.TotalCount;
5388
- }, (error) => {
5389
- // Swal.fire(error);
5390
- Swal.fire({
5391
- title: this.translatePipe.transform(error.error),
5392
- });
5393
- // error.error
5394
- });
5395
- }
5396
- }
5397
- getActivity() {
5398
- //this.EntityType = data.EntityType;
5399
- this.EntityTypeSetupService.getAllAssinedActivites(this.Searchcriteria, this.EntityTypeRecId)
5400
- // this.EntityTypeSetupService.getActiveEntityTypeSetup(this.Searchcriteria, this.EntityType, "")
5401
- .subscribe((res) => {
5402
- this.ActivityFields = res.Data;
5403
- if (this.ActivityFields.length > 0) {
5404
- const sortBy = ['Task', 'SMS', 'Email', 'Notes', 'Comments']; //sort by descending order
5405
- this.ActivityFields = this.ActivityFields.sort((a, b) => sortBy.indexOf(b.Description) - sortBy.indexOf(a.Description));
5406
- let taskActivity = { Description: 'Task', RecId: 58, Type: 'Task' };
5407
- this.ActivityFields.push(taskActivity);
5408
- this.openDefaultComments();
5409
- }
5410
- });
5411
- }
5412
- getActivityFileUploads(item) {
5413
- if (item.showform && item.RecId && item.ActivityTypeId) {
5414
- this.EntityTypeSetupService.getActivityUploadFile(item.RecId, this.EntityTypeRecId, item.ActivityTypeId)
5415
- .subscribe((res) => {
5416
- if (res && res.length > 0) {
5417
- item.uploadFiles = res;
5418
- }
5419
- });
5420
- }
5421
- }
5422
- getActivityFileUploadsReadonly(item) {
5423
- if (item.RecId && item.ActivityTypeId) {
5424
- this.EntityTypeSetupService.getActivityUploadFile(item.RecId, this.EntityTypeRecId, item.ActivityTypeId)
5425
- .subscribe((res) => {
5426
- if (res && res.length > 0) {
5427
- item.uploadFiles = res;
5428
- }
5429
- this.ActivityTypeReadonly.push(item);
5430
- });
5431
- }
5432
- }
5433
- addEvents(data) {
5434
- this.openPopupCreatePage(data);
5435
- }
5436
- openPopupCreatePage(item) {
5437
- this.CreateItemId = null;
5438
- setTimeout(() => (this.CreateItemId = item.RecId), 0);
5439
- this.selectedActivityItem = item;
5440
- if (item.Description != 'Comments')
5441
- this.displayPopupCreateView = true;
5442
- // this.Activity=item.RecId;
5443
- }
5444
- closePopupCreateView(Type) {
5445
- this.CreateItemId = null;
5446
- this.displayPopupCreateView = false;
5447
- if (Type == 'Create') {
5448
- this.getActivities();
5449
- this.openDefaultComments();
5450
- }
5451
- }
5452
- slider(direction, Id) {
5453
- slide(direction, Id);
5454
- }
5455
- getWorkflowStatusWithStage() {
5456
- this.EntityTypeSetupService.getAllWfStage(null, this.EntityTypeRecId, true)
5457
- .subscribe((res) => {
5458
- // alert("StatusAndStageList");
5459
- this.StatusAndStageList = res.Data;
5460
- // .sort((a, b) => {
5461
- // if (a.StageId < b.StageId) return -1;
5462
- // else if (a.StageId > b.StageId) return 1;
5463
- // else return 0;
5464
- // });
5465
- let showallIndex = this.StatusAndStageList.findIndex(x => x.OrderId == -1);
5466
- this.StatusAndStageList.splice(showallIndex, 1);
5467
- let showPendingIndex = this.StatusAndStageList.findIndex(x => x.OrderId == 0);
5468
- this.StatusAndStageList.splice(showPendingIndex, 1);
5469
- }, (error) => {
5470
- var _a;
5471
- console.log(error);
5472
- 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');
5473
- });
5474
- }
5475
- selectProcess(item) {
5476
- if (this.selectedProcess)
5477
- this.showStageDetails = false;
5478
- if (this.selectedProcess && this.selectedProcess.ProcessStage == item.StageId) {
5479
- setTimeout(() => (this.selectedProcess = null), 500);
5480
- }
5481
- else {
5482
- this.showStageDetails = true;
5483
- this.selectedProcessList = this.ProcessStageList.filter((x) => x.ProcessStage == item.StageId);
5484
- this.selectedProcess =
5485
- this.selectedProcessList[this.selectedProcessList.length - 1];
5486
- }
5487
- }
5488
- closeProcess() {
5489
- this.showStageDetails = false;
5490
- setTimeout(() => (this.selectedProcess = null), 500);
5491
- }
5492
- gridChangeTabs(data) {
5493
- this.tabDisplayView = Number(data);
5494
- }
5495
- loadMoreActivities() {
5496
- this.activitySearchcriteria.Pagging.PageSize += 10;
5497
- this.getActivities();
5498
- }
5499
- getActivities() {
5500
- debugger;
5501
- // let ActivityId = 5;
5502
- this.EntityTypeSetupService
5503
- .getDynamicByEntityRefrecid(this.EntityTypeRecId, this.refRecId, this.activitySearchcriteria, this.Activity)
5504
- .subscribe((res) => {
5505
- debugger;
5506
- this.ActivityType = res.Data;
5507
- if (res && res.Data)
5508
- this.ActivityTypeReadonly = [];
5509
- res.Data.forEach(x => {
5510
- this.getActivityFileUploadsReadonly(x);
5511
- });
5512
- this.setTimeline();
5513
- this.TotalActivity = res.TotalCount;
5514
- console.log('Activity', res.Data);
5515
- });
5516
- (error) => {
5517
- error.error;
5518
- };
5519
- }
5520
- setTimeline() {
5521
- this.TimelineList = [];
5522
- this.TimelineListReadonly = [];
5523
- if (Array.isArray(this.ActivityType)) {
5524
- if (this.ActivityType.length > 0)
5525
- this.TimelineList.push(...this.ActivityType);
5526
- this.TimelineListReadonly.push(...this.ActivityType);
5527
- }
5528
- if (Array.isArray(this.ActivityTypeReadonly)) {
5529
- if (this.ActivityTypeReadonly.length > 0)
5530
- this.TimelineListReadonly.push(...this.ActivityTypeReadonly);
5531
- }
5532
- // if (Array.isArray(this.TaskList)) {
5533
- // if (this.TaskList.length > 0) this.TimelineList.push(...this.TaskList);
5534
- // }
5535
- // if (Array.isArray(this.ProcessStageList)) {
5536
- // if (this.ProcessStageList.length > 0) {
5537
- // this.ProcessStageList = this.ProcessStageList.map((x) => {
5538
- // x.Type = 'Workflow';
5539
- // x.ActivityTypeIdEn = 'Comments';
5540
- // return x;
5541
- // });
5542
- // this.TimelineList.push(...this.ProcessStageList);
5543
- // }
5544
- // }
5545
- this.TimelineList.sort((a, b) => {
5546
- if (a.CreatedDatetime < b.CreatedDatetime)
5547
- return -1;
5548
- else if (a.CreatedDatetime > b.CreatedDatetime)
5549
- return 1;
5550
- else
5551
- return 0;
5552
- });
5553
- this.TimelineListReadonly.sort((a, b) => {
5554
- if (a.CreatedDatetime < b.CreatedDatetime)
5555
- return -1;
5556
- else if (a.CreatedDatetime > b.CreatedDatetime)
5557
- return 1;
5558
- else
5559
- return 0;
5560
- });
5561
- }
5562
- GetPageList(Criteria) {
5563
- if (this.EntityTypeId != null) {
5564
- this.storeCriteria = Criteria;
5565
- // let data: Observable<IEntityWFstageVM[]>;
5566
- this.EntityTypeSetupService.getWfInsProcessStageComments(Criteria, this.EntityTypeId, this.refRecId).subscribe((res) => {
5567
- // alert("grid data");
5568
- this.ProcessStageList = res.Data;
5569
- this.setTimeline();
5570
- console.log(res);
5571
- this.loadGrid(res.Data, res.TotalCount);
5572
- }, (error) => {
5573
- var _a;
5574
- console.log(error);
5575
- this.loadGrid([], 0);
5576
- 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');
5577
- });
5578
- }
5579
- }
5580
- fileChange(event) {
5581
- this.fileList = event.target.files;
5582
- }
5583
- commentSubmit() {
5584
- let data = {
5585
- commnets: this.Comments,
5586
- refRecId: this.RecId,
5587
- entitytyperecid: this.EntityTypeRecId
5588
- };
5589
- // this.service.urlComments(data).subscribe(
5590
- // (x: any) => this.taskAssignData = x);
5591
- let formData = new FormData();
5592
- if (this.fileList && this.fileList.length > 0) {
5593
- let file = this.fileList[0];
5594
- formData.append('Files', file, file.name);
5595
- }
5596
- this.EntityTypeSetupService.postTaskComments(this.fileList, data).subscribe((x) => {
5597
- this.Comments = null;
5598
- this.CommentsTitle = null;
5599
- this.TaskCommentFile = null;
5600
- this.getComments();
5601
- }, (error) => error.error);
5602
- }
5603
- // commentsActivityItem:any = null;
5604
- openDefaultComments() {
5605
- this.commentsActivityItem = this.ActivityFields.filter((x) => x.ActionType == '5')[0];
5606
- // if (comments && comments.length > 0) {
5607
- // this.commentsActivityItem = null;
5608
- // setTimeout(() => (this.commentsActivityItem = comments[0]), 0);
5609
- // this.commentsActivityItem = comments[0];
5610
- // this.openPopupCreatePage(comments[0]);
5611
- // }
5612
- // else {
5613
- // this.openPopupCreatePage(this.ActivityFields[0]);
5614
- // }
5615
- }
5616
- getWfStageAction(EntityTypeId, StageId) {
5617
- if (EntityTypeId == null)
5618
- return;
5619
- this.EntityTypeSetupService.urlGetWfStageAction(EntityTypeId, StageId).subscribe((res) => {
5620
- // res = [{"Action":10,"ActionDescription":"InProgress","StageRecId":1,"ActionComplete":null,"ProcessId":null,"StageId":1,"StageTypeId":1,"ActionRecId":1,"StageDescription":"New"}]
5621
- this.wfStageAction = res;
5622
- console.log(res);
5623
- }, (error) => {
5624
- error.error;
5625
- });
5626
- }
5627
- getStatusField(data) {
5628
- this.action = data.ActionRecId;
5629
- this.workflowEntityFormId = data.WorkFlowForm;
5630
- this.showWorkflowPopup = true;
5631
- this.EntityTypeSetupService.onshowWorkflowPopup.next({
5632
- showWorkflowPopup: true,
5633
- fieldConfig: [],
5634
- });
5635
- }
5636
- backToList() {
5637
- this.route.navigate(['/EntityTypeSetup/task', this.EntityTypeRecId]);
5638
- }
5639
- ngOnDestroy() {
5640
- this.globalService.showBackIcon = false;
5641
- }
5642
- closeModelPopup() {
5643
- this.actionPopup = false;
5644
- }
5645
- GetFormattedDate(_date) {
5646
- var todayTime = new Date(_date);
5647
- var month = todayTime.getMonth() + 1;
5648
- var day = todayTime.getDate();
5649
- var year = todayTime.getFullYear();
5650
- return year + "-" + month + "-" + day;
5651
- }
5652
- assignSubmit() {
5653
- if (this.assignmentForm.value.TargetDate != "" && this.assignmentForm.value.TargetDate != null) {
5654
- this.targetDate = this.GetFormattedDate(this.assignmentForm.value.TargetDate);
5655
- this.submitData = {
5656
- recId: this.RecId,
5657
- ActionStatus: this.actionFormActionId,
5658
- AssignedTo: this.assignmentForm.value.AssignedTo,
5659
- Description: this.assignmentForm.value.Description,
5660
- Comments: this.assignmentForm.value.Comments,
5661
- };
5662
- }
5663
- else {
5664
- this.submitData = {
5665
- recId: this.RecId,
5666
- ActionStatus: this.actionFormActionId,
5667
- AssignedTo: this.assignmentForm.value.AssignedTo,
5668
- TargetDate: this.targetDate,
5669
- Description: this.assignmentForm.value.Description,
5670
- Comments: this.assignmentForm.value.Comments,
5671
- };
5250
+ this.submitData = {
5251
+ recId: this.RecId,
5252
+ ActionStatus: this.actionFormActionId,
5253
+ AssignedTo: this.assignmentForm.value.AssignedTo,
5254
+ TargetDate: this.targetDate,
5255
+ Description: this.assignmentForm.value.Description,
5256
+ Comments: this.assignmentForm.value.Comments,
5257
+ };
5672
5258
  }
5673
5259
  this.taskService.TaskAssignmentUpdateStatus(this.submitData, this.EntityTypeRecId).subscribe((x) => {
5674
5260
  this.assignmentForm.reset();
@@ -5773,10 +5359,7 @@ SupportRequestDetailsComponent.propDecorators = {
5773
5359
  RecId: [{ type: Input }],
5774
5360
  ViewFrom: [{ type: Input }],
5775
5361
  IsWfAction: [{ type: Input }]
5776
- };
5777
- function ngOnDestroy() {
5778
- throw new Error('Function not implemented.');
5779
- }
5362
+ };
5780
5363
 
5781
5364
  class AttachmentService {
5782
5365
  constructor(http) {
@@ -6231,10 +5814,11 @@ SupportRequestCreateComponent.propDecorators = {
6231
5814
 
6232
5815
  // import { environment } from 'arco-support-request';
6233
5816
  class RequestFlowComponent {
6234
- constructor(supportService, fb, entityTypeSetup, globalService, document) {
5817
+ constructor(supportService, fb, entityTypeSetup, router, globalService, document) {
6235
5818
  this.supportService = supportService;
6236
5819
  this.fb = fb;
6237
5820
  this.entityTypeSetup = entityTypeSetup;
5821
+ this.router = router;
6238
5822
  this.globalService = globalService;
6239
5823
  this.document = document;
6240
5824
  this.issuType = "7";
@@ -6325,6 +5909,14 @@ class RequestFlowComponent {
6325
5909
  this.isShowCreateRequest = false;
6326
5910
  this.selectCaseItem = null;
6327
5911
  this.isDetails = false;
5912
+ router.events.subscribe(event => {
5913
+ if (event instanceof NavigationStart) {
5914
+ setTimeout(() => this.globalService.dataLoader = true, 0);
5915
+ }
5916
+ else if (event instanceof NavigationEnd) {
5917
+ setTimeout(() => this.globalService.dataLoader = false, 0);
5918
+ }
5919
+ });
6328
5920
  }
6329
5921
  ngOnChanges(changes) {
6330
5922
  if (changes && changes.Language && changes.Language.firstChange == false) {
@@ -6924,7 +6516,7 @@ class RequestFlowComponent {
6924
6516
  RequestFlowComponent.decorators = [
6925
6517
  { type: Component, args: [{
6926
6518
  selector: 'app-request-flow',
6927
- template: "<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/css/line-awesome.min.css\">\r\n<link rel=\"stylesheet\" href=\"https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css\">\r\n\r\n\r\n<link rel=\"stylesheet\" href=\"https://erp.arco.sa/SupportRequest/styles.css\">\r\n<link rel=\"stylesheet\" href=\"https://test.arco.sa/CustomerPortal/IndividualPortalTickets/SupportRequest/supportstyles.css\">\r\n<link rel=\"stylesheet\" href=\"https://erp.arco.sa/SupportRequest/assets/css/main.css\">\r\n<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\r\n<link rel=\"stylesheet\" href=\"https://erp.arco.sa/SupportRequest/assets/css/bootstrap.min.css\">\r\n\r\n<link rel=\"stylesheet\" href=\"https://erp.arco.sa/SupportRequest/assets/css/font-awesome.min.css\">\r\n\r\n<link rel=\"stylesheet\" href=\"https://unpkg.com/ngx-bootstrap/datepicker/bs-datepicker.css\">\r\n\r\n<link rel=\"stylesheet\" href=\"https://unpkg.com/@angular/material@11.2.13/prebuilt-themes/indigo-pink.css\">\r\n<ng-container *ngIf=\"viewHtml\">\r\n\r\n<ng-container *ngIf=\"PageType=='SelfService';else caseTemplate\" >\r\n\r\n <app-self-service-flow [RequesterTypeId]=\"RequesterTypeId\" [RequesterTypeIdEn]=\"RequesterTypeIdEn\"\r\n [RequesterId]=\"RequesterId\" [Source]=\"Source\" [Channel]=\"Channel\" [ChannelEn]=\"ChannelEn\" [ChannelAr]=\"ChannelAr\"\r\n [RequestField]=\"RequesterField\"></app-self-service-flow>\r\n\r\n</ng-container>\r\n\r\n<ng-template #caseTemplate>\r\n\r\n <div class=\"req_page whole\" [ngClass]=\"{'lang_Arabic': globalService.CurrentLanguage=='Ar'}\">\r\n\r\n <div *ngIf=\"isDetails\">\r\n <span class=\"back-arrow\" (click)=\"backToRequest()\">\r\n <i class=\"fa fa-arrow-left\"></i>\r\n {{'Back'|translate}}\r\n </span>\r\n </div>\r\n\r\n <div class=\"whole m-t-10 m-b-20 clearfix\">\r\n \r\n <div class=\"pull-left\">\r\n <h2 class=\"heading pull-left\">{{PageType|translate}}\r\n <span *ngIf=\"isDetails && CaseId\"> - #{{CaseId}}</span>\r\n </h2>\r\n \r\n <div class=\"pull-left create_req hierarchy-view\">\r\n <button class=\"add_req_btn\" *ngIf=\"!isShowCreateRequest && !isDetails\" (click)=\"openIssueType()\">\r\n {{'Create New'|translate}}\r\n <i class=\"fa fa-plus\" style=\"float: right;margin: 4px 1px 2px 8px;\"></i>\r\n </button>\r\n\r\n <div class=\"modal fade show\" *ngIf=\"displayPopUp\" tabindex=\"-1\" role=\"dialog\" (click)=\"ClickedOut($event)\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\" [ngClass]=\"{'modal-sm':dropdownmodal,'modal-lg':!dropdownmodal}\">\r\n <div class=\"modal-content request-modal\">\r\n <div class=\"modal-header\">\r\n <h5 class=\"modal-title\">{{'Create' | translate}} {{globalService.CurrentLanguage =='Ar' ? (selectedType.IssueTypeAr ? selectedType.IssueTypeAr : (selectedType.IssueTypeEn |translate)) : selectedType.IssueTypeEn }}</h5>\r\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\" (click)=\"closeModel()\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n </div>\r\n <div class=\"modal-body\" *ngIf=\"IssueTypeDDL.length > 0\">\r\n <div class=\"\" *ngIf=\"dropdownmodal\">\r\n <div class=\"mb-3\">\r\n <label for=\"\" class=\"\">{{'Group'|translate}}</label>\r\n <ng-select [items]=\"IssueTypeDDL[0].IssueGroup\" [placeholder]=\"'Request'\" bindLabel=\"IssueGroupEn\" bindValue=\"IssueGroup\"\r\n (change)=\"selectGroup($event,IssueTypeDDL[0])\" >\r\n </ng-select>\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label for=\"\" class=\"\">{{'SubGroup'|translate}}</label>\r\n <ng-select [items]=\"dropdownIssuse\" [placeholder]=\"'Request'\" bindLabel=\"IssueEn\" bindValue=\"Issue\"\r\n (change)=\"selectSubGroup($event,true)\">\r\n </ng-select>\r\n </div>\r\n <div class=\"mb-3 text-center\">\r\n <button class=\"btn btn-small m-l-5 m-r-5 dropdownbtn\" [disabled]=\"!selectedSubGroup\" (click)=\"selectSubGroup(selectedSubGroup)\">\r\n {{'Next'|translate}}\r\n </button>\r\n </div>\r\n </div>\r\n \r\n \r\n <!-- <ng-container *ngFor=\"let _type of IssueTypeDDL\">\r\n \r\n \r\n \r\n <div class=\"row\">\r\n \r\n \r\n \r\n <ng-container *ngFor=\"let _issue of _type.IssueGroup\">\r\n <ng-container *ngIf=\"showChild\">\r\n \r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n <div class=\"Popup-boxes\" (click)=\"selectGroup(_issue,_type)\" [ngClass]=\"{'active': _issue.showSubGroup}\">\r\n \r\n \r\n <span >{{ globalService.CurrentLanguage =='Ar' ? (_issue.IssueGroupAr ?\r\n _issue.IssueGroupAr : (_issue.IssueGroupEn |translate)) : _issue.IssueGroupEn }}</span>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n </ng-container>\r\n \r\n <div class=\"col-sm-12 mb-3\" *ngIf=\"_issue.showSubGroup && !showChild && showsubChild\">\r\n <h6 class=\"\">\r\n <i class=\"fa fa-arrow-left\" style=\"margin-right: 10px;\" (click)=\"backToGroup(_issue)\"></i>\r\n {{ globalService.CurrentLanguage =='Ar' ? (selectedGroup?.IssueGroupAr ? selectedGroup?.IssueGroupAr :\r\n (selectedGroup?.IssueGroupEn |translate)) : selectedGroup?.IssueGroupEn }}\r\n \r\n </h6>\r\n </div>\r\n <ng-container *ngFor=\"let _sub of _issue.Issue\">\r\n <ng-container *ngIf=\"showsubChild && !showChild && _issue.showSubGroup\">\r\n \r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n \r\n <div class=\"Popup-boxes\" (click)=\"selectSubGroup(_sub)\">\r\n \r\n \r\n <span >{{globalService.CurrentLanguage =='Ar' ? (_sub.IssueAr ?\r\n _sub.IssueAr : (_sub.IssueEn |translate)) : _sub.IssueEn }}</span>\r\n \r\n \r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n \r\n \r\n \r\n\r\n \r\n </ng-container>\r\n </div>\r\n\r\n \r\n </ng-container> -->\r\n \r\n <ng-container *ngIf=\"isShowCreateRequest\">\r\n \r\n <div class=\"whole m-b-20 breadcrumbes\">\r\n <span>{{globalService.CurrentLanguage =='Ar' ? (selectedType.IssueTypeAr ? selectedType.IssueTypeAr : (selectedType.IssueTypeEn |translate)) : selectedType.IssueTypeEn }}</span> > \r\n \r\n <ng-container *ngIf=\"selectedType.IssueGroup; else elseCategory\">\r\n \r\n <span>{{globalService.CurrentLanguage =='Ar' ? (selectedGroup?.IssueGroupAr ? selectedGroup?.IssueGroupAr : (selectedGroup?.IssueGroupEn |translate)) : selectedGroup?.IssueGroupEn }}</span> > \r\n <span>{{globalService.CurrentLanguage =='Ar' ? (selectedSubGroup?.IssueAr ? selectedSubGroup?.IssueAr : (selectedSubGroup?.IssueEn |translate)) : selectedSubGroup?.IssueEn }}</span> > \r\n \r\n </ng-container>\r\n <ng-template #elseCategory>\r\n <span>{{globalService.CurrentLanguage =='Ar' ? (selectedCategory?.CategoryIdAr ? selectedCategory?.CategoryIdAr : (selectedCategory?.CategoryIdEn |translate)) : selectedCategory?.CategoryIdEn }}</span> > \r\n </ng-template>\r\n <span>{{globalService.CurrentLanguage =='Ar' ? (selectCaseItem.CaseIdAr ? selectCaseItem.CaseIdAr : (selectCaseItem.CaseIdEn |translate)) : selectCaseItem.CaseIdEn }}</span>\r\n </div>\r\n \r\n <app-support-request-create class=\"support_req_div\" *ngIf=\"CreateItemId\" \r\n [ViewFrom]=\"'Popup'\"\r\n \r\n [IssueType]=\"selectedType.IssueType\"\r\n [IssueTypeEn]=\"selectedType.IssueTypeEn\"\r\n [IssueTypeAr]=\"selectedType.IssueTypeAr\"\r\n \r\n [IssueGroup]=\"selectedGroup?.IssueGroup\"\r\n [IssueGroupEn]=\"selectedGroup?.IssueGroupEn\"\r\n [IssueGroupAr]=\"selectedGroup?.IssueGroupAr\"\r\n \r\n [IssueSubGroup]=\"selectedSubGroup?.Issue\" \r\n [IssueSubGroupEn]=\"selectedSubGroup?.IssueEn\" \r\n [IssueSubGroupAr]=\"selectedSubGroup?.IssueAr\" \r\n \r\n [Source]=\"Source\"\r\n [CreatedByUserType]=\"RequesterTypeId\"\r\n [Channel]=\"Channel\" \r\n [ChannelEn]=\"ChannelEn\" \r\n [ChannelAr]=\"ChannelAr\" \r\n [RequesterId]=\"RequesterId\"\r\n [RequesterIdEn]=\"RequesterTypeIdEn\"\r\n [RequestField]=\"RequesterField\"\r\n \r\n [Type]=\"'Create'\"\r\n [EntityTypeId]=\"CreateItemId\"\r\n (closeCreate)=\"closePopupCreateView($event.Type,$event.Data)\">\r\n </app-support-request-create>\r\n </ng-container>\r\n \r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"\" *ngIf=\"isCreate && !isShowCreateRequest\">\r\n <div class=\"step-fixed\" (click)=\"backToRequest()\" ></div>\r\n <ul class=\"steps\">\r\n <li>\r\n <!-- <h6> {{'Issue Type'|translate}}</h6> -->\r\n <div class=\"main_menu_brad\">\r\n \r\n <ng-container *ngFor=\"let _type of IssueTypeDDL\">\r\n <div class=\"main_menu_brad_inside clearfix\" [ngClass]=\"{'active': _type.showGroup || _type.showCategory}\">\r\n <i class=\"fa fa-caret-right\"></i>\r\n <span (click)=\"selectType(_type)\">{{ globalService.CurrentLanguage =='Ar' ? (_type.IssueTypeAr ? _type.IssueTypeAr\r\n : (_type.IssueTypeEn |translate)) : _type.IssueTypeEn }}</span>\r\n <div class=\"main_menu_brad_sub\" *ngIf=\"_type.showGroup || _type.showCategory\">\r\n <h6 class=\"m-b-10\">\r\n <i class=\"fa fa-arrow-left\" style=\"margin-right: 10px;\" (click)=\"backToType(_type)\"></i>\r\n {{ globalService.CurrentLanguage =='Ar' ? (selectedType.IssueTypeAr ? selectedType.IssueTypeAr :\r\n (selectedType.IssueTypeEn |translate)) : selectedType.IssueTypeEn }}\r\n </h6>\r\n \r\n <ng-container *ngFor=\"let _issue of _type.IssueGroup\">\r\n <div class=\"main_menu_brad_inside clearfix\" [ngClass]=\"{'active': _issue.showSubGroup}\">\r\n <i class=\"fa fa-caret-right\"></i>\r\n <span (click)=\"selectGroup(_issue,_type)\">{{ globalService.CurrentLanguage =='Ar' ? (_issue.IssueGroupAr ?\r\n _issue.IssueGroupAr : (_issue.IssueGroupEn |translate)) : _issue.IssueGroupEn }}</span>\r\n <div class=\"main_menu_brad_sub\" *ngIf=\"_issue.showSubGroup\">\r\n <h6 class=\"m-b-10\">\r\n <i class=\"fa fa-arrow-left\" style=\"margin-right: 10px;\" (click)=\"backToGroup(_issue)\"></i>\r\n {{ globalService.CurrentLanguage =='Ar' ? (selectedGroup?.IssueGroupAr ? selectedGroup?.IssueGroupAr :\r\n (selectedGroup?.IssueGroupEn |translate)) : selectedGroup?.IssueGroupEn }}\r\n \r\n </h6>\r\n <ng-container *ngFor=\"let _sub of _issue.Issue\">\r\n <div class=\"main_menu_brad \">\r\n <div class=\"main_menu_brad_inside clearfix position-relative\">\r\n \r\n <span (click)=\"selectSubGroup(_sub)\">{{globalService.CurrentLanguage =='Ar' ? (_sub.IssueAr ?\r\n _sub.IssueAr : (_sub.IssueEn |translate)) : _sub.IssueEn }}</span>\r\n \r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n \r\n <ng-container *ngFor=\"let _cat of _type.Category\">\r\n <div class=\"main_menu_brad_inside clearfix\" [ngClass]=\"{'active': _cat.showCase}\">\r\n <i class=\"fa fa-caret-right\"></i>\r\n <span (click)=\"selectCategory(_cat,_type)\">\r\n {{ globalService.CurrentLanguage =='Ar' ? (_cat.CategoryIdAr ?\r\n _cat.CategoryIdAr : (_cat.CategoryIdEn |translate)) : _cat.CategoryIdEn }}</span>\r\n <div class=\"main_menu_brad_sub\" *ngIf=\"_cat.showCase\">\r\n <h6 class=\"m-b-10\">\r\n <i class=\"fa fa-arrow-left\" style=\"margin-right: 10px;\" (click)=\"backToCategory(_cat)\"></i>\r\n {{ globalService.CurrentLanguage =='Ar' ? (selectedCategory.CategoryIdAr ? selectedCategory.CategoryIdAr :\r\n (selectedCategory.CategoryIdEn |translate)) : selectedCategory.CategoryIdEn }}\r\n \r\n </h6>\r\n <ng-container *ngFor=\"let _case of _cat.Case\">\r\n <div class=\"main_menu_brad \">\r\n <div class=\"main_menu_brad_inside clearfix position-relative\">\r\n \r\n <span (click)=\"selectCase(_case)\">{{globalService.CurrentLanguage =='Ar' ? (_case.CaseIdAr ?\r\n _case.CaseIdAr : (_case.CaseIdEn |translate)) : _case.CaseIdEn }}</span>\r\n \r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n \r\n \r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n \r\n \r\n </div>\r\n \r\n </div>\r\n <!-- <div class=\"pull-right m-r-10\">\r\n <button class=\"btn btn-outline btn-danger\" *ngIf=\"isDetails\" (click)=\"backToRequest()\">\r\n \r\n <i class=\"la la-arrow-left\"></i>\r\n {{'Back'|translate}}</button>\r\n </div> -->\r\n </div>\r\n \r\n \r\n <ng-container *ngIf=\"!isDetails\">\r\n \r\n <div class=\"whole m-b-20\">\r\n\r\n <div class=\"card-box \">\r\n <div class=\"header\">\r\n <h5 class=\"card-box-title m-0\">{{'Overview'| translate}}</h5>\r\n </div>\r\n <div class=\"body\">\r\n <div class=\"row\">\r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n <div class=\"boxes\">\r\n <div class=\"left\"><span><i class=\"la la-info\"></i></span></div>\r\n <div class=\"right\">\r\n <h3>{{TotalStatusCount}}</h3>\r\n <p style=\"text-transform: uppercase;\">{{'Total Request'|translate}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n <div class=\"boxes\">\r\n <div class=\"left\"><span style=\"background: #fde3ff;color: #db32e8;\"><i class=\"la la-file\"></i></span></div>\r\n <div class=\"right\">\r\n <h3>{{NewStatus }}</h3>\r\n <p style=\"text-transform: uppercase;\">{{'New'|translate}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n <div class=\"boxes\">\r\n <div class=\"left\"><span style=\"background: #fff3ea;color: #ec8f48;\"><i\r\n class=\"la la-exclamation-circle\"></i></span></div>\r\n <div class=\"right\">\r\n <h3>{{InProgressStatusCount}}</h3>\r\n <p style=\"text-transform: uppercase;\">{{'In Progress'|translate}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n <div class=\"boxes\">\r\n <div class=\"left\"><span style=\"background: #eafff1;color: #27b556;\"><i class=\"la la-check\"></i></span></div>\r\n <div class=\"right\">\r\n <h3>{{ClosedStatusCount}}</h3>\r\n <p style=\"text-transform: uppercase;\">{{'Closed'|translate}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n \r\n </div>\r\n \r\n <div class=\"whole\">\r\n\r\n <div class=\"pull-left w-50 p-r-10 p-l-10\">\r\n <input placeholder=\"{{'Search the CaseId here' | translate }}\" type=\"text\" class=\"w-100 serach_box pull-left\" [(ngModel)]=\"SearchBox\"\r\n (keyup)=\"searchData($event)\">\r\n </div>\r\n\r\n <div class=\"m-r-10 pull-left sort_div\">\r\n <div class=\"dropdown sort_dropdown pull-left\" style=\"min-width: 150px;\">\r\n \r\n <ng-select *ngIf=\"Language == 'Ar' else elseTemplate\" [items]=\"FieldListDDL\" [placeholder]=\"'\u0646\u0648\u0639'\" bindLabel=\"Name\" bindValue=\"Field\"\r\n (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n\r\n <ng-template #elseTemplate>\r\n <ng-select [items]=\"FieldListDDL\" [placeholder]=\"'Sort'\" bindLabel=\"Name\" bindValue=\"Field\"\r\n (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n <ng-container *ngIf=\"CurrentSortingField\">\r\n <span class=\"pull-left sort-icon\" style=\" font-size: 20px;\">\r\n <i class=\"la la-sort-amount-asc\" *ngIf=\"SortingField.direction=='0'\" (click)=\"SortDirection(1)\"></i>\r\n <i class=\"la la-sort-amount-desc\" *ngIf=\"SortingField.direction=='1'\" (click)=\"SortDirection(0)\"></i>\r\n </span>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"dropdown status_dropdown pull-left\" style=\"min-width: 150px;\">\r\n \r\n <ng-select *ngIf=\"Language == 'Ar' else elseEng\" (change)=\"filterStatus()\"[(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\" [placeholder]=\"'\u062D\u0627\u0644\u0629'\" bindLabel=\"NameAr\" bindValue=\"Name\">\r\n </ng-select>\r\n <ng-template #elseEng>\r\n <ng-select (change)=\"filterStatus()\"[(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\" [placeholder]=\"'Status'\" bindLabel=\"Name\" bindValue=\"Name\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n\r\n <!-- <div class=\"m-r-10 pull-left status_dropdown_div\">\r\n <div class=\"dropdown status_dropdown pull-left\" style=\"min-width: 150px;\">\r\n \r\n <ng-select *ngIf=\"Language == 'Ar' else elseEng\" (change)=\"filterStatus()\"[(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\" [placeholder]=\"'\u062D\u0627\u0644\u0629'\" bindLabel=\"NameAr\" bindValue=\"Name\">\r\n </ng-select>\r\n <ng-template #elseEng>\r\n <ng-select (change)=\"filterStatus()\"[(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\" [placeholder]=\"'Status'\" bindLabel=\"Name\" bindValue=\"Name\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class=\"pull-right\">\r\n \r\n <div class=\"m-r-10 pull-left sort_div\">\r\n <div class=\"dropdown sort_dropdown pull-left\" style=\"min-width: 150px;\">\r\n \r\n <ng-select *ngIf=\"Language == 'Ar' else elseTemplate\" [items]=\"FieldListDDL\" [placeholder]=\"'\u0646\u0648\u0639'\" bindLabel=\"Name\" bindValue=\"Field\"\r\n (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n \r\n <ng-template #elseTemplate>\r\n <ng-select [items]=\"FieldListDDL\" [placeholder]=\"'Sort'\" bindLabel=\"Name\" bindValue=\"Field\"\r\n (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n <ng-container *ngIf=\"CurrentSortingField\">\r\n <span class=\"pull-left sort-icon\" style=\" font-size: 20px;\">\r\n <i class=\"la la-sort-amount-asc\" *ngIf=\"SortingField.direction=='0'\" (click)=\"SortDirection(1)\"></i>\r\n <i class=\"la la-sort-amount-desc\" *ngIf=\"SortingField.direction=='1'\" (click)=\"SortDirection(0)\"></i>\r\n </span>\r\n </ng-container>\r\n </div>\r\n \r\n <input placeholder=\"{{'Search the CaseId here' | translate }}\" type=\"text\" class=\"serach_box pull-left\" [(ngModel)]=\"SearchBox\"\r\n (keyup)=\"searchData($event)\">\r\n \r\n </div> -->\r\n <!-- <div class=\"view-type pull-left m-l-10 m-r-10\">\r\n <span class=\"themecolor m-r-5\" style=\"font-size: 22px;\"><i class=\"la la-id-card-o\"></i></span>\r\n <span class=\"m-r-5\" style=\"font-size: 22px;\"><i class=\"la la-table\"></i></span>\r\n </div> -->\r\n \r\n \r\n \r\n </div>\r\n \r\n <div class=\"body whole\">\r\n <div class=\"lists\" *ngFor=\"let item of supportRequestData\">\r\n \r\n <div class=\"col-sm-12 user-tag p-0\">\r\n <div class=\"list-img\">\r\n <!-- <i class=\"list-user la la-user\"></i> -->\r\n <img class=\"list-user-img\" src=\"https://cdn1.iconfinder.com/data/icons/people-cultures/512/_saudi_arabian_man-128.png\"\r\n >\r\n </div>\r\n <div class=\"header\">\r\n <div class=\"\">{{item.CreatedBy}}</div>\r\n <!-- <div class=\"user-stage\" [ngClass]=\"item?.StatusIdEn\">\r\n <span>{{item?.StatusIdEn |translate}}\r\n <ng-container *ngIf=\"item.StatusIdEn == null\">{{'New'|translate}}</ng-container>\r\n </span> \r\n </div> -->\r\n <span><span class=\"user-stage\">{{globalService.CurrentLanguage =='Ar' ? (item.CaseTypeIdAr ? item.CaseTypeIdAr : (item.CaseTypeIdEn |translate)) : item.CaseTypeIdEn}}</span></span>\r\n </div>\r\n\r\n \r\n \r\n\r\n <div class=\"addedDate\">\r\n <div class=\"pull-left\">{{item.CreatedDatetime | date}} </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <div class=\"assign_to_div\">\r\n <p>{{'ID' | translate}}</p>\r\n <span>#{{item?.CaseId}}</span>\r\n </div> -->\r\n \r\n <div class=\"content col-sm-12\">\r\n <h4 class=\"themecolor\"><u class=\"m-r-15\" (click)=\"openDetailsPopup(item)\">#{{item?.CaseId}}</u> {{item.Subject}}</h4>\r\n <!-- <span ><i class=\"text-bold\">Assigned To </i>: {{item.AssignedTo}}</span> -->\r\n \r\n <p>{{item.Description}}</p>\r\n <!-- <span><i class=\"text-bold\">Assigned Date </i>: {{item.AssignedDate | date}}</span>\r\n <span><i class=\"text-bold\">DeadLine Date </i>: {{item.DeadLineDateTime | date}}</span> -->\r\n <!-- <p>Steps:1.Login to Bugasura with valid user.2.Select respective project and open it 3.In issues list search enter text for search and hit enter button4.</p> -->\r\n </div>\r\n \r\n \r\n <!-- <div class=\"req_id\">\r\n <label>{{item.CaseTypeIdEn}}</label>\r\n <p>{{item.CaseTypeId}}</p>\r\n <span><span class=\"text-bold\">{{globalService.CurrentLanguage =='Ar' ? (item.CaseTypeIdAr ? item.CaseTypeIdAr : (item.CaseTypeIdEn |translate)) : item.CaseTypeIdEn}}</span></span>\r\n \r\n <span><i class=\"text-bold\"> {{'DeadLine Date' | translate}} </i>: {{item.DeadLineDateTime | date}}</span>\r\n </div> -->\r\n\r\n <div class=\"prioritys\">\r\n \r\n <span class=\"priority\" [ngClass]=\"item?.PriorityEn\">{{globalService.CurrentLanguage =='Ar' ? (item?.PriorityAr ? item?.PriorityAr : (item?.PriorityEn |translate)) : item?.PriorityEn }}\r\n <ng-container *ngIf=\"item.PriorityEn == null\">{{'Medium'|translate}}</ng-container>\r\n </span>\r\n <div class=\"status\" [ngClass]=\"item?.StatusIdEn\">\r\n <span>{{item?.StatusIdEn |translate}}\r\n <ng-container *ngIf=\"item.StatusIdEn == null\">{{'New'|translate}}</ng-container>\r\n </span> \r\n </div>\r\n \r\n\r\n </div>\r\n\r\n <!-- <div class=\"assign_to_div\">\r\n <p>{{'Assigned To' | translate}}</p>\r\n <i class=\"las la-user-circle\" title=\"{{item.AssignedTo }}\"></i>\r\n </div> -->\r\n <div class=\"comments\">\r\n <div>\r\n <i class=\"fa fa-comments-o\" aria-hidden=\"true\"></i> \r\n <span>{{item.CommentsCount}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <app-pagination *ngIf=\"!IsClientPagination\" [totalCount]=\"totalRecordCount\" [pageCount]=\"pageCount\"\r\n [currentPage]=\"pageNo\" [pageSize]=\"pageSize\" [gridSearchType]=\"GridSearchType\"\r\n (getPaginationListData)=\"getPaginationListData($event.pageCount,$event.pageSize)\">\r\n </app-pagination>\r\n </div>\r\n </ng-container>\r\n \r\n \r\n <ng-container *ngIf=\"isDetails && detailsRecId\">\r\n \r\n <app-support-request-details [ViewFrom]=\"'Popup'\" [RecId]=\"detailsRecId\" [EntityTypeRecId]=\"detailsEntityTypeRecId\">\r\n </app-support-request-details>\r\n \r\n </ng-container>\r\n\r\n \r\n </div>\r\n</ng-template>\r\n\r\n\r\n</ng-container>\r\n",
6519
+ template: "<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/css/line-awesome.min.css\">\r\n<link rel=\"stylesheet\" href=\"https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css\">\r\n\r\n\r\n<link rel=\"stylesheet\" href=\"https://erp.arco.sa/SupportRequest/styles.css\">\r\n<link rel=\"stylesheet\" href=\"https://test.arco.sa/CustomerPortal/IndividualPortalTickets/SupportRequest/supportstyles.css\">\r\n<link rel=\"stylesheet\" href=\"https://erp.arco.sa/SupportRequest/assets/css/main.css\">\r\n<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\">\r\n<link rel=\"stylesheet\" href=\"https://erp.arco.sa/SupportRequest/assets/css/bootstrap.min.css\">\r\n\r\n<link rel=\"stylesheet\" href=\"https://erp.arco.sa/SupportRequest/assets/css/font-awesome.min.css\">\r\n\r\n<link rel=\"stylesheet\" href=\"https://unpkg.com/ngx-bootstrap/datepicker/bs-datepicker.css\">\r\n\r\n<link rel=\"stylesheet\" href=\"https://unpkg.com/@angular/material@11.2.13/prebuilt-themes/indigo-pink.css\">\r\n<!-- <div class=\"data-loader\" [ngClass]=\"{'show_loader': globalService.dataLoader == true}\">\r\n <div class=\"loading\">\r\n <div class=\"dataloadings\">\r\n </div>\r\n </div>\r\n</div> -->\r\n<ng-container *ngIf=\"globalService.dataLoader\">\r\n <div class=\"page-loader-wrapper active\">\r\n <div class=\"loader\">\r\n <div class=\"m-t-30\"><img src=\"https://test.arco.sa/CustomerPortal/IndividualPortalTickets/assets/images/arco-icon-96x96.png\" width=\"48\" height=\"48\" alt=\"ARCO\"></div>\r\n <p>Please wait...</p>\r\n </div>\r\n </div>\r\n</ng-container>\r\n<ng-container *ngIf=\"viewHtml\">\r\n\r\n<ng-container *ngIf=\"PageType=='SelfService';else caseTemplate\" >\r\n\r\n <app-self-service-flow [RequesterTypeId]=\"RequesterTypeId\" [RequesterTypeIdEn]=\"RequesterTypeIdEn\"\r\n [RequesterId]=\"RequesterId\" [Source]=\"Source\" [Channel]=\"Channel\" [ChannelEn]=\"ChannelEn\" [ChannelAr]=\"ChannelAr\"\r\n [RequestField]=\"RequesterField\"></app-self-service-flow>\r\n\r\n</ng-container>\r\n\r\n<ng-template #caseTemplate>\r\n\r\n <div class=\"req_page whole\" [ngClass]=\"{'lang_Arabic': globalService.CurrentLanguage=='Ar'}\">\r\n\r\n <div *ngIf=\"isDetails\">\r\n <span class=\"back-arrow\" (click)=\"backToRequest()\">\r\n <i class=\"fa fa-arrow-left\"></i>\r\n {{'Back'|translate}}\r\n </span>\r\n </div>\r\n\r\n <div class=\"whole m-t-10 m-b-20 clearfix\">\r\n \r\n <div class=\"pull-left\">\r\n <h2 class=\"heading pull-left\">{{PageType|translate}}\r\n <span *ngIf=\"isDetails && CaseId\"> - #{{CaseId}}</span>\r\n </h2>\r\n \r\n <div class=\"pull-left create_req hierarchy-view\">\r\n <button class=\"add_req_btn\" *ngIf=\"!isShowCreateRequest && !isDetails\" (click)=\"openIssueType()\">\r\n {{'Create New'|translate}}\r\n <i class=\"fa fa-plus\" style=\"float: right;margin: 4px 1px 2px 8px;\"></i>\r\n </button>\r\n\r\n <div class=\"modal fade show\" *ngIf=\"displayPopUp\" id=\"request-create-popup\" tabindex=\"-1\" role=\"dialog\" (click)=\"ClickedOut($event)\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog\" role=\"document\" [ngClass]=\"{'modal-sm':dropdownmodal,'modal-lg':!dropdownmodal}\">\r\n <div class=\"modal-content request-modal\">\r\n <div class=\"modal-header\">\r\n <h5 class=\"modal-title\">{{'Create' | translate}} {{globalService.CurrentLanguage =='Ar' ? (selectedType.IssueTypeAr ? selectedType.IssueTypeAr : (selectedType.IssueTypeEn |translate)) : selectedType.IssueTypeEn }}</h5>\r\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\" (click)=\"closeModel()\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n </div>\r\n <div class=\"modal-body\" *ngIf=\"IssueTypeDDL.length > 0\">\r\n <div class=\"\" *ngIf=\"dropdownmodal\">\r\n <div class=\"mb-3\">\r\n <label for=\"\" class=\"\">{{'Group'|translate}}</label>\r\n <ng-select [items]=\"IssueTypeDDL[0].IssueGroup\" [placeholder]=\"'Request'\" bindLabel=\"IssueGroupEn\" bindValue=\"IssueGroup\"\r\n (change)=\"selectGroup($event,IssueTypeDDL[0])\" >\r\n </ng-select>\r\n </div>\r\n\r\n <div class=\"mb-3\">\r\n <label for=\"\" class=\"\">{{'SubGroup'|translate}}</label>\r\n <ng-select [items]=\"dropdownIssuse\" [placeholder]=\"'Request'\" bindLabel=\"IssueEn\" bindValue=\"Issue\"\r\n (change)=\"selectSubGroup($event,true)\">\r\n </ng-select>\r\n </div>\r\n <div class=\"mb-3 text-center\">\r\n <button class=\"btn btn-small m-l-5 m-r-5 dropdownbtn\" [disabled]=\"!selectedSubGroup\" (click)=\"selectSubGroup(selectedSubGroup)\">\r\n {{'Next'|translate}}\r\n </button>\r\n </div>\r\n </div>\r\n \r\n \r\n <!-- <ng-container *ngFor=\"let _type of IssueTypeDDL\">\r\n \r\n \r\n \r\n <div class=\"row\">\r\n \r\n \r\n \r\n <ng-container *ngFor=\"let _issue of _type.IssueGroup\">\r\n <ng-container *ngIf=\"showChild\">\r\n \r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n <div class=\"Popup-boxes\" (click)=\"selectGroup(_issue,_type)\" [ngClass]=\"{'active': _issue.showSubGroup}\">\r\n \r\n \r\n <span >{{ globalService.CurrentLanguage =='Ar' ? (_issue.IssueGroupAr ?\r\n _issue.IssueGroupAr : (_issue.IssueGroupEn |translate)) : _issue.IssueGroupEn }}</span>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n </ng-container>\r\n \r\n <div class=\"col-sm-12 mb-3\" *ngIf=\"_issue.showSubGroup && !showChild && showsubChild\">\r\n <h6 class=\"\">\r\n <i class=\"fa fa-arrow-left\" style=\"margin-right: 10px;\" (click)=\"backToGroup(_issue)\"></i>\r\n {{ globalService.CurrentLanguage =='Ar' ? (selectedGroup?.IssueGroupAr ? selectedGroup?.IssueGroupAr :\r\n (selectedGroup?.IssueGroupEn |translate)) : selectedGroup?.IssueGroupEn }}\r\n \r\n </h6>\r\n </div>\r\n <ng-container *ngFor=\"let _sub of _issue.Issue\">\r\n <ng-container *ngIf=\"showsubChild && !showChild && _issue.showSubGroup\">\r\n \r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n \r\n <div class=\"Popup-boxes\" (click)=\"selectSubGroup(_sub)\">\r\n \r\n \r\n <span >{{globalService.CurrentLanguage =='Ar' ? (_sub.IssueAr ?\r\n _sub.IssueAr : (_sub.IssueEn |translate)) : _sub.IssueEn }}</span>\r\n \r\n \r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n \r\n \r\n \r\n\r\n \r\n </ng-container>\r\n </div>\r\n\r\n \r\n </ng-container> -->\r\n \r\n <ng-container *ngIf=\"isShowCreateRequest\">\r\n \r\n <div class=\"whole m-b-20 breadcrumbes\">\r\n <span>{{globalService.CurrentLanguage =='Ar' ? (selectedType.IssueTypeAr ? selectedType.IssueTypeAr : (selectedType.IssueTypeEn |translate)) : selectedType.IssueTypeEn }}</span> > \r\n \r\n <ng-container *ngIf=\"selectedType.IssueGroup; else elseCategory\">\r\n \r\n <span>{{globalService.CurrentLanguage =='Ar' ? (selectedGroup?.IssueGroupAr ? selectedGroup?.IssueGroupAr : (selectedGroup?.IssueGroupEn |translate)) : selectedGroup?.IssueGroupEn }}</span> > \r\n <span>{{globalService.CurrentLanguage =='Ar' ? (selectedSubGroup?.IssueAr ? selectedSubGroup?.IssueAr : (selectedSubGroup?.IssueEn |translate)) : selectedSubGroup?.IssueEn }}</span> > \r\n \r\n </ng-container>\r\n <ng-template #elseCategory>\r\n <span>{{globalService.CurrentLanguage =='Ar' ? (selectedCategory?.CategoryIdAr ? selectedCategory?.CategoryIdAr : (selectedCategory?.CategoryIdEn |translate)) : selectedCategory?.CategoryIdEn }}</span> > \r\n </ng-template>\r\n <span>{{globalService.CurrentLanguage =='Ar' ? (selectCaseItem.CaseIdAr ? selectCaseItem.CaseIdAr : (selectCaseItem.CaseIdEn |translate)) : selectCaseItem.CaseIdEn }}</span>\r\n </div>\r\n \r\n <app-support-request-create class=\"support_req_div\" *ngIf=\"CreateItemId\" \r\n [ViewFrom]=\"'Popup'\"\r\n \r\n [IssueType]=\"selectedType.IssueType\"\r\n [IssueTypeEn]=\"selectedType.IssueTypeEn\"\r\n [IssueTypeAr]=\"selectedType.IssueTypeAr\"\r\n \r\n [IssueGroup]=\"selectedGroup?.IssueGroup\"\r\n [IssueGroupEn]=\"selectedGroup?.IssueGroupEn\"\r\n [IssueGroupAr]=\"selectedGroup?.IssueGroupAr\"\r\n \r\n [IssueSubGroup]=\"selectedSubGroup?.Issue\" \r\n [IssueSubGroupEn]=\"selectedSubGroup?.IssueEn\" \r\n [IssueSubGroupAr]=\"selectedSubGroup?.IssueAr\" \r\n \r\n [Source]=\"Source\"\r\n [CreatedByUserType]=\"RequesterTypeId\"\r\n [Channel]=\"Channel\" \r\n [ChannelEn]=\"ChannelEn\" \r\n [ChannelAr]=\"ChannelAr\" \r\n [RequesterId]=\"RequesterId\"\r\n [RequesterIdEn]=\"RequesterTypeIdEn\"\r\n [RequestField]=\"RequesterField\"\r\n \r\n [Type]=\"'Create'\"\r\n [EntityTypeId]=\"CreateItemId\"\r\n (closeCreate)=\"closePopupCreateView($event.Type,$event.Data)\">\r\n </app-support-request-create>\r\n </ng-container>\r\n \r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"\" *ngIf=\"isCreate && !isShowCreateRequest\">\r\n <div class=\"step-fixed\" (click)=\"backToRequest()\" ></div>\r\n <ul class=\"steps\">\r\n <li>\r\n <!-- <h6> {{'Issue Type'|translate}}</h6> -->\r\n <div class=\"main_menu_brad\">\r\n \r\n <ng-container *ngFor=\"let _type of IssueTypeDDL\">\r\n <div class=\"main_menu_brad_inside clearfix\" [ngClass]=\"{'active': _type.showGroup || _type.showCategory}\">\r\n <i class=\"fa fa-caret-right\"></i>\r\n <span (click)=\"selectType(_type)\">{{ globalService.CurrentLanguage =='Ar' ? (_type.IssueTypeAr ? _type.IssueTypeAr\r\n : (_type.IssueTypeEn |translate)) : _type.IssueTypeEn }}</span>\r\n <div class=\"main_menu_brad_sub\" *ngIf=\"_type.showGroup || _type.showCategory\">\r\n <h6 class=\"m-b-10\">\r\n <i class=\"fa fa-arrow-left\" style=\"margin-right: 10px;\" (click)=\"backToType(_type)\"></i>\r\n {{ globalService.CurrentLanguage =='Ar' ? (selectedType.IssueTypeAr ? selectedType.IssueTypeAr :\r\n (selectedType.IssueTypeEn |translate)) : selectedType.IssueTypeEn }}\r\n </h6>\r\n \r\n <ng-container *ngFor=\"let _issue of _type.IssueGroup\">\r\n <div class=\"main_menu_brad_inside clearfix\" [ngClass]=\"{'active': _issue.showSubGroup}\">\r\n <i class=\"fa fa-caret-right\"></i>\r\n <span (click)=\"selectGroup(_issue,_type)\">{{ globalService.CurrentLanguage =='Ar' ? (_issue.IssueGroupAr ?\r\n _issue.IssueGroupAr : (_issue.IssueGroupEn |translate)) : _issue.IssueGroupEn }}</span>\r\n <div class=\"main_menu_brad_sub\" *ngIf=\"_issue.showSubGroup\">\r\n <h6 class=\"m-b-10\">\r\n <i class=\"fa fa-arrow-left\" style=\"margin-right: 10px;\" (click)=\"backToGroup(_issue)\"></i>\r\n {{ globalService.CurrentLanguage =='Ar' ? (selectedGroup?.IssueGroupAr ? selectedGroup?.IssueGroupAr :\r\n (selectedGroup?.IssueGroupEn |translate)) : selectedGroup?.IssueGroupEn }}\r\n \r\n </h6>\r\n <ng-container *ngFor=\"let _sub of _issue.Issue\">\r\n <div class=\"main_menu_brad \">\r\n <div class=\"main_menu_brad_inside clearfix position-relative\">\r\n \r\n <span (click)=\"selectSubGroup(_sub)\">{{globalService.CurrentLanguage =='Ar' ? (_sub.IssueAr ?\r\n _sub.IssueAr : (_sub.IssueEn |translate)) : _sub.IssueEn }}</span>\r\n \r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n \r\n <ng-container *ngFor=\"let _cat of _type.Category\">\r\n <div class=\"main_menu_brad_inside clearfix\" [ngClass]=\"{'active': _cat.showCase}\">\r\n <i class=\"fa fa-caret-right\"></i>\r\n <span (click)=\"selectCategory(_cat,_type)\">\r\n {{ globalService.CurrentLanguage =='Ar' ? (_cat.CategoryIdAr ?\r\n _cat.CategoryIdAr : (_cat.CategoryIdEn |translate)) : _cat.CategoryIdEn }}</span>\r\n <div class=\"main_menu_brad_sub\" *ngIf=\"_cat.showCase\">\r\n <h6 class=\"m-b-10\">\r\n <i class=\"fa fa-arrow-left\" style=\"margin-right: 10px;\" (click)=\"backToCategory(_cat)\"></i>\r\n {{ globalService.CurrentLanguage =='Ar' ? (selectedCategory.CategoryIdAr ? selectedCategory.CategoryIdAr :\r\n (selectedCategory.CategoryIdEn |translate)) : selectedCategory.CategoryIdEn }}\r\n \r\n </h6>\r\n <ng-container *ngFor=\"let _case of _cat.Case\">\r\n <div class=\"main_menu_brad \">\r\n <div class=\"main_menu_brad_inside clearfix position-relative\">\r\n \r\n <span (click)=\"selectCase(_case)\">{{globalService.CurrentLanguage =='Ar' ? (_case.CaseIdAr ?\r\n _case.CaseIdAr : (_case.CaseIdEn |translate)) : _case.CaseIdEn }}</span>\r\n \r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n \r\n \r\n </div>\r\n </div>\r\n </ng-container>\r\n \r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n \r\n \r\n </div>\r\n \r\n </div>\r\n <!-- <div class=\"pull-right m-r-10\">\r\n <button class=\"btn btn-outline btn-danger\" *ngIf=\"isDetails\" (click)=\"backToRequest()\">\r\n \r\n <i class=\"la la-arrow-left\"></i>\r\n {{'Back'|translate}}</button>\r\n </div> -->\r\n </div>\r\n \r\n \r\n <ng-container *ngIf=\"!isDetails\">\r\n \r\n <div class=\"whole m-b-20\">\r\n\r\n <div class=\"card-box \">\r\n <div class=\"header\">\r\n <h5 class=\"card-box-title m-0\">{{'Overview'| translate}}</h5>\r\n </div>\r\n <div class=\"body\">\r\n <div class=\"row\">\r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n <div class=\"boxes\">\r\n <div class=\"left\"><span><i class=\"la la-ticket my-custom-icon\"></i></span></div>\r\n <div class=\"right\">\r\n <h3>{{TotalStatusCount}}</h3>\r\n <p style=\"text-transform: uppercase;\">{{'Total Request'|translate}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n <div class=\"boxes\">\r\n <div class=\"left\"><span style=\"background: #fde3ff;color: #db32e8;\"><i class=\"la la-file my-custom-icon\"></i></span></div>\r\n <div class=\"right\">\r\n <h3>{{NewStatus }}</h3>\r\n <p style=\"text-transform: uppercase;\">{{'New'|translate}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n <div class=\"boxes\">\r\n <div class=\"left\"><span style=\"background: #fff3ea;color: #ec8f48;\"><i\r\n class=\"la la-hourglass-half my-custom-icon\"></i></span></div>\r\n <div class=\"right\">\r\n <h3>{{InProgressStatusCount}}</h3>\r\n <p style=\"text-transform: uppercase;\">{{'In Progress'|translate}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col col-12 col-sm-6 col-lg-3\">\r\n <div class=\"boxes\">\r\n <div class=\"left\"><span style=\"background: #eafff1;color: #27b556;\"><i class=\"la la-check my-custom-icon\"></i></span></div>\r\n <div class=\"right\">\r\n <h3>{{ClosedStatusCount}}</h3>\r\n <p style=\"text-transform: uppercase;\">{{'Closed'|translate}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n \r\n </div>\r\n \r\n <div class=\"whole\">\r\n\r\n <div class=\"pull-left w-50 p-r-10 p-l-10\">\r\n <input placeholder=\"{{'Search the CaseId here' | translate }}\" type=\"text\" class=\"w-100 serach_box pull-left\" [(ngModel)]=\"SearchBox\"\r\n (keyup)=\"searchData($event)\">\r\n </div>\r\n\r\n <div class=\"m-r-10 pull-left sort_div\">\r\n <div class=\"dropdown sort_dropdown pull-left\" style=\"min-width: 150px;\">\r\n \r\n <ng-select *ngIf=\"Language == 'Ar' else elseTemplate\" [items]=\"FieldListDDL\" [placeholder]=\"'\u0646\u0648\u0639'\" bindLabel=\"Name\" bindValue=\"Field\"\r\n (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n\r\n <ng-template #elseTemplate>\r\n <ng-select [items]=\"FieldListDDL\" [placeholder]=\"'Sort'\" bindLabel=\"Name\" bindValue=\"Field\"\r\n (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n <ng-container *ngIf=\"CurrentSortingField\">\r\n <span class=\"pull-left sort-icon\" style=\" font-size: 20px;\">\r\n <i class=\"la la-sort-amount-asc\" *ngIf=\"SortingField.direction=='0'\" (click)=\"SortDirection(1)\"></i>\r\n <i class=\"la la-sort-amount-desc\" *ngIf=\"SortingField.direction=='1'\" (click)=\"SortDirection(0)\"></i>\r\n </span>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"dropdown status_dropdown pull-left\" style=\"min-width: 150px;\">\r\n \r\n <ng-select *ngIf=\"Language == 'Ar' else elseEng\" (change)=\"filterStatus()\"[(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\" [placeholder]=\"'\u062D\u0627\u0644\u0629'\" bindLabel=\"NameAr\" bindValue=\"Name\">\r\n </ng-select>\r\n <ng-template #elseEng>\r\n <ng-select (change)=\"filterStatus()\"[(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\" [placeholder]=\"'Status'\" bindLabel=\"Name\" bindValue=\"Name\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n\r\n <!-- <div class=\"m-r-10 pull-left status_dropdown_div\">\r\n <div class=\"dropdown status_dropdown pull-left\" style=\"min-width: 150px;\">\r\n \r\n <ng-select *ngIf=\"Language == 'Ar' else elseEng\" (change)=\"filterStatus()\"[(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\" [placeholder]=\"'\u062D\u0627\u0644\u0629'\" bindLabel=\"NameAr\" bindValue=\"Name\">\r\n </ng-select>\r\n <ng-template #elseEng>\r\n <ng-select (change)=\"filterStatus()\"[(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\" [placeholder]=\"'Status'\" bindLabel=\"Name\" bindValue=\"Name\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class=\"pull-right\">\r\n \r\n <div class=\"m-r-10 pull-left sort_div\">\r\n <div class=\"dropdown sort_dropdown pull-left\" style=\"min-width: 150px;\">\r\n \r\n <ng-select *ngIf=\"Language == 'Ar' else elseTemplate\" [items]=\"FieldListDDL\" [placeholder]=\"'\u0646\u0648\u0639'\" bindLabel=\"Name\" bindValue=\"Field\"\r\n (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n \r\n <ng-template #elseTemplate>\r\n <ng-select [items]=\"FieldListDDL\" [placeholder]=\"'Sort'\" bindLabel=\"Name\" bindValue=\"Field\"\r\n (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n <ng-container *ngIf=\"CurrentSortingField\">\r\n <span class=\"pull-left sort-icon\" style=\" font-size: 20px;\">\r\n <i class=\"la la-sort-amount-asc\" *ngIf=\"SortingField.direction=='0'\" (click)=\"SortDirection(1)\"></i>\r\n <i class=\"la la-sort-amount-desc\" *ngIf=\"SortingField.direction=='1'\" (click)=\"SortDirection(0)\"></i>\r\n </span>\r\n </ng-container>\r\n </div>\r\n \r\n <input placeholder=\"{{'Search the CaseId here' | translate }}\" type=\"text\" class=\"serach_box pull-left\" [(ngModel)]=\"SearchBox\"\r\n (keyup)=\"searchData($event)\">\r\n \r\n </div> -->\r\n <!-- <div class=\"view-type pull-left m-l-10 m-r-10\">\r\n <span class=\"themecolor m-r-5\" style=\"font-size: 22px;\"><i class=\"la la-id-card-o\"></i></span>\r\n <span class=\"m-r-5\" style=\"font-size: 22px;\"><i class=\"la la-table\"></i></span>\r\n </div> -->\r\n \r\n \r\n \r\n </div>\r\n \r\n <div class=\"body whole\">\r\n <div class=\"lists\" *ngFor=\"let item of supportRequestData\">\r\n \r\n <div class=\"col-sm-12 user-tag p-0\">\r\n <div class=\"list-img\">\r\n <!-- <i class=\"list-user la la-user\"></i> -->\r\n <img class=\"list-user-img\" src=\"https://cdn1.iconfinder.com/data/icons/people-cultures/512/_saudi_arabian_man-128.png\"\r\n >\r\n </div>\r\n <div class=\"header\">\r\n <div class=\"\">{{item.CreatedBy}}</div>\r\n <!-- <div class=\"user-stage\" [ngClass]=\"item?.StatusIdEn\">\r\n <span>{{item?.StatusIdEn |translate}}\r\n <ng-container *ngIf=\"item.StatusIdEn == null\">{{'New'|translate}}</ng-container>\r\n </span> \r\n </div> -->\r\n <span><span class=\"user-stage\">{{globalService.CurrentLanguage =='Ar' ? (item.CaseTypeIdAr ? item.CaseTypeIdAr : (item.CaseTypeIdEn |translate)) : item.CaseTypeIdEn}}</span></span>\r\n </div>\r\n\r\n \r\n \r\n\r\n <div class=\"addedDate\">\r\n <div class=\"pull-left\">{{item.CreatedDatetime | date}} </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <div class=\"assign_to_div\">\r\n <p>{{'ID' | translate}}</p>\r\n <span>#{{item?.CaseId}}</span>\r\n </div> -->\r\n \r\n <div class=\"content col-sm-12\">\r\n <h4 class=\"themecolor\"><u class=\"m-r-15\" (click)=\"openDetailsPopup(item)\">#{{item?.CaseId}}</u> {{item.Subject}}</h4>\r\n <!-- <span ><i class=\"text-bold\">Assigned To </i>: {{item.AssignedTo}}</span> -->\r\n \r\n <p>{{item.Description}}</p>\r\n <!-- <span><i class=\"text-bold\">Assigned Date </i>: {{item.AssignedDate | date}}</span>\r\n <span><i class=\"text-bold\">DeadLine Date </i>: {{item.DeadLineDateTime | date}}</span> -->\r\n <!-- <p>Steps:1.Login to Bugasura with valid user.2.Select respective project and open it 3.In issues list search enter text for search and hit enter button4.</p> -->\r\n </div>\r\n \r\n \r\n <!-- <div class=\"req_id\">\r\n <label>{{item.CaseTypeIdEn}}</label>\r\n <p>{{item.CaseTypeId}}</p>\r\n <span><span class=\"text-bold\">{{globalService.CurrentLanguage =='Ar' ? (item.CaseTypeIdAr ? item.CaseTypeIdAr : (item.CaseTypeIdEn |translate)) : item.CaseTypeIdEn}}</span></span>\r\n \r\n <span><i class=\"text-bold\"> {{'DeadLine Date' | translate}} </i>: {{item.DeadLineDateTime | date}}</span>\r\n </div> -->\r\n\r\n <div class=\"prioritys\">\r\n \r\n <span class=\"priority\" [ngClass]=\"item?.PriorityEn\">{{globalService.CurrentLanguage =='Ar' ? (item?.PriorityAr ? item?.PriorityAr : (item?.PriorityEn |translate)) : item?.PriorityEn }}\r\n <ng-container *ngIf=\"item.PriorityEn == null\">{{'Medium'|translate}}</ng-container>\r\n </span>\r\n <div class=\"status\" [ngClass]=\"item?.StatusIdEn\">\r\n <span>{{item?.StatusIdEn |translate}}\r\n <ng-container *ngIf=\"item.StatusIdEn == null\">{{'New'|translate}}</ng-container>\r\n </span> \r\n </div>\r\n \r\n\r\n </div>\r\n\r\n <!-- <div class=\"assign_to_div\">\r\n <p>{{'Assigned To' | translate}}</p>\r\n <i class=\"las la-user-circle\" title=\"{{item.AssignedTo }}\"></i>\r\n </div> -->\r\n <div class=\"comments\">\r\n <div>\r\n <i class=\"fa fa-comments-o\" aria-hidden=\"true\"></i> \r\n <span>{{item.CommentsCount}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <app-pagination *ngIf=\"!IsClientPagination\" [totalCount]=\"totalRecordCount\" [pageCount]=\"pageCount\"\r\n [currentPage]=\"pageNo\" [pageSize]=\"pageSize\" [gridSearchType]=\"GridSearchType\"\r\n (getPaginationListData)=\"getPaginationListData($event.pageCount,$event.pageSize)\">\r\n </app-pagination>\r\n </div>\r\n </ng-container>\r\n \r\n \r\n <ng-container *ngIf=\"isDetails && detailsRecId\">\r\n \r\n <app-support-request-details [ViewFrom]=\"'Popup'\" [RecId]=\"detailsRecId\" [EntityTypeRecId]=\"detailsEntityTypeRecId\">\r\n </app-support-request-details>\r\n \r\n </ng-container>\r\n\r\n \r\n </div>\r\n</ng-template>\r\n\r\n\r\n</ng-container>\r\n",
6928
6520
  styles: [""]
6929
6521
  },] }
6930
6522
  ];
@@ -6932,6 +6524,7 @@ RequestFlowComponent.ctorParameters = () => [
6932
6524
  { type: SupportRequestService },
6933
6525
  { type: FormBuilder },
6934
6526
  { type: EntityTypeSetupService },
6527
+ { type: Router },
6935
6528
  { type: GlobalService },
6936
6529
  { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
6937
6530
  ];
@@ -8767,37 +8360,41 @@ class EntityDynamicFieldComponent {
8767
8360
  defineRecordCount(event) {
8768
8361
  this.defineItemsPerPage = event.target.value;
8769
8362
  this.pageStartFrom = 1;
8770
- }
8771
- autoSearchDropdown(event, field, searchValue, RequestorField) {
8772
- this.tempFields = field;
8773
- if (field.DataType == E_DataType.dropdown) {
8774
- if (field.FieldData) {
8775
- var jsonItem = JSON.parse(field.FieldData);
8776
- if (jsonItem.isDynamic && jsonItem.rest && jsonItem.rest.URL) {
8777
- let restData = jsonItem.rest;
8778
- let _Searchcriteria = {
8779
- Pagging: {
8780
- PageNo: 1,
8781
- PageSize: 100,
8782
- },
8783
- Where: [],
8784
- SortOrder: 1,
8785
- };
8786
- if (!searchValue)
8787
- searchValue = event.target.value;
8788
- let filterobj = {
8789
- Field: restData.valueField,
8790
- Operator: 'Contains',
8791
- TableAlias: '',
8792
- Value: searchValue,
8793
- };
8794
- jsonItem.rest.QueryStrings.filter(x => x.Type == "SearchValue").map((y) => {
8795
- let temp = ":" + y.Name;
8796
- filterobj.Field += temp;
8797
- });
8798
- if (filterobj.Field)
8799
- _Searchcriteria.Where.push(filterobj);
8800
- this.loadDropdown(field, _Searchcriteria, RequestorField, searchValue);
8363
+ }
8364
+ autoSearchDropdown(event, field, searchValue, RequestorField) {
8365
+ debugger;
8366
+ if (event.keyCode == 13) {
8367
+ this.globalService.dataLoader = true;
8368
+ this.tempFields = field;
8369
+ if (field.DataType == E_DataType.dropdown) {
8370
+ if (field.FieldData) {
8371
+ var jsonItem = JSON.parse(field.FieldData);
8372
+ if (jsonItem.isDynamic && jsonItem.rest && jsonItem.rest.URL) {
8373
+ let restData = jsonItem.rest;
8374
+ let _Searchcriteria = {
8375
+ Pagging: {
8376
+ PageNo: 1,
8377
+ PageSize: 100,
8378
+ },
8379
+ Where: [],
8380
+ SortOrder: 1,
8381
+ };
8382
+ if (!searchValue)
8383
+ searchValue = event.target.value;
8384
+ let filterobj = {
8385
+ Field: restData.valueField,
8386
+ Operator: 'Contains',
8387
+ TableAlias: '',
8388
+ Value: searchValue,
8389
+ };
8390
+ jsonItem.rest.QueryStrings.filter(x => x.Type == "SearchValue").map((y) => {
8391
+ let temp = ":" + y.Name;
8392
+ filterobj.Field += temp;
8393
+ });
8394
+ if (filterobj.Field)
8395
+ _Searchcriteria.Where.push(filterobj);
8396
+ this.loadDropdown(field, _Searchcriteria, RequestorField, searchValue);
8397
+ }
8801
8398
  }
8802
8399
  }
8803
8400
  }
@@ -9218,7 +8815,7 @@ class EntityDynamicFieldComponent {
9218
8815
  EntityDynamicFieldComponent.decorators = [
9219
8816
  { type: Component, args: [{
9220
8817
  selector: 'app-entity-dynamic-field',
9221
- template: "<ng-container *ngIf=\"fieldsList.length != 0\">\r\n <div class=\"d-block field position-relative \" [ngClass]=\"{'dynamic-view':(Type=='View'|| Type=='Details'),'lang_Arabic': globalService.CurrentLanguage=='Ar'}\"\r\n *ngFor=\"let item of fieldsList; let fieldIndex = index\">\r\n <!-- textarea, image, file -->\r\n\r\n <ng-container *ngIf=\"Type !='Details' else elseTemplate\" [formGroup]=\"pageForm.form\">\r\n <ng-container\r\n *ngIf=\"(item.DataType == 10 || item.DataType == 7 || item.DataType == 8 || item.DataType == 11 || item.DataType == _dataType.HtmlEditor || item.DataType == _dataType.List) else thenBlack\">\r\n <ng-container>\r\n <!-- *ngIf=\"item.IsVisible\" -->\r\n <!-- Drop Down -->\r\n <div class=\"form-group\" *ngIf=\"item.DataType == 8\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n <!-- {{item.Label || item.Description }} -->\r\n\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n\r\n <span class=\"red\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">\r\n <!-- <ng-select [id]=\"item.Description\" (click)=\"loadDropdown(item)\"\r\n [items]=\"dropDown$[item.Description] | async\" [formControlName]=\"item.Description\"\r\n bindLabel=\"Description\" bindValue=\"Id\" (change)=\"changeFiledValue($event,item)\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\">\r\n </ng-select> -->\r\n\r\n <div class=\"position-relative\" style=\"position: relative;\">\r\n\r\n <div class=\"control-input\">\r\n <!-- {{item.showSelectedValues|translate}} -->\r\n <label class=\"form-control\" [ngClass]=\"{'border-red': item.IsMandatory && !(pageForm.form.value[item.Description]) }\" (click)=\"showTable(item)\">\r\n {{item.showSelectedValues? (item.showSelectedValues ): pageForm.form.value[item.Description]}}\r\n </label>\r\n <input [id]=\"item.Description\" autocomplete=\"off\" [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.DescriptionAr ?item.DescriptionAr : (item.Description | translate)) :item.Description\" type=\"hidden\"\r\n [name]=\"item.Description\" [formControlName]=\"item.Description\"\r\n (click)=\"item.showTable =!item.showTable;loadDropdownColumn(item)\" class=\"form-control\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\"\r\n (keyup)=\"changeFiledValue($event,item)\" readonly />\r\n </div>\r\n\r\n\r\n\r\n <div class=\"control-table autoComplete_dropdown\" *ngIf=\"item.showTable\" [ngClass]=\"{'d-none':item.IsInactive}\">\r\n\r\n <span class=\"close pull-right\" (click)=\"item.showTable =!item.showTable;\">x</span>\r\n\r\n <div class=\"control-table-search m-b-10 m-r-30\" style=\"position: relative;\">\r\n <input type=\"text\" [(ngModel)]=\"item.AutoSearchText\" [ngModelOptions]=\"{standalone: true}\"\r\n placeholder=\"{{'Search Here to Get Data'|translate}}....\" (keyup)=\"autoSearchDropdown($event,item)\" />\r\n <i class=\"la la-search\"\r\n style=\"position: absolute;\r\n top: 4px;\r\n right: 5px;\r\n color: #ddd;\r\n font-size: 18px; \"\r\n (click)=\"loadDropdown(item)\"></i>\r\n <!-- <button class=\"btn-outline-secondary table_buttons\" >\r\n <i class=\"la la-search\"></i>\r\n </button> -->\r\n </div>\r\n <table class=\"table table-bordered table-striped table-hover\">\r\n <thead>\r\n <tr>\r\n <td style=\"width: 30px;\"></td>\r\n <td *ngFor=\"let col of dropDownColumn$[item.Description]| Unique\">\r\n {{col|translate}}\r\n </td>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n *ngFor=\"let val of (dropDown$[item.Description] | async | filter:item.AutoSearchText) | paginate: {itemsPerPage:defineItemsPerPage, currentPage:pageStartFrom} \">\r\n <td style=\"width: 30px;\">\r\n <span (click)=\"item.showTable =!item.showTable;selectDropDownRow(val,item)\">\r\n <input class=\"themecolor\" name=\"{{item.Description}}\" type=\"radio\">\r\n </span>\r\n </td>\r\n <ng-container *ngFor=\"let col of dropDownColumn$[item.Description]| Unique\">\r\n <td> {{val[col]}} </td>\r\n </ng-container>\r\n\r\n </tr>\r\n </tbody>\r\n\r\n\r\n </table>\r\n\r\n <ng-container *ngIf=\"(dropDown$[item.Description]| async) as list\">\r\n\r\n <div class=\"bootom-pagenations whole row m-0\" *ngIf=\"list && list.length > 10\"> \r\n\r\n <pagination-controls class=\"inline-block pull-left col padding-0\" style=\"max-width: 100%;\" (pageChange)=\"pageStartFrom = $event\">\r\n </pagination-controls>\r\n\r\n <div class=\"inline-block page-style pull-right col padding-0\" style=\"max-width: 50px;\">\r\n <!-- <label class=\"pageLabel\">{{'Page Size'|translate}}: </label> -->\r\n <select class=\"form-control form-control-sm pageSize inline-block m-0\" style=\"width: 50px;\"\r\n [(ngModel)]=\"defineItemsPerPage\" [ngModelOptions]=\"{standalone: true}\" (change)=\"defineRecordCount($event)\">\r\n <option value=\"10\">10</option>\r\n <option value=\"15\">15</option>\r\n <option value=\"20\">20</option>\r\n <option value=\"25\">25</option>\r\n </select>\r\n </div>\r\n\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- text-area -->\r\n <div class=\"form-group\" *ngIf=\"item.DataType == 10\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-md-3 col-lg-4 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\" (click)=\"showShortKey(item)\">\r\n <!-- {{item.Label || item.Description }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">\r\n <textarea class=\"dy-text-area\" rows=\"4\" [id]=\"item.Description\" [name]=\"item.Description\"\r\n [formControlName]=\"item.Description\" class=\"form-control\" [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label\"\r\n (click)=\"activeInputId = item.Description\" (keyup)=\"changeFiledValue($event,item)\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\"></textarea>\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n\r\n\r\n <div class=\"canned-response\" *ngIf=\"item.DataType ==10\">\r\n\r\n <button type=\"button\" (click)=\"showshortcode =!showshortcode; getShortCodeCannedResponse()\"\r\n class=\"btn-outline-success badge bg-white\">\r\n <i class=\"la la-envelope-open-text themecolor\" style=\"font-size: 25px;\"></i> </button>\r\n <ul role=\"menu\" class=\"dropdown-menu show\" *ngIf=\"showshortcode\">\r\n <li *ngFor=\"let short of shortcode\"><a class=\"dropdown-item\"\r\n (click)=\"selectShortKey(short)\">{{short.Message}}</a></li>\r\n </ul>\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n <!-- Image -->\r\n <div class=\"form-group\" *ngIf=\"item.DataType == 7\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n <!-- {{item.Label || item.Description }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">\r\n <input autocomplete=\"off\" [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label\" type=\"file\" [id]=\"item.Description\"\r\n [name]=\"item.Description\" [formControlName]=\"item.Description\" class=\"form-control\"\r\n (click)=\"activeInputId = item.Description\" (change)=\"changeFile($event,item)\"\r\n accept=\"image/x-png,image/gif,image/jpeg\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\" />\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- file -->\r\n <div class=\"form-group\" *ngIf=\"item.DataType == 11\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n <!-- {{item.Label || item.Description }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">\r\n <input [id]=\"item.Description\" autocomplete=\"off\"\r\n style=\"width: calc(100% - 30px); display: inline-block; margin: 00 5px 0 0;\"\r\n [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label\" type=\"file\" (change)=\"changeFile($event,item)\" [name]=\"item.Description\"\r\n [formControlName]=\"item.Description\" (click)=\"activeInputId = item.Description\" class=\"form-control\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\" />\r\n\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-group\" *ngIf=\"item.DataType == _dataType.List\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly}\">\r\n \r\n <div class=\"row\">\r\n \r\n <div class=\"col text-right\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n <span class=\"padding-left-10\">\r\n <i (click)=\"addnewList(item)\" class=\"themeprimary la la-plus bold fs-15\"></i>\r\n </span>\r\n </label>\r\n </div>\r\n <div class=\"col control-input\">\r\n \r\n <div class=\"form-group\" *ngFor=\"let _list of FiedlListData$[item.Description]; let i = index\">\r\n <div class=\"row\">\r\n <span class=\"col-sm-3\">\r\n <input class=\"form-control\" type=\"text\" placeholder=\"key\" [(ngModel)]=\"_list.key\" [ngModelOptions]=\"{standalone: true}\" (keyup)=\"changeFiledList(item,_list,i)\" >\r\n </span>\r\n <span class=\"col-sm-1 no-padding\" style=\"width: auto;\">=</span>\r\n <span class=\"col-sm-3\">\r\n <input class=\"form-control\" type=\"text\" placeholder=\"value\" [(ngModel)]=\"_list.value\" [ngModelOptions]=\"{standalone: true}\" (keyup)=\"changeFiledList(item,_list,i)\" >\r\n </span>\r\n <span class=\"col-sm-1 no-padding\" (click)=\"removeList(item,i)\" style=\"width: auto;\">\r\n <i class=\"la la-times themeprimary\"></i>\r\n </span>\r\n \r\n </div>\r\n </div>\r\n \r\n \r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n \r\n \r\n </div>\r\n \r\n </div>\r\n\r\n\r\n <div class=\"form-group\" *ngIf=\"item.DataType == _dataType.HtmlEditor\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n <!-- {{item.Label || item.Description }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">\r\n <angular-editor [id]=\"item.Description\" class=\"mail_editor\" [formControlName]=\"item.Description\"\r\n (keyup)=\"changeFiledValue($event,item)\" (click)=\"activeInputId = item.Description\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\"></angular-editor>\r\n\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #thenBlack>\r\n <div class=\"form-group\" *ngIf=\"!item.IsTableField\" [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <!-- *ngIf=\"item.IsVisible\" -->\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n <!-- {{item.Label }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <!-- string, int, decimal, time, checkbox, image -->\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\"\r\n *ngIf=\"item.DataType == 1 || item.DataType == 2 || item.DataType == 5 || item.DataType == 6\">\r\n\r\n \r\n <ng-container *ngIf=\"item.IsTableField; else elseTemplate\">\r\n \r\n <label class=\"form-control field_muted\" style=\"padding-right: 0px;\">\r\n {{pageForm.form.value[item.Description]}}\r\n </label>\r\n\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <input [id]=\"item.Description\" autocomplete=\"off\"\r\n [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label\"\r\n [type]=\"getType(item.DataType)\" [name]=\"item.Description\" [formControlName]=\"item.Description\"\r\n (click)=\"activeInputId = item.Description\" class=\"form-control\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\"\r\n (keyup)=\"changeFiledValue($event,item)\" />\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </ng-template>\r\n </div>\r\n <!-- checkbox -->\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\" *ngIf=\"item.DataType == 9\">\r\n <input [id]=\"item.Description\" autocomplete=\"off\" type=\"checkbox\" [formControlName]=\"item.Description\"\r\n class=\"form-control\" [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\"\r\n (change)=\"changeFiledValue($event,item)\" />\r\n\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n\r\n\r\n <!-- date && date-time -->\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0 date_pick\" *ngIf=\"item.DataType == 3 || item.DataType == 4\">\r\n <input [id]=\"item.Description\" type=\"text\" [matDatepicker]=\"myDatepicker\" [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label\"\r\n [name]=\"item.Description\" [formControlName]=\"item.Description\"\r\n (click)=\"activeInputId = item.Description\" class=\"form-control\" (dateChange)=\"changeFiledValue($event,item)\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\" />\r\n <div class=\"datepickerstyle\">\r\n <mat-datepicker-toggle [for]=\"myDatepicker\"></mat-datepicker-toggle>\r\n <mat-datepicker #myDatepicker></mat-datepicker>\r\n </div>\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n\r\n <div class=\" row\" *ngIf=\"!item.IsUiField\" >\r\n <label class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <!-- {{item.Label }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n </label>\r\n <span class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">: &nbsp; &nbsp;\r\n\r\n <ng-container *ngIf=\"item && item.Description\" [ngSwitch]=\"item.DataType\">\r\n <span *ngSwitchCase=\"_dataType.date\" class=\"tooltiptexts\">\r\n {{PageGroupValues[item.Description] | date :'dd/MM/yyyy'}}\r\n </span>\r\n\r\n <span *ngSwitchCase=\"_dataType.dateTime\" class=\"tooltiptexts\">\r\n {{PageGroupValues[item.Description] | date :'dd/MM/yyyy h:mm a'}}\r\n </span>\r\n\r\n <span *ngSwitchCase=\"_dataType.bool\">\r\n {{(PageGroupValues[item.Description] ==true ? 'Yes' : 'No') | translate }}\r\n </span>\r\n\r\n <span *ngSwitchCase=\"_dataType.dropdown\">\r\n {{ globalService.CurrentLanguage=='Ar'?(PageGroupValues[item.Description+\"_DescAr\"] ? PageGroupValues[item.Description+\"_DescAr\"] : PageGroupValues[item.Description])\r\n :(PageGroupValues[item.Description+\"_Desc\"] ? PageGroupValues[item.Description+\"_Desc\"] : PageGroupValues[item.Description]) }}\r\n </span>\r\n <span *ngSwitchCase=\"_dataType.LookUp\">\r\n <ng-container *ngIf=\"item.LookupData; else elseLookupTemplate\">\r\n {{PageGroupValues[getFiledKey(item.Description,item.LookupData)] }}\r\n </ng-container>\r\n <ng-template #elseLookupTemplate>\r\n {{ globalService.CurrentLanguage=='Ar'?(PageGroupValues[item.Description+\"_DescAr\"] ? PageGroupValues[item.Description+\"_DescAr\"] : PageGroupValues[item.Description])\r\n :(PageGroupValues[item.Description+\"_Desc\"] ? PageGroupValues[item.Description+\"_Desc\"] : PageGroupValues[item.Description]) }}\r\n </ng-template>\r\n </span>\r\n\r\n\r\n <div *ngSwitchCase=\"_dataType.HtmlEditor\" [innerHTML]=\"PageGroupValues[item.Description]\">\r\n </div>\r\n\r\n\r\n <span *ngSwitchDefault>\r\n {{ globalService.CurrentLanguage=='Ar'?(PageGroupValues[item.Description+\"_DescAr\"] ? PageGroupValues[item.Description+\"_DescAr\"] : PageGroupValues[item.Description])\r\n :(PageGroupValues[item.Description+\"_Desc\"] ? PageGroupValues[item.Description+\"_Desc\"] : PageGroupValues[item.Description]) }}\r\n \r\n </span>\r\n </ng-container>\r\n </span>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"Type !='Details' && ActionType != '1' && ActionType != '2'\">\r\n <div class=\"settings position-absolute\">\r\n <i (click)=\"_deleteField(fieldIndex)\" class=\"la la-trash-o\"></i>\r\n <i (click)=\"_downField(fieldIndex)\" class=\"la la-arrow-down\"></i>\r\n <i (click)=\"_upField(fieldIndex)\" class=\"la la-arrow-up\"></i>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n</ng-container>\r\n",
8818
+ template: "<ng-container *ngIf=\"fieldsList.length != 0\">\r\n <div class=\"d-block field position-relative \" [ngClass]=\"{'dynamic-view':(Type=='View'|| Type=='Details'),'lang_Arabic': globalService.CurrentLanguage=='Ar'}\"\r\n *ngFor=\"let item of fieldsList; let fieldIndex = index\">\r\n <!-- textarea, image, file -->\r\n\r\n <ng-container *ngIf=\"Type !='Details' else elseTemplate\" [formGroup]=\"pageForm.form\">\r\n <ng-container\r\n *ngIf=\"(item.DataType == 10 || item.DataType == 7 || item.DataType == 8 || item.DataType == 11 || item.DataType == _dataType.HtmlEditor || item.DataType == _dataType.List) else thenBlack\">\r\n <ng-container>\r\n <!-- *ngIf=\"item.IsVisible\" -->\r\n <!-- Drop Down -->\r\n <div class=\"form-group\" *ngIf=\"item.DataType == 8\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n <!-- {{item.Label || item.Description }} -->\r\n\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n\r\n <span class=\"red required-custom\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">\r\n <!-- <ng-select [id]=\"item.Description\" (click)=\"loadDropdown(item)\"\r\n [items]=\"dropDown$[item.Description] | async\" [formControlName]=\"item.Description\"\r\n bindLabel=\"Description\" bindValue=\"Id\" (change)=\"changeFiledValue($event,item)\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\">\r\n </ng-select> -->\r\n\r\n <div class=\"position-relative\" style=\"position: relative;\">\r\n\r\n <div class=\"control-input\">\r\n <!-- {{item.showSelectedValues|translate}} -->\r\n <label class=\"form-control\" style=\"padding: 0px 2px;margin: 0px;\" [ngClass]=\"{'border-red': item.IsMandatory && !(pageForm.form.value[item.Description]) }\" (click)=\"showTable(item)\">\r\n {{item.showSelectedValues? (item.showSelectedValues ): pageForm.form.value[item.Description]}}\r\n </label>\r\n <input [id]=\"item.Description\" autocomplete=\"off\" [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.DescriptionAr ?item.DescriptionAr : (item.Description | translate)) :item.Description\" type=\"hidden\"\r\n [name]=\"item.Description\" [formControlName]=\"item.Description\"\r\n (click)=\"item.showTable =!item.showTable;loadDropdownColumn(item)\" class=\"form-control\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\"\r\n (keyup)=\"changeFiledValue($event,item)\" readonly />\r\n </div>\r\n\r\n\r\n\r\n <div class=\"control-table autoComplete_dropdown\" *ngIf=\"item.showTable\" [ngClass]=\"{'d-none':item.IsInactive}\">\r\n\r\n <span class=\"close pull-right\" (click)=\"item.showTable =!item.showTable;\">x</span>\r\n\r\n <div class=\"control-table-search m-b-10 m-r-30\" style=\"position: relative;\">\r\n <input type=\"text\" [(ngModel)]=\"item.AutoSearchText\" [ngModelOptions]=\"{standalone: true}\"\r\n placeholder=\"{{'Search And Press Enter to Get Data'|translate}}....\" (keydown)=\"autoSearchDropdown($event,item)\" />\r\n <i class=\"la la-search\"\r\n style=\"position: absolute;\r\n top: 4px;\r\n right: 5px;\r\n color: #ddd;\r\n font-size: 18px; \"\r\n (click)=\"loadDropdown(item)\"></i>\r\n <small class=\"red\">{{'Search And Press Enter to Get Data'|translate}}</small>\r\n <!-- <button class=\"btn-outline-secondary table_buttons\" >\r\n <i class=\"la la-search\"></i>\r\n </button> -->\r\n </div>\r\n <table class=\"table table-bordered table-striped table-hover\">\r\n <thead>\r\n <tr>\r\n <td style=\"width: 30px;\"></td>\r\n <td *ngFor=\"let col of dropDownColumn$[item.Description]| Unique\">\r\n {{col|translate}}\r\n </td>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n *ngFor=\"let val of (dropDown$[item.Description] | async | filter:item.AutoSearchText) | paginate: {itemsPerPage:defineItemsPerPage, currentPage:pageStartFrom} \">\r\n <td style=\"width: 30px;\">\r\n <span (click)=\"item.showTable =!item.showTable;selectDropDownRow(val,item)\">\r\n <input class=\"themecolor\" name=\"{{item.Description}}\" type=\"radio\">\r\n </span>\r\n </td>\r\n <ng-container *ngFor=\"let col of dropDownColumn$[item.Description]| Unique\">\r\n <td> {{val[col]}} </td>\r\n </ng-container>\r\n\r\n </tr>\r\n </tbody>\r\n\r\n\r\n </table>\r\n\r\n <ng-container *ngIf=\"(dropDown$[item.Description]| async) as list\">\r\n\r\n <div class=\"bootom-pagenations whole row m-0\" *ngIf=\"list && list.length > 10\"> \r\n\r\n <pagination-controls class=\"inline-block pull-left col padding-0\" style=\"max-width: 100%;\" (pageChange)=\"pageStartFrom = $event\">\r\n </pagination-controls>\r\n\r\n <div class=\"inline-block page-style pull-right col padding-0\" style=\"max-width: 50px;\">\r\n <!-- <label class=\"pageLabel\">{{'Page Size'|translate}}: </label> -->\r\n <select class=\"form-control form-control-sm pageSize inline-block m-0\" style=\"width: 50px;\"\r\n [(ngModel)]=\"defineItemsPerPage\" [ngModelOptions]=\"{standalone: true}\" (change)=\"defineRecordCount($event)\">\r\n <option value=\"10\">10</option>\r\n <option value=\"15\">15</option>\r\n <option value=\"20\">20</option>\r\n <option value=\"25\">25</option>\r\n </select>\r\n </div>\r\n\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- text-area -->\r\n <div class=\"form-group\" *ngIf=\"item.DataType == 10\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-md-3 col-lg-4 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\" (click)=\"showShortKey(item)\">\r\n <!-- {{item.Label || item.Description }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red required-custom\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">\r\n <textarea class=\"dy-text-area\" rows=\"4\" [id]=\"item.Description\" [name]=\"item.Description\"\r\n [formControlName]=\"item.Description\" class=\"form-control\" [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label\"\r\n (click)=\"activeInputId = item.Description\" (keyup)=\"changeFiledValue($event,item)\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\"></textarea>\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n\r\n\r\n <div class=\"canned-response\" *ngIf=\"item.DataType ==10\">\r\n\r\n <button type=\"button\" (click)=\"showshortcode =!showshortcode; getShortCodeCannedResponse()\"\r\n class=\"btn-outline-success badge bg-white\">\r\n <i class=\"la la-envelope-open-text themecolor\" style=\"font-size: 25px;\"></i> </button>\r\n <ul role=\"menu\" class=\"dropdown-menu show\" *ngIf=\"showshortcode\">\r\n <li *ngFor=\"let short of shortcode\"><a class=\"dropdown-item\"\r\n (click)=\"selectShortKey(short)\">{{short.Message}}</a></li>\r\n </ul>\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n <!-- Image -->\r\n <div class=\"form-group\" *ngIf=\"item.DataType == 7\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n <!-- {{item.Label || item.Description }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red required-custom\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">\r\n <input autocomplete=\"off\" [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label\" type=\"file\" [id]=\"item.Description\"\r\n [name]=\"item.Description\" [formControlName]=\"item.Description\" class=\"form-control\"\r\n (click)=\"activeInputId = item.Description\" (change)=\"changeFile($event,item)\"\r\n accept=\"image/x-png,image/gif,image/jpeg\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\" />\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- file -->\r\n <div class=\"form-group\" *ngIf=\"item.DataType == 11\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n <!-- {{item.Label || item.Description }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red required-custom\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">\r\n <input [id]=\"item.Description\" autocomplete=\"off\"\r\n style=\"width: calc(100% - 30px); display: inline-block; margin: 00 5px 0 0;\"\r\n [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label\" type=\"file\" (change)=\"changeFile($event,item)\" [name]=\"item.Description\"\r\n [formControlName]=\"item.Description\" (click)=\"activeInputId = item.Description\" class=\"form-control\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\" />\r\n\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-group\" *ngIf=\"item.DataType == _dataType.List\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly}\">\r\n \r\n <div class=\"row\">\r\n \r\n <div class=\"col text-right\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red required-custom\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n <span class=\"padding-left-10\">\r\n <i (click)=\"addnewList(item)\" class=\"themeprimary la la-plus bold fs-15\"></i>\r\n </span>\r\n </label>\r\n </div>\r\n <div class=\"col control-input\">\r\n \r\n <div class=\"form-group\" *ngFor=\"let _list of FiedlListData$[item.Description]; let i = index\">\r\n <div class=\"row\">\r\n <span class=\"col-sm-3\">\r\n <input class=\"form-control\" type=\"text\" placeholder=\"key\" [(ngModel)]=\"_list.key\" [ngModelOptions]=\"{standalone: true}\" (keyup)=\"changeFiledList(item,_list,i)\" >\r\n </span>\r\n <span class=\"col-sm-1 no-padding\" style=\"width: auto;\">=</span>\r\n <span class=\"col-sm-3\">\r\n <input class=\"form-control\" type=\"text\" placeholder=\"value\" [(ngModel)]=\"_list.value\" [ngModelOptions]=\"{standalone: true}\" (keyup)=\"changeFiledList(item,_list,i)\" >\r\n </span>\r\n <span class=\"col-sm-1 no-padding\" (click)=\"removeList(item,i)\" style=\"width: auto;\">\r\n <i class=\"la la-times themeprimary\"></i>\r\n </span>\r\n \r\n </div>\r\n </div>\r\n \r\n \r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n \r\n \r\n </div>\r\n \r\n </div>\r\n\r\n\r\n <div class=\"form-group\" *ngIf=\"item.DataType == _dataType.HtmlEditor\"\r\n [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n <!-- {{item.Label || item.Description }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red required-custom\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">\r\n <angular-editor [id]=\"item.Description\" class=\"mail_editor\" [formControlName]=\"item.Description\"\r\n (keyup)=\"changeFiledValue($event,item)\" (click)=\"activeInputId = item.Description\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\"></angular-editor>\r\n\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #thenBlack>\r\n <div class=\"form-group\" *ngIf=\"!item.IsTableField\" [ngClass]=\"{hide: item.IsHide,inactiveLink:item.IsReadonly,field_readonly:item.IsInactive}\">\r\n <!-- *ngIf=\"item.IsVisible\" -->\r\n <div class=\"row\">\r\n <div class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <label class=\"control-label\" style=\"padding-right: 0px;\">\r\n <!-- {{item.Label }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n <span class=\"red required-custom\" *ngIf=\"item.IsMandatory || pageForm.form.get(item.Description)?.errors\">*</span>\r\n </label>\r\n </div>\r\n <!-- string, int, decimal, time, checkbox, image -->\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\"\r\n *ngIf=\"item.DataType == 1 || item.DataType == 2 || item.DataType == 5 || item.DataType == 6\">\r\n\r\n \r\n <ng-container *ngIf=\"item.IsTableField; else elseTemplate\">\r\n \r\n <label class=\"form-control field_muted\" style=\"padding-right: 0px;\">\r\n {{pageForm.form.value[item.Description]}}\r\n </label>\r\n\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <input [id]=\"item.Description\" autocomplete=\"off\"\r\n [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label\"\r\n [type]=\"getType(item.DataType)\" [name]=\"item.Description\" [formControlName]=\"item.Description\"\r\n (click)=\"activeInputId = item.Description\" class=\"form-control\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\"\r\n (keyup)=\"changeFiledValue($event,item)\" />\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </ng-template>\r\n </div>\r\n <!-- checkbox -->\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\" *ngIf=\"item.DataType == 9\">\r\n <input [id]=\"item.Description\" autocomplete=\"off\" type=\"checkbox\" [formControlName]=\"item.Description\" style=\"margin-top: 7px;margin-bottom: 8px;\"\r\n class=\"form-control\" [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\"\r\n (change)=\"changeFiledValue($event,item)\" />\r\n\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n\r\n\r\n <!-- date && date-time -->\r\n <div class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0 date_pick\" *ngIf=\"item.DataType == 3 || item.DataType == 4\">\r\n <input [id]=\"item.Description\" type=\"text\" [matDatepicker]=\"myDatepicker\" [placeholder]=\"globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label\"\r\n [name]=\"item.Description\" [formControlName]=\"item.Description\"\r\n (click)=\"activeInputId = item.Description\" class=\"form-control\" (dateChange)=\"changeFiledValue($event,item)\"\r\n [ngClass]=\"{'is-invalid': pageForm.form.get(item.Description)?.errors }\" />\r\n <div class=\"datepickerstyle\">\r\n <mat-datepicker-toggle [for]=\"myDatepicker\"></mat-datepicker-toggle>\r\n <mat-datepicker #myDatepicker></mat-datepicker>\r\n </div>\r\n <app-validation-error [item]=\"item\" [pageForm]=\"pageForm\" [fieldsList]=\"fieldsList\">\r\n </app-validation-error>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n\r\n <div class=\" row\" *ngIf=\"!item.IsUiField\" >\r\n <label class=\"col col-sm-12 col-lg-4 col-md-3 padding-0\">\r\n <!-- {{item.Label }} -->\r\n {{ globalService.CurrentLanguage=='Ar'?(item.LabelAr ?item.LabelAr : (item.Label | translate)) :item.Label}}\r\n </label>\r\n <span class=\"col col-sm-12 col-lg-8 control-input col-md-9 padding-0\">: &nbsp; &nbsp;\r\n\r\n <ng-container *ngIf=\"item && item.Description\" [ngSwitch]=\"item.DataType\">\r\n <span *ngSwitchCase=\"_dataType.date\" class=\"tooltiptexts\">\r\n {{PageGroupValues[item.Description] | date :'dd/MM/yyyy'}}\r\n </span>\r\n\r\n <span *ngSwitchCase=\"_dataType.dateTime\" class=\"tooltiptexts\">\r\n {{PageGroupValues[item.Description] | date :'dd/MM/yyyy h:mm a'}}\r\n </span>\r\n\r\n <span *ngSwitchCase=\"_dataType.bool\">\r\n {{(PageGroupValues[item.Description] ==true ? 'Yes' : 'No') | translate }}\r\n </span>\r\n\r\n <span *ngSwitchCase=\"_dataType.dropdown\">\r\n {{ globalService.CurrentLanguage=='Ar'?(PageGroupValues[item.Description+\"_DescAr\"] ? PageGroupValues[item.Description+\"_DescAr\"] : PageGroupValues[item.Description])\r\n :(PageGroupValues[item.Description+\"_Desc\"] ? PageGroupValues[item.Description+\"_Desc\"] : PageGroupValues[item.Description]) }}\r\n </span>\r\n <span *ngSwitchCase=\"_dataType.LookUp\">\r\n <ng-container *ngIf=\"item.LookupData; else elseLookupTemplate\">\r\n {{PageGroupValues[getFiledKey(item.Description,item.LookupData)] }}\r\n </ng-container>\r\n <ng-template #elseLookupTemplate>\r\n {{ globalService.CurrentLanguage=='Ar'?(PageGroupValues[item.Description+\"_DescAr\"] ? PageGroupValues[item.Description+\"_DescAr\"] : PageGroupValues[item.Description])\r\n :(PageGroupValues[item.Description+\"_Desc\"] ? PageGroupValues[item.Description+\"_Desc\"] : PageGroupValues[item.Description]) }}\r\n </ng-template>\r\n </span>\r\n\r\n\r\n <div *ngSwitchCase=\"_dataType.HtmlEditor\" [innerHTML]=\"PageGroupValues[item.Description]\">\r\n </div>\r\n\r\n\r\n <span *ngSwitchDefault>\r\n {{ globalService.CurrentLanguage=='Ar'?(PageGroupValues[item.Description+\"_DescAr\"] ? PageGroupValues[item.Description+\"_DescAr\"] : PageGroupValues[item.Description])\r\n :(PageGroupValues[item.Description+\"_Desc\"] ? PageGroupValues[item.Description+\"_Desc\"] : PageGroupValues[item.Description]) }}\r\n \r\n </span>\r\n </ng-container>\r\n </span>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"Type !='Details' && ActionType != '1' && ActionType != '2'\">\r\n <div class=\"settings position-absolute\">\r\n <i (click)=\"_deleteField(fieldIndex)\" class=\"la la-trash-o\"></i>\r\n <i (click)=\"_downField(fieldIndex)\" class=\"la la-arrow-down\"></i>\r\n <i (click)=\"_upField(fieldIndex)\" class=\"la la-arrow-up\"></i>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n</ng-container>\r\n",
9222
8819
  styles: [".field .settings{display:none;top:0;right:0;z-index:1;margin:auto 10px;cursor:pointer;padding:5px;-webkit-animation-name:fadeIn;animation-name:fadeIn;-webkit-animation-timing-function:ease;animation-timing-function:ease;-webkit-animation-duration:.3s;animation-duration:.3s}.field:hover .settings{display:block}.field .settings>i{padding:6px}.field .settings>i:hover{background:hsla(0,0%,50.2%,.198)}.field.dynamic-view .settings,.field.dynamic-view:hover .settings{display:none}.field .form-group .row>.col:first-child,.field .row>.col:first-child{max-width:180px}.req_page.lang_Arabic .field .row>.col:first-child{text-align:right!important}.field .form-group .row>.col{padding:0}.field .form-group .row>.col .control-label{font-size:13px}.field .form-group .row>.col.control-input .form-control{height:30px;padding:4px;font-size:13px}.control-table{background:#fff;border:2px solid #ddd;padding:5px;position:absolute;border-radius:5px;box-shadow:3px 6px 10px 7px rgba(0,0,0,.1);min-width:350px;box-shadow:1px;z-index:1}.control-table .control-table-search input{width:100%;border:1px solid #ddd;height:25px;padding:5px}.canned-response{position:absolute;right:10px;bottom:0;display:none}.canned-response .badge{border-radius:100px;height:41px;box-shadow:0 0 13px -5px rgba(0,0,0,.68)}.canned-response .badge:focus{outline:none}.hide{display:none!important}.datepickerstyle{float:left;right:-1px;position:absolute;top:-5px;box-shadow:none}.field_muted{background-color:#f5f5f5}.form-group .control-input input[type=checkbox]{height:15px!important;width:15px!important}"]
9223
8820
  },] }
9224
8821
  ];
@@ -9464,502 +9061,931 @@ class DynamicDetailsViewComponent {
9464
9061
  });
9465
9062
  }
9466
9063
  }
9467
- }
9468
- validationError(name, errorName) {
9469
- if (name && errorName)
9470
- return this.dynamicFormGroup.get(name).errors[errorName] ? true : false;
9471
- else
9472
- return this.dynamicFormGroup.get(name).errors ? true : false;
9473
- }
9474
- getType(_dataType) {
9475
- switch (_dataType) {
9476
- case E_DataType.int:
9477
- case E_DataType.decimal:
9478
- return 'number';
9479
- case E_DataType.date:
9480
- return 'date';
9481
- case E_DataType.dateTime:
9482
- return 'datetime-local';
9483
- case E_DataType.timespan:
9484
- return 'time';
9485
- case E_DataType.bool:
9486
- return 'checkbox';
9487
- case E_DataType.string:
9488
- return 'text';
9489
- case E_DataType.image:
9490
- return 'file';
9491
- default:
9492
- return 'text';
9064
+ }
9065
+ validationError(name, errorName) {
9066
+ if (name && errorName)
9067
+ return this.dynamicFormGroup.get(name).errors[errorName] ? true : false;
9068
+ else
9069
+ return this.dynamicFormGroup.get(name).errors ? true : false;
9070
+ }
9071
+ getType(_dataType) {
9072
+ switch (_dataType) {
9073
+ case E_DataType.int:
9074
+ case E_DataType.decimal:
9075
+ return 'number';
9076
+ case E_DataType.date:
9077
+ return 'date';
9078
+ case E_DataType.dateTime:
9079
+ return 'datetime-local';
9080
+ case E_DataType.timespan:
9081
+ return 'time';
9082
+ case E_DataType.bool:
9083
+ return 'checkbox';
9084
+ case E_DataType.string:
9085
+ return 'text';
9086
+ case E_DataType.image:
9087
+ return 'file';
9088
+ default:
9089
+ return 'text';
9090
+ }
9091
+ }
9092
+ changeTextEvent(event) {
9093
+ }
9094
+ changeFile(event, item) {
9095
+ this.selectedFileItem = item;
9096
+ this.SelectedFiles = event.target.files;
9097
+ }
9098
+ addNestedGroup(rowIndex, groupIndex) {
9099
+ this.selectRowIndex = rowIndex;
9100
+ this.selectGroupIndex = groupIndex;
9101
+ }
9102
+ groupSetting(rowIndex, groupIndex) {
9103
+ this.selectRowIndex = rowIndex;
9104
+ this.selectGroupIndex = groupIndex;
9105
+ }
9106
+ deleteGroup(rowIndex, groupIndex) {
9107
+ this.selectRowIndex = rowIndex;
9108
+ this.selectGroupIndex = groupIndex;
9109
+ this.pageGroups[this.selectRowIndex].Groups.splice(this.selectGroupIndex, 1);
9110
+ if (this.pageGroups[this.selectRowIndex].Groups.length == 0)
9111
+ this.pageGroups.splice(this.selectRowIndex, 1);
9112
+ }
9113
+ openDataField(rowIndex, groupIndex) {
9114
+ this.selectRowIndex = rowIndex;
9115
+ this.selectGroupIndex = groupIndex;
9116
+ this.showDataFiledPopup = true;
9117
+ // this.dataFieldPopup = true;
9118
+ }
9119
+ closeDataField() {
9120
+ this.showDataFiledPopup = false;
9121
+ // this.dataFieldPopup = false;
9122
+ }
9123
+ submitDataFields(Fields) {
9124
+ // if (Fields && Fields.length > 0)
9125
+ for (let index = 0; index < Fields.length; index++) {
9126
+ this.pageGroups[this.selectRowIndex].Groups[this.selectGroupIndex].Fields.push(Fields[index]);
9127
+ }
9128
+ this.buildReactiveForm();
9129
+ this.showDataFiledPopup = false;
9130
+ }
9131
+ /* #endregion */
9132
+ /* #region Field Actions */
9133
+ deleteField(fieldIndex, groupIndex, rowIndex) {
9134
+ this.pageGroups[rowIndex].Groups[groupIndex].Fields.splice(fieldIndex, 1);
9135
+ this.buildReactiveForm();
9136
+ }
9137
+ downField(fieldIndex, groupIndex, rowIndex) {
9138
+ if (fieldIndex !=
9139
+ this.pageGroups[rowIndex].Groups[groupIndex].Fields.length - 1)
9140
+ moveItem(this.pageGroups[rowIndex].Groups[groupIndex].Fields, fieldIndex, fieldIndex + 1);
9141
+ this.buildReactiveForm();
9142
+ }
9143
+ upField(fieldIndex, groupIndex, rowIndex) {
9144
+ if (fieldIndex != 0)
9145
+ moveItem(this.pageGroups[rowIndex].Groups[groupIndex].Fields, fieldIndex, fieldIndex - 1);
9146
+ this.buildReactiveForm();
9147
+ }
9148
+ openDynamicViewPopup() {
9149
+ this.showDynamicViewPopup = true;
9150
+ }
9151
+ closeDynamicViewPopup() {
9152
+ this.showDynamicViewPopup = false;
9153
+ }
9154
+ /* #endregion */
9155
+ getAllFields() {
9156
+ let fields = [];
9157
+ for (let index = 0; index < this.pageGroups.length; index++) {
9158
+ let Groups = this.pageGroups[index].Groups;
9159
+ for (let i = 0; i < Groups.length; i++) {
9160
+ fields.push(...Groups[i].Fields);
9161
+ }
9162
+ }
9163
+ return fields;
9164
+ }
9165
+ buildReactiveForm() {
9166
+ let fields = this.getAllFields();
9167
+ this._PageForm = new PageForm(this.createFormGroup(fields));
9168
+ this.BindDesignFormData();
9169
+ }
9170
+ createFormGroup(fields) {
9171
+ let form = this.fb.group({});
9172
+ if (Array.isArray(fields) && fields.length > 0) {
9173
+ for (const field of fields) {
9174
+ const value = null;
9175
+ if (field.IsMandatory)
9176
+ form.addControl(field.Description, this.fb.control(value, Validators.required));
9177
+ else
9178
+ form.addControl(field.Description, this.fb.control(value));
9179
+ }
9180
+ }
9181
+ return form;
9182
+ }
9183
+ getAllDefaultEntityTypeForm(EntityTypeId) {
9184
+ this.entityTypeSetup.getActiveEntityForm(EntityTypeId).subscribe((res) => {
9185
+ if (res && res.FormData) {
9186
+ let _FormData = JSON.parse(res.FormData);
9187
+ if (_FormData.PageGroup) {
9188
+ if (Array.isArray(_FormData.PageGroup)) {
9189
+ this.defaultPageGroups = _FormData.PageGroup;
9190
+ }
9191
+ }
9192
+ this.buildReactiveForm();
9193
+ }
9194
+ }, (error) => {
9195
+ console.log(error);
9196
+ });
9197
+ }
9198
+ getFieldFormValue(field) {
9199
+ return this._PageForm.form.get(field);
9200
+ }
9201
+ saveDesignFormData() {
9202
+ let formvalue = this._PageForm.form.value;
9203
+ alert('values----/n' + JSON.stringify(formvalue));
9204
+ }
9205
+ BindDesignFormData() {
9206
+ let _data = {
9207
+ textbox: 'ASASAS',
9208
+ textboxNumber: '1234',
9209
+ DateField: '06/13/2021',
9210
+ DateTime: '06/13/2025',
9211
+ textArea: 'xzxx cscc',
9212
+ Bolean: true,
9213
+ };
9214
+ this._PageForm.form.patchValue(this.PageGroupValues);
9215
+ }
9216
+ }
9217
+ DynamicDetailsViewComponent.decorators = [
9218
+ { type: Component, args: [{
9219
+ selector: 'app-dynamic-details-view',
9220
+ template: "\r\n<ng-container *ngIf=\"ViewType=='Details'; else elseTemplate\">\r\n\r\n <div class=\"row\" *ngFor=\"let row of pageGroups; let rowIndex = index\">\r\n\r\n <div class=\"col clearfix\" [style.flex-basis]=\"group.Width + '%'\"\r\n *ngFor=\"let group of row.Groups; let groupIndex = index\">\r\n\r\n <ng-container *ngIf=\"group.Fields && group.Fields.length > 0\">\r\n <app-entity-dynamic-field [fieldsList]=\"group.Fields\" [Type]=\"'Details'\" [PageGroupValues]=\"PageGroupValues\">\r\n </app-entity-dynamic-field>\r\n\r\n </ng-container>\r\n\r\n </div>\r\n\r\n </div>\r\n \r\n <ng-container *ngIf=\"defaultPageGroups && defaultPageGroups.length > 0\">\r\n <br>\r\n <hr>\r\n <h2 class=\"stage-title\">{{'Identification Details'|translate}}</h2>\r\n <br>\r\n \r\n <div class=\"row\" *ngFor=\"let row of defaultPageGroups; let rowIndex = index\">\r\n \r\n <div class=\"col clearfix \" [style.flex-basis]=\"group.Width + '%'\"\r\n *ngFor=\"let group of row.Groups; let groupIndex = index\">\r\n \r\n <ng-container *ngIf=\"group.Fields && group.Fields.length > 0\">\r\n <app-entity-dynamic-field [fieldsList]=\"group.Fields\" [Type]=\"'Details'\" [PageGroupValues]=\"PageGroupValues\">\r\n </app-entity-dynamic-field>\r\n \r\n </ng-container>\r\n \r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #elseTemplate>\r\n\r\n\r\n\r\n <div class=\"row dynamic-form-detail\">\r\n <div class=\"col col-lg-12\">\r\n <div class=\"card\">\r\n <div class=\"header clearfix\">\r\n <h2 class=\"float-left\">{{EntityTypeDetail?.Description}} {{'Design Form'|translate}}</h2>\r\n\r\n <a href=\"javascript:void(0)\" class=\"pull-right themecolor action-btn m-l-5\" (click)=\"getEntityForm()\">\r\n <i class=\"la la-refresh\"></i>\r\n </a>\r\n\r\n\r\n </div>\r\n <div class=\"page-details design-group-body\">\r\n\r\n <form [formGroup]=\"_PageForm.form\">\r\n <section class=\"details-wrapper engine-dev col-sm-12\" style=\"background: #eee;padding-top: 15px;\">\r\n <div class=\"row detail-row\" *ngFor=\"let row of pageGroups; let rowIndex = index\"\r\n style=\"background: #eee;\">\r\n\r\n <div class=\"detail-group col clearfix padding-0 {{group.Class}}\"\r\n [ngClass]=\"{'vertical-group': group.Direction == 1,'horizontal-group': group.Direction == 2}\"\r\n [style.flex-basis]=\"group.Width + '%'\" *ngFor=\"let group of row.Groups; let groupIndex = index\">\r\n\r\n <div class=\"card\">\r\n\r\n <ng-container *ngIf=\"group.Fields && group.Fields.length > 0\">\r\n <div class=\"body\">\r\n <!-- *ngIf=\"group.Fields && group.Fields.length > 0\" -->\r\n <app-entity-dynamic-field [fieldsList]=\"group.Fields\" [pageForm]=\"_PageForm\"\r\n [dynamicFormGroup]=\"_PageForm.form\" [submitted]=\"submitted\" [rowIndex]=\"rowIndex\"\r\n [groupIndex]=\"groupIndex\" [Type]=\"'Details'\" [PageGroupValues]=\"PageGroupValues\"\r\n (deleteField)=\"deleteField($event.fieldIndex,$event.groupIndex,$event.rowIndex)\"\r\n (upField)=\"upField($event.fieldIndex,$event.groupIndex,$event.rowIndex)\"\r\n (downField)=\"downField($event.fieldIndex,$event.groupIndex,$event.rowIndex)\">\r\n\r\n </app-entity-dynamic-field>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n </section>\r\n </form>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n</ng-template>\r\n\r\n\r\n",
9221
+ styles: [".field .row>.col:first-child{max-width:210px}"]
9222
+ },] }
9223
+ ];
9224
+ DynamicDetailsViewComponent.ctorParameters = () => [
9225
+ { type: EntityTypeSetupService },
9226
+ { type: Router },
9227
+ { type: FormBuilder },
9228
+ { type: ActivatedRoute }
9229
+ ];
9230
+ DynamicDetailsViewComponent.propDecorators = {
9231
+ ViewType: [{ type: Input }],
9232
+ EntityTypeId: [{ type: Input }],
9233
+ EntityFormId: [{ type: Input }],
9234
+ pageGroups: [{ type: Input }],
9235
+ defaultPageGroups: [{ type: Input }],
9236
+ PageGroupValues: [{ type: Input }]
9237
+ };
9238
+ function moveItem(data, from, to) {
9239
+ let f = data.splice(from, 1)[0];
9240
+ data.splice(to, 0, f);
9241
+ return data;
9242
+ }
9243
+
9244
+ class ActivitiesCreateComponent {
9245
+ constructor(entityTypeSetup, router, route, globalService) {
9246
+ this.entityTypeSetup = entityTypeSetup;
9247
+ this.router = router;
9248
+ this.route = route;
9249
+ this.globalService = globalService;
9250
+ this.translatePipe = new TranslatePipe(this.globalService);
9251
+ this.EntityFormId = null;
9252
+ this.EntityTypeId = null;
9253
+ this.ActivityTypeId = null;
9254
+ this.RefEntityTypeId = null;
9255
+ this.RefTypeId = null;
9256
+ this.ViewFrom = "Page";
9257
+ this.ViewAction = "Activity";
9258
+ this.closeActivityCreate = new EventEmitter();
9259
+ this.createFormData = {};
9260
+ this.pageForm = {};
9261
+ }
9262
+ ngOnInit() {
9263
+ this.route.paramMap.subscribe((res) => {
9264
+ if (this.ViewFrom != "Popup") {
9265
+ this.EntityTypeId = Number(res.get('EntityTypeId'));
9266
+ this.ActivityTypeId = Number(res.get('ActivityTypeId'));
9267
+ this.RefTypeId = Number(res.get('RefTypeId'));
9268
+ }
9269
+ // this.EntityTypeId = Number(res.get('EntityTypeId'));
9270
+ });
9271
+ this.getActiveEntityForm();
9272
+ debugger;
9273
+ this.globalService.submitComments.subscribe(x => {
9274
+ debugger;
9275
+ if (x.message) {
9276
+ this.createFormData.Comments = x.message;
9277
+ this.submitTicketCreate(true);
9278
+ }
9279
+ });
9280
+ }
9281
+ getActiveEntityForm() {
9282
+ this.entityTypeSetup.getActiveEntityForm(this.EntityTypeId).subscribe((res) => {
9283
+ this.EntityFormId = res.RecId;
9284
+ }, (error) => {
9285
+ console.log(error);
9286
+ });
9287
+ }
9288
+ closeCreatePage() {
9289
+ this.closeActivityCreate.emit({ Type: "Cancel" });
9290
+ }
9291
+ submitTicketCreate(isDisableFormValidation) {
9292
+ debugger;
9293
+ let CreateData = this.createFormData;
9294
+ if (isDisableFormValidation) {
9295
+ if (!this.createFormData.Comments) {
9296
+ Swal.fire({
9297
+ title: this.translatePipe.transform('Fill all mandatory fields'),
9298
+ });
9299
+ // Swal.fire('Fill all mandatory fields', '', 'warning');
9300
+ return;
9301
+ }
9302
+ }
9303
+ else {
9304
+ if (!this.pageForm.valid) {
9305
+ Swal.fire({
9306
+ title: this.translatePipe.transform('Fill all mandatory fields'),
9307
+ });
9308
+ return;
9309
+ }
9310
+ }
9311
+ CreateData.EntityTypeId = this.RefEntityTypeId;
9312
+ if (this.ViewAction == 'Task') {
9313
+ CreateData.EntityTypeId = this.ActivityTypeId;
9314
+ CreateData.RefTicketId = this.RefTypeId;
9493
9315
  }
9316
+ else {
9317
+ CreateData.ActivityTypeId = this.ActivityTypeId;
9318
+ CreateData.RefTypeId = this.RefTypeId;
9319
+ }
9320
+ let _data = JSON.stringify(CreateData);
9321
+ this.entityTypeSetup.createDynamic(_data).subscribe((res) => {
9322
+ // alert('Success');
9323
+ this.globalService.submitComments.next({ message: '' });
9324
+ this.createFormData = {};
9325
+ // Swal.fire('Created Successfully', 'Success');
9326
+ Swal.fire({
9327
+ title: this.translatePipe.transform('Created Successfully'),
9328
+ });
9329
+ this.pageForm.reset();
9330
+ this.closeActivityCreate.emit({ Type: "Create" });
9331
+ }, (error) => {
9332
+ console.log(error);
9333
+ });
9494
9334
  }
9495
- changeTextEvent(event) {
9496
- }
9497
- changeFile(event, item) {
9498
- this.selectedFileItem = item;
9499
- this.SelectedFiles = event.target.files;
9500
- }
9501
- addNestedGroup(rowIndex, groupIndex) {
9502
- this.selectRowIndex = rowIndex;
9503
- this.selectGroupIndex = groupIndex;
9504
- }
9505
- groupSetting(rowIndex, groupIndex) {
9506
- this.selectRowIndex = rowIndex;
9507
- this.selectGroupIndex = groupIndex;
9508
- }
9509
- deleteGroup(rowIndex, groupIndex) {
9510
- this.selectRowIndex = rowIndex;
9511
- this.selectGroupIndex = groupIndex;
9512
- this.pageGroups[this.selectRowIndex].Groups.splice(this.selectGroupIndex, 1);
9513
- if (this.pageGroups[this.selectRowIndex].Groups.length == 0)
9514
- this.pageGroups.splice(this.selectRowIndex, 1);
9515
- }
9516
- openDataField(rowIndex, groupIndex) {
9517
- this.selectRowIndex = rowIndex;
9518
- this.selectGroupIndex = groupIndex;
9519
- this.showDataFiledPopup = true;
9520
- // this.dataFieldPopup = true;
9521
- }
9522
- closeDataField() {
9523
- this.showDataFiledPopup = false;
9524
- // this.dataFieldPopup = false;
9335
+ emitTicketCreateForm(CreateData, pageForm) {
9336
+ this.createFormData = CreateData;
9337
+ this.pageForm = pageForm;
9525
9338
  }
9526
- submitDataFields(Fields) {
9527
- // if (Fields && Fields.length > 0)
9528
- for (let index = 0; index < Fields.length; index++) {
9529
- this.pageGroups[this.selectRowIndex].Groups[this.selectGroupIndex].Fields.push(Fields[index]);
9530
- }
9531
- this.buildReactiveForm();
9532
- this.showDataFiledPopup = false;
9339
+ }
9340
+ ActivitiesCreateComponent.decorators = [
9341
+ { type: Component, args: [{
9342
+ selector: 'app-activities-create',
9343
+ template: "\r\n\r\n\r\n\r\n\r\n\r\n<div class=\"row \">\r\n\r\n <div class=\"col col-sm-12\">\r\n \r\n <div class=\"row\">\r\n <div class=\"col-sm-12 dynamic_request_details\">\r\n <div class=\"card\" style=\"padding: 0;\">\r\n \r\n <!-- <div class=\"header\" style=\"border-bottom: 1px solid #ddd;\">\r\n <h2>Activity Create\r\n </h2>\r\n \r\n </div> -->\r\n\r\n <div class=\"body\" style=\"padding: 0;\">\r\n <div class=\"request-create p-4\">\r\n \r\n\r\n <ng-container *ngIf=\"EntityFormId \">\r\n <app-entity-dynamic-view [EntityFormId]=\"EntityFormId\" [ViewFrom]=\"'Details'\" [Type]=\"'Create'\"\r\n (submitFormValue)=\"emitTicketCreateForm($event.formdata,$event.pageForm)\"></app-entity-dynamic-view>\r\n </ng-container>\r\n\r\n <hr>\r\n\r\n <div class=\"text-center pull-right\">\r\n\r\n <button class=\"btn btn-small m-l-5 m-r-5 formcancelbtn\" (click)=\"closeCreatePage()\">\r\n {{'Cancel'|translate}}\r\n </button>\r\n\r\n <button class=\"btn btn-small btn-theme m-l-5 m-r-5 formsubmitbtn\" (click)=\"submitTicketCreate()\">\r\n {{'Submit'|translate}}\r\n </button>\r\n\r\n \r\n\r\n\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n </div>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n <div class=\"col col-sm-3\">\r\n <div class=\"request-right-side p-t-10\">\r\n \r\n </div>\r\n </div>\r\n \r\n \r\n \r\n </div>\r\n\r\n",
9344
+ styles: [".formcancelbtn{border-radius:20px;border:1px solid #c4cbcb}.formcancelbtn,.formsubmitbtn{padding-left:15px;padding-right:15px;min-width:50px}.formsubmitbtn{border-radius:20px}"]
9345
+ },] }
9346
+ ];
9347
+ ActivitiesCreateComponent.ctorParameters = () => [
9348
+ { type: EntityTypeSetupService },
9349
+ { type: Router },
9350
+ { type: ActivatedRoute },
9351
+ { type: GlobalService }
9352
+ ];
9353
+ ActivitiesCreateComponent.propDecorators = {
9354
+ EntityFormId: [{ type: Input }],
9355
+ EntityTypeId: [{ type: Input }],
9356
+ ActivityTypeId: [{ type: Input }],
9357
+ RefEntityTypeId: [{ type: Input }],
9358
+ RefTypeId: [{ type: Input }],
9359
+ ViewFrom: [{ type: Input }],
9360
+ ViewAction: [{ type: Input }],
9361
+ closeActivityCreate: [{ type: Output }]
9362
+ };
9363
+
9364
+ class ActivitiesViewComponent {
9365
+ constructor(entityTypeSetup) {
9366
+ this.entityTypeSetup = entityTypeSetup;
9367
+ this.EntityFormId = null;
9368
+ this.EntityTypeId = null;
9369
+ this.ActivityTypeId = null;
9370
+ this.RefTypeId = null;
9371
+ this.FormData = null;
9372
+ this.createFormData = {};
9373
+ this.pageForm = {};
9533
9374
  }
9534
- /* #endregion */
9535
- /* #region Field Actions */
9536
- deleteField(fieldIndex, groupIndex, rowIndex) {
9537
- this.pageGroups[rowIndex].Groups[groupIndex].Fields.splice(fieldIndex, 1);
9538
- this.buildReactiveForm();
9375
+ ngOnInit() {
9376
+ this.getActiveEntityForm();
9539
9377
  }
9540
- downField(fieldIndex, groupIndex, rowIndex) {
9541
- if (fieldIndex !=
9542
- this.pageGroups[rowIndex].Groups[groupIndex].Fields.length - 1)
9543
- moveItem(this.pageGroups[rowIndex].Groups[groupIndex].Fields, fieldIndex, fieldIndex + 1);
9544
- this.buildReactiveForm();
9378
+ getActiveEntityForm() {
9379
+ this.entityTypeSetup.getActiveEntityForm(this.EntityTypeId).subscribe((res) => {
9380
+ this.EntityFormId = res.RecId;
9381
+ }, (error) => {
9382
+ console.log(error);
9383
+ });
9545
9384
  }
9546
- upField(fieldIndex, groupIndex, rowIndex) {
9547
- if (fieldIndex != 0)
9548
- moveItem(this.pageGroups[rowIndex].Groups[groupIndex].Fields, fieldIndex, fieldIndex - 1);
9549
- this.buildReactiveForm();
9385
+ emitTicketCreateForm(CreateData, pageForm) {
9386
+ this.createFormData = CreateData;
9387
+ this.pageForm = pageForm;
9550
9388
  }
9551
- openDynamicViewPopup() {
9552
- this.showDynamicViewPopup = true;
9389
+ }
9390
+ ActivitiesViewComponent.decorators = [
9391
+ { type: Component, args: [{
9392
+ selector: 'app-activities-view',
9393
+ template: "<div class=\"row \">\r\n <div class=\"col col-sm-12\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 dynamic_request_details activity-details-view\">\r\n <div class=\"card\">\r\n <div class=\"body\" style=\"padding: 0;\">\r\n <div class=\"request-create \">\r\n <ng-container *ngIf=\"EntityFormId \">\r\n <app-dynamic-details-view [EntityFormId]=\"EntityFormId\" [EntityTypeId]=\"EntityTypeId\"\r\n [PageGroupValues]=\"FormData\" [ViewType]=\"'Details'\">\r\n </app-dynamic-details-view>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>",
9394
+ styles: [".card{margin-bottom:0}"]
9395
+ },] }
9396
+ ];
9397
+ ActivitiesViewComponent.ctorParameters = () => [
9398
+ { type: EntityTypeSetupService }
9399
+ ];
9400
+ ActivitiesViewComponent.propDecorators = {
9401
+ EntityFormId: [{ type: Input }],
9402
+ EntityTypeId: [{ type: Input }],
9403
+ ActivityTypeId: [{ type: Input }],
9404
+ RefTypeId: [{ type: Input }],
9405
+ FormData: [{ type: Input }]
9406
+ };
9407
+
9408
+ class ValidationErrorComponent {
9409
+ constructor(GlobelService) {
9410
+ this.GlobelService = GlobelService;
9553
9411
  }
9554
- closeDynamicViewPopup() {
9555
- this.showDynamicViewPopup = false;
9412
+ ngOnInit() {
9556
9413
  }
9557
- /* #endregion */
9558
- getAllFields() {
9559
- let fields = [];
9560
- for (let index = 0; index < this.pageGroups.length; index++) {
9561
- let Groups = this.pageGroups[index].Groups;
9562
- for (let i = 0; i < Groups.length; i++) {
9563
- fields.push(...Groups[i].Fields);
9564
- }
9565
- }
9566
- return fields;
9414
+ }
9415
+ ValidationErrorComponent.decorators = [
9416
+ { type: Component, args: [{
9417
+ selector: 'app-validation-error',
9418
+ template: `
9419
+ <ng-container [formGroup]="pageForm.form">
9420
+ <ng-container *ngIf="pageForm.form.get(item.Description)?.errors"
9421
+ class="invalid-feedback">
9422
+
9423
+
9424
+ <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['required']">
9425
+ <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9426
+ <span *ngIf="_Vmsg.Type=='Required'" style="color: #bd4147">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9427
+ </ng-container>
9428
+ </ng-container>
9429
+
9430
+ <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['min']">
9431
+ <span class="red">{{GlobelService.CurrentLanguage =='Ar'? (item.LabelAr ?item.LabelAr + ( 'must be greater then'|translate)+ pageForm.form.get(item.Description).errors.min.min : (item.Label + 'must be greater then')|translate)+ pageForm.form.get(item.Description).errors.min.min :item.Label + ( 'must be greater then'|translate)+ pageForm.form.get(item.Description).errors.min.min }}</span>
9432
+ <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9433
+ <span *ngIf="_Vmsg.Type=='MinMax'" style="color: #bd4147">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9434
+ </ng-container>
9435
+ </ng-container>
9436
+
9437
+ <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['max']">
9438
+ <span class="red">{{GlobelService.CurrentLanguage =='Ar'? (item.LabelAr ?item.LabelAr + ( 'must be less then'|translate)+ pageForm.form.get(item.Description).errors.max.max : (item.Label + 'must be less then')|translate)+ pageForm.form.get(item.Description).errors.max.max :item.Label + ( 'must be less then'|translate)+ pageForm.form.get(item.Description).errors.max.max }}</span>
9439
+ <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9440
+ <span *ngIf="_Vmsg.Type=='MinMax'" style="color: #bd4147;">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9441
+ </ng-container>
9442
+ </ng-container>
9443
+
9444
+ <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['minlength']">
9445
+ <span class="red">{{GlobelService.CurrentLanguage =='Ar'? (item.LabelAr ?item.LabelAr + ( 'must be at least'|translate)+ pageForm.form.get(item.Description).errors.minlength.requiredLength +( 'characters'|translate) : (item.Label + 'must be at least')|translate)+ pageForm.form.get(item.Description).errors.minlength.requiredLength +( 'characters'|translate) :item.Label + ( 'must be at least'|translate)+ pageForm.form.get(item.Description).errors.minlength.requiredLength +( 'characters'|translate) }}
9446
+ </span>
9447
+
9448
+ <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9449
+ <span *ngIf="_Vmsg.Type=='MinLength'" style="color: #bd4147">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9450
+ </ng-container>
9451
+ </ng-container>
9452
+
9453
+ <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['maxlength']">
9454
+ <span class="red">{{GlobelService.CurrentLanguage =='Ar'? (item.LabelAr ?item.LabelAr + ( 'more then'|translate)+pageForm.form.get(item.Description).errors.maxlength.requiredLength +( 'characters'|translate) : (item.Label | translate)+ ( 'more then'|translate)+pageForm.form.get(item.Description).errors.maxlength.requiredLength +( 'characters'|translate)) :item.Label + ( 'more then'|translate)+pageForm.form.get(item.Description).errors.maxlength.requiredLength +( 'characters'|translate) }}</span>
9455
+
9456
+ <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9457
+ <span *ngIf="_Vmsg.Type=='MaxLength'" style="color: #bd4147">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9458
+ </ng-container>
9459
+ </ng-container>
9460
+
9461
+ <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['pattern']">
9462
+ <span class="red">{{GlobelService.CurrentLanguage =='Ar'? (item.LabelAr ?item.LabelAr +( 'pattern not valid'|translate) : ((item.Label + 'pattern not valid')|translate)) :item.Label +( 'pattern not valid'|translate) }}</span>
9463
+ <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9464
+ <span *ngIf="_Vmsg.Type=='Pattern'" style="color: #bd4147">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9465
+ </ng-container>
9466
+ </ng-container>
9467
+
9468
+
9469
+
9470
+
9471
+
9472
+ </ng-container>
9473
+ </ng-container>
9474
+ `,
9475
+ styles: [`
9476
+ span {
9477
+ display:block;
9567
9478
  }
9568
- buildReactiveForm() {
9569
- let fields = this.getAllFields();
9570
- this._PageForm = new PageForm(this.createFormGroup(fields));
9571
- this.BindDesignFormData();
9479
+ `]
9480
+ },] }
9481
+ ];
9482
+ ValidationErrorComponent.ctorParameters = () => [
9483
+ { type: GlobalService }
9484
+ ];
9485
+ ValidationErrorComponent.propDecorators = {
9486
+ item: [{ type: Input }],
9487
+ pageForm: [{ type: Input }],
9488
+ fieldsList: [{ type: Input }]
9489
+ };
9490
+
9491
+ class SelfServiceFlowComponent {
9492
+ constructor(supportService, fb, entityTypeSetup, globalService, document) {
9493
+ this.supportService = supportService;
9494
+ this.fb = fb;
9495
+ this.entityTypeSetup = entityTypeSetup;
9496
+ this.globalService = globalService;
9497
+ this.document = document;
9498
+ this.IssueType = 11;
9499
+ this.Channel = '3';
9500
+ this.ChannelEn = 'Portal';
9501
+ this.ChannelAr = 'صفحة العميل';
9502
+ this.IssueAllList = [];
9503
+ this.IssueCaseList = [];
9504
+ this.translatePipe = new TranslatePipe(this.globalService);
9572
9505
  }
9573
- createFormGroup(fields) {
9574
- let form = this.fb.group({});
9575
- if (Array.isArray(fields) && fields.length > 0) {
9576
- for (const field of fields) {
9577
- const value = null;
9578
- if (field.IsMandatory)
9579
- form.addControl(field.Description, this.fb.control(value, Validators.required));
9580
- else
9581
- form.addControl(field.Description, this.fb.control(value));
9582
- }
9583
- }
9584
- return form;
9506
+ ngOnInit() {
9507
+ this.getIssueGroupRequesterMappingByRequesterType();
9585
9508
  }
9586
- getAllDefaultEntityTypeForm(EntityTypeId) {
9587
- this.entityTypeSetup.getActiveEntityForm(EntityTypeId).subscribe((res) => {
9588
- if (res && res.FormData) {
9589
- let _FormData = JSON.parse(res.FormData);
9590
- if (_FormData.PageGroup) {
9591
- if (Array.isArray(_FormData.PageGroup)) {
9592
- this.defaultPageGroups = _FormData.PageGroup;
9593
- }
9509
+ getIssueGroupRequesterMappingByRequesterType() {
9510
+ this.IssueAllList = [];
9511
+ this.supportService.getIssueGroupRequesterMappingByRequesterType(this.RequesterTypeId).subscribe((res) => {
9512
+ this.IssueAllList = res.filter(x => x.IssueType == this.IssueType);
9513
+ this.IssueCaseList = [];
9514
+ this.IssueAllList.forEach(x => {
9515
+ x.IssueGroup.forEach(group => {
9516
+ this.IssueCaseList.push(...group.Issue);
9517
+ });
9518
+ });
9519
+ this.IssueCaseList.map(x => {
9520
+ if (x.IssueImage && !x.IssueImage.includes("Account/ShowImageByPath")) {
9521
+ x.IssueImage = "/Account/ShowImageByPath?_Path=" + x.IssueImage;
9594
9522
  }
9595
- this.buildReactiveForm();
9596
- }
9523
+ });
9597
9524
  }, (error) => {
9598
9525
  console.log(error);
9526
+ Swal.fire({
9527
+ title: this.translatePipe.transform(error.error),
9528
+ });
9599
9529
  });
9600
9530
  }
9601
- getFieldFormValue(field) {
9602
- return this._PageForm.form.get(field);
9531
+ selectCase(item) {
9532
+ this.selectedCaseItem = item;
9603
9533
  }
9604
- saveDesignFormData() {
9605
- let formvalue = this._PageForm.form.value;
9606
- alert('values----/n' + JSON.stringify(formvalue));
9534
+ backtoCard() {
9535
+ this.selectedCaseItem = null;
9607
9536
  }
9608
- BindDesignFormData() {
9609
- let _data = {
9610
- textbox: 'ASASAS',
9611
- textboxNumber: '1234',
9612
- DateField: '06/13/2021',
9613
- DateTime: '06/13/2025',
9614
- textArea: 'xzxx cscc',
9615
- Bolean: true,
9616
- };
9617
- this._PageForm.form.patchValue(this.PageGroupValues);
9537
+ imageExists(image_url) {
9538
+ var http = new XMLHttpRequest();
9539
+ http.open('HEAD', image_url, false);
9540
+ http.send();
9541
+ debugger;
9542
+ return http.status != 404;
9618
9543
  }
9619
9544
  }
9620
- DynamicDetailsViewComponent.decorators = [
9545
+ SelfServiceFlowComponent.decorators = [
9621
9546
  { type: Component, args: [{
9622
- selector: 'app-dynamic-details-view',
9623
- template: "\r\n<ng-container *ngIf=\"ViewType=='Details'; else elseTemplate\">\r\n\r\n <div class=\"row\" *ngFor=\"let row of pageGroups; let rowIndex = index\">\r\n\r\n <div class=\"col clearfix\" [style.flex-basis]=\"group.Width + '%'\"\r\n *ngFor=\"let group of row.Groups; let groupIndex = index\">\r\n\r\n <ng-container *ngIf=\"group.Fields && group.Fields.length > 0\">\r\n <app-entity-dynamic-field [fieldsList]=\"group.Fields\" [Type]=\"'Details'\" [PageGroupValues]=\"PageGroupValues\">\r\n </app-entity-dynamic-field>\r\n\r\n </ng-container>\r\n\r\n </div>\r\n\r\n </div>\r\n \r\n <ng-container *ngIf=\"defaultPageGroups && defaultPageGroups.length > 0\">\r\n <br>\r\n <hr>\r\n <h2 class=\"stage-title\">{{'Identification Details'|translate}}</h2>\r\n <br>\r\n \r\n <div class=\"row\" *ngFor=\"let row of defaultPageGroups; let rowIndex = index\">\r\n \r\n <div class=\"col clearfix \" [style.flex-basis]=\"group.Width + '%'\"\r\n *ngFor=\"let group of row.Groups; let groupIndex = index\">\r\n \r\n <ng-container *ngIf=\"group.Fields && group.Fields.length > 0\">\r\n <app-entity-dynamic-field [fieldsList]=\"group.Fields\" [Type]=\"'Details'\" [PageGroupValues]=\"PageGroupValues\">\r\n </app-entity-dynamic-field>\r\n \r\n </ng-container>\r\n \r\n </div>\r\n \r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #elseTemplate>\r\n\r\n\r\n\r\n <div class=\"row dynamic-form-detail\">\r\n <div class=\"col col-lg-12\">\r\n <div class=\"card\">\r\n <div class=\"header clearfix\">\r\n <h2 class=\"float-left\">{{EntityTypeDetail?.Description}} {{'Design Form'|translate}}</h2>\r\n\r\n <a href=\"javascript:void(0)\" class=\"pull-right themecolor action-btn m-l-5\" (click)=\"getEntityForm()\">\r\n <i class=\"la la-refresh\"></i>\r\n </a>\r\n\r\n\r\n </div>\r\n <div class=\"page-details design-group-body\">\r\n\r\n <form [formGroup]=\"_PageForm.form\">\r\n <section class=\"details-wrapper engine-dev col-sm-12\" style=\"background: #eee;padding-top: 15px;\">\r\n <div class=\"row detail-row\" *ngFor=\"let row of pageGroups; let rowIndex = index\"\r\n style=\"background: #eee;\">\r\n\r\n <div class=\"detail-group col clearfix padding-0 {{group.Class}}\"\r\n [ngClass]=\"{'vertical-group': group.Direction == 1,'horizontal-group': group.Direction == 2}\"\r\n [style.flex-basis]=\"group.Width + '%'\" *ngFor=\"let group of row.Groups; let groupIndex = index\">\r\n\r\n <div class=\"card\">\r\n\r\n <ng-container *ngIf=\"group.Fields && group.Fields.length > 0\">\r\n <div class=\"body\">\r\n <!-- *ngIf=\"group.Fields && group.Fields.length > 0\" -->\r\n <app-entity-dynamic-field [fieldsList]=\"group.Fields\" [pageForm]=\"_PageForm\"\r\n [dynamicFormGroup]=\"_PageForm.form\" [submitted]=\"submitted\" [rowIndex]=\"rowIndex\"\r\n [groupIndex]=\"groupIndex\" [Type]=\"'Details'\" [PageGroupValues]=\"PageGroupValues\"\r\n (deleteField)=\"deleteField($event.fieldIndex,$event.groupIndex,$event.rowIndex)\"\r\n (upField)=\"upField($event.fieldIndex,$event.groupIndex,$event.rowIndex)\"\r\n (downField)=\"downField($event.fieldIndex,$event.groupIndex,$event.rowIndex)\">\r\n\r\n </app-entity-dynamic-field>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n </section>\r\n </form>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n</ng-template>\r\n\r\n\r\n",
9624
- styles: [".field .row>.col:first-child{max-width:210px}"]
9547
+ selector: 'app-self-service-flow',
9548
+ template: "<div class=\"req_page whole\" [ngClass]=\"{'lang_Arabic': globalService.CurrentLanguage=='Ar'}\">\r\n\r\n <div class=\"whole m-t-10 clearfix\">\r\n <div class=\"pull-left\">\r\n <h2 class=\"heading pull-left\">{{'Customer Self Service'|translate}}\r\n </h2>\r\n\r\n </div>\r\n <div class=\"pull-right m-r-10\" *ngIf=\"selectedCaseItem && selectedCaseItem.CaseId && !supportService.IsShowBackBtn\">\r\n <button class=\"btn btn-outline btn-danger\" (click)=\"backtoCard()\">\r\n <i class=\"la la-arrow-left\"></i>\r\n {{'Back'|translate}}</button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"whole m-t-20 clearfix\">\r\n\r\n\r\n <ng-container *ngIf=\"selectedCaseItem && selectedCaseItem.CaseId;else flipcard\">\r\n\r\n <app-case-list [EntityTypeId]=\"selectedCaseItem.CaseId\" [RequesterTypeId]=\"RequesterTypeId\" [RequesterId]=\"RequesterId\"\r\n [RequesterTypeIdEn]=\"RequesterTypeIdEn\" [Source]=\"Source\" [Channel]=\"Channel\" [ChannelEn]=\"ChannelEn\"\r\n [ChannelAr]=\"ChannelAr\" [RequestField]=\"RequesterField\"></app-case-list>\r\n\r\n </ng-container>\r\n <ng-template #flipcard>\r\n\r\n <div class=\"form-card whole\">\r\n <!-- && !Notespopup -->\r\n <div class=\"form-group w-100\">\r\n \r\n <div class=\"tiles_div row\">\r\n <div class=\"col-sm-12 col-md-6 col-lg-3\" *ngFor=\"let item of IssueCaseList\">\r\n \r\n <div class=\"flip-card tiles\" (click)=\"selectCase(item)\">\r\n <div class=\"flip-card-inner\">\r\n <div class=\"flip-card-front\">\r\n <img *ngIf=\"item.IssueImage\" src=\"{{globalService.SystemConfigs.ERPUrl}}{{item.IssueImage}}\" alt=\"Case Img\">\r\n <h1>{{ globalService.CurrentLanguage=='Ar'?(item.CaseIdAr ?item.CaseIdAr : (item.CaseIdEn | translate)) :item.CaseIdEn}}</h1>\r\n </div>\r\n <div class=\"flip-card-back bg-themecolor\">\r\n <h1>\r\n {{ globalService.CurrentLanguage=='Ar'?(item.IssueAr ?item.IssueAr : (item.IssueEn | translate)) :item.IssueEn}}\r\n </h1>\r\n <p class=\"white-space-pre-line\">\r\n {{ globalService.CurrentLanguage=='Ar'?(item.IssueDescriptionAr ?item.IssueDescriptionAr : (item.IssueDescriptionEn | translate)) :item.IssueDescriptionEn}}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n </ng-template>\r\n\r\n\r\n </div>\r\n\r\n</div>",
9549
+ styles: [""]
9625
9550
  },] }
9626
9551
  ];
9627
- DynamicDetailsViewComponent.ctorParameters = () => [
9628
- { type: EntityTypeSetupService },
9629
- { type: Router },
9552
+ SelfServiceFlowComponent.ctorParameters = () => [
9553
+ { type: SupportRequestService },
9630
9554
  { type: FormBuilder },
9631
- { type: ActivatedRoute }
9555
+ { type: EntityTypeSetupService },
9556
+ { type: GlobalService },
9557
+ { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
9632
9558
  ];
9633
- DynamicDetailsViewComponent.propDecorators = {
9634
- ViewType: [{ type: Input }],
9635
- EntityTypeId: [{ type: Input }],
9636
- EntityFormId: [{ type: Input }],
9637
- pageGroups: [{ type: Input }],
9638
- defaultPageGroups: [{ type: Input }],
9639
- PageGroupValues: [{ type: Input }]
9640
- };
9641
- function moveItem(data, from, to) {
9642
- let f = data.splice(from, 1)[0];
9643
- data.splice(to, 0, f);
9644
- return data;
9645
- }
9559
+ SelfServiceFlowComponent.propDecorators = {
9560
+ RequesterTypeId: [{ type: Input }],
9561
+ RequesterTypeIdEn: [{ type: Input }],
9562
+ RequesterId: [{ type: Input }],
9563
+ RequesterField: [{ type: Input }],
9564
+ IssueType: [{ type: Input }],
9565
+ Source: [{ type: Input }],
9566
+ Channel: [{ type: Input }],
9567
+ ChannelEn: [{ type: Input }],
9568
+ ChannelAr: [{ type: Input }]
9569
+ };
9646
9570
 
9647
- class ActivitiesCreateComponent {
9648
- constructor(entityTypeSetup, router, route, globalService) {
9571
+ class CaseListComponent {
9572
+ constructor(supportService, entityTypeSetup, globalService, gridServiceService, document) {
9573
+ this.supportService = supportService;
9649
9574
  this.entityTypeSetup = entityTypeSetup;
9650
- this.router = router;
9651
- this.route = route;
9652
9575
  this.globalService = globalService;
9653
- this.translatePipe = new TranslatePipe(this.globalService);
9654
- this.EntityFormId = null;
9576
+ this.gridServiceService = gridServiceService;
9577
+ this.document = document;
9655
9578
  this.EntityTypeId = null;
9656
- this.ActivityTypeId = null;
9657
- this.RefEntityTypeId = null;
9658
- this.RefTypeId = null;
9659
- this.ViewFrom = "Page";
9660
- this.ViewAction = "Activity";
9661
- this.closeActivityCreate = new EventEmitter();
9662
- this.createFormData = {};
9663
- this.pageForm = {};
9579
+ this.IssueType = 11;
9580
+ this.Channel = '3';
9581
+ this.ChannelEn = 'Portal';
9582
+ this.ChannelAr = 'صفحة العميل';
9583
+ this.translatePipe = new TranslatePipe(this.globalService);
9584
+ this.selfServiceRequestData = [];
9585
+ this.GridSearchType = E_GridSearchType.None;
9586
+ this.IsClientPagination = false;
9587
+ this.totalCount = 0;
9588
+ this.totalRecordCount = 0;
9589
+ this.pageCount = 0;
9590
+ this.pageNo = 1;
9591
+ this.pageSize = 10;
9592
+ this.SortingField = { field: null, direction: null };
9593
+ this.Searchcriteria = {
9594
+ Pagging: {
9595
+ PageNo: this.pageNo,
9596
+ PageSize: this.pageSize,
9597
+ },
9598
+ Where: [],
9599
+ SortOrder: this.SortingField,
9600
+ };
9601
+ this.columnDefs = [
9602
+ { Field: 'CaseId', Name: 'Case Id', FieldType: E_FieldType.details },
9603
+ { Field: 'LabourId', Name: 'Labour Id' },
9604
+ { Field: 'LaborName', Name: 'Labor Name' },
9605
+ { Field: 'IqamaNumber', Name: 'Iqama Number' },
9606
+ { Field: 'PassportNumber', Name: 'Passport Number' },
9607
+ { Field: 'BorderNumber', Name: 'Border Number' },
9608
+ { Field: 'MobileNumber', Name: 'Mobile Number' },
9609
+ { Field: 'NationalityEn', Name: 'Nationality' },
9610
+ { Field: 'ProfessionEn', Name: 'Profession' },
9611
+ { Field: 'DateofRequest', Name: 'Request Date', DataType: E_DataType.date },
9612
+ { Field: 'StartDate', Name: 'Start Date', DataType: E_DataType.date },
9613
+ { Field: 'EndDate', Name: 'End Date', DataType: E_DataType.date },
9614
+ { Field: 'ProcessStageEn', Name: 'Process Stage En' },
9615
+ { Field: 'ProcessStageAr', Name: 'Process Stage Ar' },
9616
+ ];
9617
+ this.viewTypes = [
9618
+ { id: 1, name: 'Tab View', class: 'la la-table' },
9619
+ { id: 2, name: 'Details View', class: 'la la-id-card-o' },
9620
+ ];
9621
+ this.selectedIndex = 0;
9622
+ this.viewTypeData = 1;
9623
+ this.selectMode = E_SelectMode.None;
9624
+ this.EntityTypeDetail = null;
9625
+ this.ActiveEntityTypeForm = null;
9626
+ this.CreateItemId = null;
9627
+ this.detailsRecId = null;
9628
+ this.detailsEntityTypeRecId = null;
9629
+ this.displayPopupDetailView = false;
9630
+ this.CaseId = null;
9631
+ this.isDetails = false;
9632
+ this.FieldListDDL = [
9633
+ { Id: 1, Name: 'Iqama Number', Field: 'IqamaNumber', FieldAr: 'رقم الاقامة' },
9634
+ { Id: 2, Name: 'CaseId', Field: 'CaseId', FieldAr: 'CaseId' },
9635
+ { Id: 3, Name: 'LabourId', Field: 'LabourId', FieldAr: 'LabourId' },
9636
+ { Id: 4, Name: 'LaborName', Field: 'LaborName', FieldAr: 'LaborName' },
9637
+ { Id: 4, Name: 'PassportNumber', Field: 'PassportNumber', FieldAr: 'رقم الباسبور' },
9638
+ { Id: 4, Name: 'BorderNumber', Field: 'BorderNumber', FieldAr: 'رقم الحدود' },
9639
+ { Id: 4, Name: 'MobileNumber', Field: 'MobileNumber', FieldAr: 'رقم الجوال' },
9640
+ ];
9641
+ this.isShowCreateRequest = false;
9642
+ this.StatusAndStageList = [];
9643
+ this.StatusId = 1;
9644
+ this.selectedStage = 0;
9645
+ this.selectedStageobj = 0;
9646
+ this.wfActionData = [];
9647
+ this.workflowEntityFormId = null;
9648
+ this.action = null;
9649
+ this.showWorkflowPopup = false;
9650
+ this.GridCheckedData = [];
9664
9651
  }
9665
9652
  ngOnInit() {
9666
- this.route.paramMap.subscribe((res) => {
9667
- if (this.ViewFrom != "Popup") {
9668
- this.EntityTypeId = Number(res.get('EntityTypeId'));
9669
- this.ActivityTypeId = Number(res.get('ActivityTypeId'));
9670
- this.RefTypeId = Number(res.get('RefTypeId'));
9653
+ this.loadGrid([], 0);
9654
+ if (this.EntityTypeId) {
9655
+ this.getEntityTypeDetails();
9656
+ this.getWorkflowStatusWithStage();
9657
+ this.getActiveEntityForm();
9658
+ }
9659
+ this.getListDatas(this.Searchcriteria);
9660
+ }
9661
+ getListDatas(Criteria) {
9662
+ this.Searchcriteria = Criteria;
9663
+ this.entityTypeSetup.getDynamicAll(Criteria, this.EntityTypeId, this.StatusId, this.RequesterId).subscribe((res) => {
9664
+ // alert("data");
9665
+ this.selfServiceRequestData = res.Data;
9666
+ this.totalRecordCount = res.TotalCount;
9667
+ console.log('datas', res);
9668
+ if (res && res.Data) {
9669
+ res.Data = res.Data.map(x => {
9670
+ if (x.DateOfRequest) {
9671
+ x.DateofRequest = x.DateOfRequest;
9672
+ }
9673
+ return x;
9674
+ });
9671
9675
  }
9672
- // this.EntityTypeId = Number(res.get('EntityTypeId'));
9676
+ this.loadGrid(res.Data, res.TotalCount);
9677
+ this.getPageCount();
9678
+ }, (error) => {
9679
+ console.log(error);
9680
+ Swal.fire({
9681
+ title: this.translatePipe.transform(error.error),
9682
+ });
9673
9683
  });
9674
- this.getActiveEntityForm();
9675
- debugger;
9676
- this.globalService.submitComments.subscribe(x => {
9677
- debugger;
9678
- if (x.message) {
9679
- this.createFormData.Comments = x.message;
9680
- this.submitTicketCreate(true);
9684
+ }
9685
+ loadGrid(data, TotalRecord) {
9686
+ if (data) {
9687
+ if (data.length > 0)
9688
+ this.gridServiceService.onGridRefresh.next({
9689
+ isTrue: true,
9690
+ list: data,
9691
+ count: data.length,
9692
+ grid: 1,
9693
+ totalRecordCount: TotalRecord,
9694
+ });
9695
+ else
9696
+ this.gridServiceService.onGridRefresh.next({
9697
+ isTrue: true,
9698
+ grid: 1,
9699
+ list: [],
9700
+ count: 0,
9701
+ totalRecordCount: 0,
9702
+ });
9703
+ }
9704
+ else
9705
+ this.gridServiceService.onGridRefresh.next({
9706
+ isTrue: true,
9707
+ grid: 1,
9708
+ list: [],
9709
+ count: 0,
9710
+ totalRecordCount: 0,
9711
+ });
9712
+ }
9713
+ viewType(data, index) {
9714
+ this.selectedIndex = index;
9715
+ this.viewTypeData = data.id;
9716
+ }
9717
+ backtoCard() {
9718
+ this.CreateItemId = null;
9719
+ this.isShowCreateRequest = false;
9720
+ this.supportService.IsShowBackBtn = false;
9721
+ }
9722
+ getEntityTypeDetails() {
9723
+ this.entityTypeSetup
9724
+ .getSingleEntityTypeSetupById(this.EntityTypeId)
9725
+ .subscribe((res) => {
9726
+ this.EntityTypeDetail = res;
9727
+ if (this.globalService.CurrentLanguage == 'Ar') {
9728
+ this.pageTitle = this.EntityTypeDetail.DescriptionAr;
9681
9729
  }
9730
+ else {
9731
+ this.pageTitle = this.EntityTypeDetail.Description;
9732
+ }
9733
+ }, (error) => {
9734
+ console.log(error);
9682
9735
  });
9683
9736
  }
9684
9737
  getActiveEntityForm() {
9685
- this.entityTypeSetup.getActiveEntityForm(this.EntityTypeId).subscribe((res) => {
9686
- this.EntityFormId = res.RecId;
9738
+ this.entityTypeSetup.getActiveEntityFormByList(this.EntityTypeId).subscribe((res) => {
9739
+ this.ActiveEntityTypeForm = res;
9740
+ this.getFormList();
9687
9741
  }, (error) => {
9688
9742
  console.log(error);
9689
9743
  });
9690
9744
  }
9691
- closeCreatePage() {
9692
- this.closeActivityCreate.emit({ Type: "Cancel" });
9693
- }
9694
- submitTicketCreate(isDisableFormValidation) {
9695
- debugger;
9696
- let CreateData = this.createFormData;
9697
- if (isDisableFormValidation) {
9698
- if (!this.createFormData.Comments) {
9699
- Swal.fire({
9700
- title: this.translatePipe.transform('Fill all mandatory fields'),
9701
- });
9702
- // Swal.fire('Fill all mandatory fields', '', 'warning');
9703
- return;
9704
- }
9705
- }
9706
- else {
9707
- if (!this.pageForm.valid) {
9708
- Swal.fire({
9709
- title: this.translatePipe.transform('Fill all mandatory fields'),
9745
+ getFormList() {
9746
+ let _listdata = this.ActiveEntityTypeForm.DetailsViewData;
9747
+ if (_listdata) {
9748
+ let list = JSON.parse(_listdata);
9749
+ if (list && list.length > 0) {
9750
+ this.columnDefs = [];
9751
+ this.columnDefs.push({
9752
+ Field: 'CaseId',
9753
+ Name: 'CaseId',
9754
+ FieldType: E_FieldType.details,
9710
9755
  });
9711
- return;
9756
+ for (let index = 0; index < list.length; index++) {
9757
+ let fields = list[index].Fields;
9758
+ if (fields) {
9759
+ let _column = {
9760
+ Field: fields.Description,
9761
+ Name: fields.Label,
9762
+ DataType: fields.DataType,
9763
+ };
9764
+ this.columnDefs.push(_column);
9765
+ }
9766
+ else {
9767
+ let _currfield = list[index];
9768
+ this.columnDefs.push(_currfield);
9769
+ }
9770
+ }
9771
+ this.columnDefs.push({ Field: "ProcessStageEn", Name: 'Process Stage' });
9712
9772
  }
9713
9773
  }
9714
- CreateData.EntityTypeId = this.RefEntityTypeId;
9715
- if (this.ViewAction == 'Task') {
9716
- CreateData.EntityTypeId = this.ActivityTypeId;
9717
- CreateData.RefTicketId = this.RefTypeId;
9774
+ }
9775
+ openPopupCreatePage() {
9776
+ this.CreateItemId = this.EntityTypeId;
9777
+ this.isShowCreateRequest = true;
9778
+ this.supportService.IsShowBackBtn = true;
9779
+ }
9780
+ closePopupCreateView(Type, Data) {
9781
+ this.CreateItemId = null;
9782
+ this.isShowCreateRequest = false;
9783
+ }
9784
+ getPaginationListData(pageNo, pageSize) {
9785
+ this.pageNo = pageNo;
9786
+ if (pageSize)
9787
+ this.pageSize = pageSize;
9788
+ this.Searchcriteria.Pagging.PageNo = this.pageNo;
9789
+ this.Searchcriteria.Pagging.PageSize = this.pageSize;
9790
+ //this._getPageList();
9791
+ this.getListDatas(this.Searchcriteria);
9792
+ this.getPageCount();
9793
+ }
9794
+ getPageCount() {
9795
+ this.pageCount = Math.ceil(this.totalRecordCount / this.pageSize);
9796
+ }
9797
+ openDetailsPopup(data) {
9798
+ this.isDetails = true;
9799
+ this.CaseId = data.CaseId;
9800
+ this.detailsRecId = data.RecId; // RefRecId is the main recid
9801
+ this.detailsEntityTypeRecId = data.EntityTypeRecId;
9802
+ this.supportService.IsShowBackBtn = true;
9803
+ this.displayPopupDetailView = true;
9804
+ }
9805
+ closePopupDetailView() {
9806
+ this.isDetails = false;
9807
+ this.detailsRecId = null;
9808
+ this.detailsEntityTypeRecId = null;
9809
+ this.displayPopupDetailView = false;
9810
+ this.supportService.IsShowBackBtn = false;
9811
+ }
9812
+ SortGridData(item) {
9813
+ if (item) {
9814
+ this.CurrentSortingField = item.Name;
9815
+ if (this.SortingField.direction == '0')
9816
+ this.SortingField.direction = '1';
9817
+ else
9818
+ this.SortingField.direction = '0';
9819
+ this.SortingField.field = item.Field;
9718
9820
  }
9719
9821
  else {
9720
- CreateData.ActivityTypeId = this.ActivityTypeId;
9721
- CreateData.RefTypeId = this.RefTypeId;
9822
+ this.CurrentSortingField = null;
9823
+ this.SortingField.direction = '0';
9722
9824
  }
9723
- let _data = JSON.stringify(CreateData);
9724
- this.entityTypeSetup.createDynamic(_data).subscribe((res) => {
9725
- // alert('Success');
9726
- this.globalService.submitComments.next({ message: '' });
9727
- this.createFormData = {};
9728
- // Swal.fire('Created Successfully', 'Success');
9729
- Swal.fire({
9730
- title: this.translatePipe.transform('Created Successfully'),
9731
- });
9732
- this.pageForm.reset();
9733
- this.closeActivityCreate.emit({ Type: "Create" });
9734
- }, (error) => {
9735
- console.log(error);
9736
- });
9737
- }
9738
- emitTicketCreateForm(CreateData, pageForm) {
9739
- this.createFormData = CreateData;
9740
- this.pageForm = pageForm;
9825
+ this.getListDatas(this.Searchcriteria);
9741
9826
  }
9742
- }
9743
- ActivitiesCreateComponent.decorators = [
9744
- { type: Component, args: [{
9745
- selector: 'app-activities-create',
9746
- template: "\r\n\r\n\r\n\r\n\r\n\r\n<div class=\"row \">\r\n\r\n <div class=\"col col-sm-12\">\r\n \r\n <div class=\"row\">\r\n <div class=\"col-sm-12 dynamic_request_details\">\r\n <div class=\"card\" style=\"padding: 0;\">\r\n \r\n <!-- <div class=\"header\" style=\"border-bottom: 1px solid #ddd;\">\r\n <h2>Activity Create\r\n </h2>\r\n \r\n </div> -->\r\n\r\n <div class=\"body\" style=\"padding: 0;\">\r\n <div class=\"request-create p-4\">\r\n \r\n\r\n <ng-container *ngIf=\"EntityFormId \">\r\n <app-entity-dynamic-view [EntityFormId]=\"EntityFormId\" [ViewFrom]=\"'Details'\" [Type]=\"'Create'\"\r\n (submitFormValue)=\"emitTicketCreateForm($event.formdata,$event.pageForm)\"></app-entity-dynamic-view>\r\n </ng-container>\r\n\r\n <hr>\r\n\r\n <div class=\"text-center pull-right\">\r\n\r\n <button class=\"btn btn-small m-l-5 m-r-5 formcancelbtn\" (click)=\"closeCreatePage()\">\r\n {{'Cancel'|translate}}\r\n </button>\r\n\r\n <button class=\"btn btn-small btn-theme m-l-5 m-r-5 formsubmitbtn\" (click)=\"submitTicketCreate()\">\r\n {{'Submit'|translate}}\r\n </button>\r\n\r\n \r\n\r\n\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n </div>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n <div class=\"col col-sm-3\">\r\n <div class=\"request-right-side p-t-10\">\r\n \r\n </div>\r\n </div>\r\n \r\n \r\n \r\n </div>\r\n\r\n",
9747
- styles: [".formcancelbtn{border-radius:20px;border:1px solid #c4cbcb}.formcancelbtn,.formsubmitbtn{padding-left:15px;padding-right:15px;min-width:50px}.formsubmitbtn{border-radius:20px}"]
9748
- },] }
9749
- ];
9750
- ActivitiesCreateComponent.ctorParameters = () => [
9751
- { type: EntityTypeSetupService },
9752
- { type: Router },
9753
- { type: ActivatedRoute },
9754
- { type: GlobalService }
9755
- ];
9756
- ActivitiesCreateComponent.propDecorators = {
9757
- EntityFormId: [{ type: Input }],
9758
- EntityTypeId: [{ type: Input }],
9759
- ActivityTypeId: [{ type: Input }],
9760
- RefEntityTypeId: [{ type: Input }],
9761
- RefTypeId: [{ type: Input }],
9762
- ViewFrom: [{ type: Input }],
9763
- ViewAction: [{ type: Input }],
9764
- closeActivityCreate: [{ type: Output }]
9765
- };
9766
-
9767
- class ActivitiesViewComponent {
9768
- constructor(entityTypeSetup) {
9769
- this.entityTypeSetup = entityTypeSetup;
9770
- this.EntityFormId = null;
9771
- this.EntityTypeId = null;
9772
- this.ActivityTypeId = null;
9773
- this.RefTypeId = null;
9774
- this.FormData = null;
9775
- this.createFormData = {};
9776
- this.pageForm = {};
9827
+ SortDirection(direction) {
9828
+ this.SortingField.direction = direction;
9829
+ this.getListDatas(this.Searchcriteria);
9777
9830
  }
9778
- ngOnInit() {
9779
- this.getActiveEntityForm();
9831
+ searchData(event) {
9832
+ let filtervals = [];
9833
+ if (event.keyCode == 13 && this.SearchBox != null) {
9834
+ filtervals.push({
9835
+ Field: 'CaseId:IqamaNumber:PassportNumber:BorderNumber:MobileNumber:LabourId:LaborName',
9836
+ TableAlias: '',
9837
+ Operator: '',
9838
+ Value: this.SearchBox,
9839
+ });
9840
+ this.Searchcriteria.Where = filtervals;
9841
+ this.getListDatas(this.Searchcriteria);
9842
+ }
9780
9843
  }
9781
- getActiveEntityForm() {
9782
- this.entityTypeSetup.getActiveEntityForm(this.EntityTypeId).subscribe((res) => {
9783
- this.EntityFormId = res.RecId;
9844
+ getWorkflowStatusWithStage() {
9845
+ this.entityTypeSetup
9846
+ .getAllWfStage(null, this.EntityTypeId, true)
9847
+ .subscribe((res) => {
9848
+ this.StatusAndStageList = res.Data;
9849
+ // .sort((a, b) => {
9850
+ // if (a.StageId < b.StageId) return -1;
9851
+ // else if (a.StageId > b.StageId) return 1;
9852
+ // else return 0;
9853
+ // });
9854
+ let showallIndex = this.StatusAndStageList.findIndex(x => x.OrderId == -1);
9855
+ let arrayindex = this.StatusAndStageList.length - 1;
9856
+ let element = this.StatusAndStageList.splice(showallIndex, 1)[0];
9857
+ this.StatusAndStageList.splice(arrayindex, 0, element);
9858
+ this.selectStage(this.StatusAndStageList[0]);
9859
+ console.log(res.Data);
9784
9860
  }, (error) => {
9861
+ var _a;
9785
9862
  console.log(error);
9863
+ 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');
9786
9864
  });
9787
9865
  }
9788
- emitTicketCreateForm(CreateData, pageForm) {
9789
- this.createFormData = CreateData;
9790
- this.pageForm = pageForm;
9791
- }
9792
- }
9793
- ActivitiesViewComponent.decorators = [
9794
- { type: Component, args: [{
9795
- selector: 'app-activities-view',
9796
- template: "<div class=\"row \">\r\n <div class=\"col col-sm-12\">\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 dynamic_request_details activity-details-view\">\r\n <div class=\"card\">\r\n <div class=\"body\" style=\"padding: 0;\">\r\n <div class=\"request-create \">\r\n <ng-container *ngIf=\"EntityFormId \">\r\n <app-dynamic-details-view [EntityFormId]=\"EntityFormId\" [EntityTypeId]=\"EntityTypeId\"\r\n [PageGroupValues]=\"FormData\" [ViewType]=\"'Details'\">\r\n </app-dynamic-details-view>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>",
9797
- styles: [".card{margin-bottom:0}"]
9798
- },] }
9799
- ];
9800
- ActivitiesViewComponent.ctorParameters = () => [
9801
- { type: EntityTypeSetupService }
9802
- ];
9803
- ActivitiesViewComponent.propDecorators = {
9804
- EntityFormId: [{ type: Input }],
9805
- EntityTypeId: [{ type: Input }],
9806
- ActivityTypeId: [{ type: Input }],
9807
- RefTypeId: [{ type: Input }],
9808
- FormData: [{ type: Input }]
9809
- };
9810
-
9811
- class ValidationErrorComponent {
9812
- constructor(GlobelService) {
9813
- this.GlobelService = GlobelService;
9814
- }
9815
- ngOnInit() {
9866
+ selectStage(item) {
9867
+ this.totalRecordCount = 0;
9868
+ this.selectedStage = item.RecId;
9869
+ this.selectedStageobj = item;
9870
+ if (item.StageId != null) {
9871
+ this.StatusId = item.StageId;
9872
+ }
9873
+ else {
9874
+ this.StatusId = null;
9875
+ this.Searchcriteria.Where = null;
9876
+ }
9877
+ this.getWfStageAction(this.EntityTypeId, this.StatusId);
9878
+ this.getListDatas(this.Searchcriteria);
9816
9879
  }
9817
- }
9818
- ValidationErrorComponent.decorators = [
9819
- { type: Component, args: [{
9820
- selector: 'app-validation-error',
9821
- template: `
9822
- <ng-container [formGroup]="pageForm.form">
9823
- <ng-container *ngIf="pageForm.form.get(item.Description)?.errors"
9824
- class="invalid-feedback">
9825
-
9826
-
9827
- <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['required']">
9828
- <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9829
- <span *ngIf="_Vmsg.Type=='Required'" style="color: #bd4147">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9830
- </ng-container>
9831
- </ng-container>
9832
-
9833
- <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['min']">
9834
- <span class="red">{{GlobelService.CurrentLanguage =='Ar'? (item.LabelAr ?item.LabelAr + ( 'must be greater then'|translate)+ pageForm.form.get(item.Description).errors.min.min : (item.Label + 'must be greater then')|translate)+ pageForm.form.get(item.Description).errors.min.min :item.Label + ( 'must be greater then'|translate)+ pageForm.form.get(item.Description).errors.min.min }}</span>
9835
- <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9836
- <span *ngIf="_Vmsg.Type=='MinMax'" style="color: #bd4147">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9837
- </ng-container>
9838
- </ng-container>
9839
-
9840
- <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['max']">
9841
- <span class="red">{{GlobelService.CurrentLanguage =='Ar'? (item.LabelAr ?item.LabelAr + ( 'must be less then'|translate)+ pageForm.form.get(item.Description).errors.max.max : (item.Label + 'must be less then')|translate)+ pageForm.form.get(item.Description).errors.max.max :item.Label + ( 'must be less then'|translate)+ pageForm.form.get(item.Description).errors.max.max }}</span>
9842
- <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9843
- <span *ngIf="_Vmsg.Type=='MinMax'" style="color: #bd4147;">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9844
- </ng-container>
9845
- </ng-container>
9846
-
9847
- <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['minlength']">
9848
- <span class="red">{{GlobelService.CurrentLanguage =='Ar'? (item.LabelAr ?item.LabelAr + ( 'must be at least'|translate)+ pageForm.form.get(item.Description).errors.minlength.requiredLength +( 'characters'|translate) : (item.Label + 'must be at least')|translate)+ pageForm.form.get(item.Description).errors.minlength.requiredLength +( 'characters'|translate) :item.Label + ( 'must be at least'|translate)+ pageForm.form.get(item.Description).errors.minlength.requiredLength +( 'characters'|translate) }}
9849
- </span>
9850
-
9851
- <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9852
- <span *ngIf="_Vmsg.Type=='MinLength'" style="color: #bd4147">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9853
- </ng-container>
9854
- </ng-container>
9855
-
9856
- <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['maxlength']">
9857
- <span class="red">{{GlobelService.CurrentLanguage =='Ar'? (item.LabelAr ?item.LabelAr + ( 'more then'|translate)+pageForm.form.get(item.Description).errors.maxlength.requiredLength +( 'characters'|translate) : (item.Label | translate)+ ( 'more then'|translate)+pageForm.form.get(item.Description).errors.maxlength.requiredLength +( 'characters'|translate)) :item.Label + ( 'more then'|translate)+pageForm.form.get(item.Description).errors.maxlength.requiredLength +( 'characters'|translate) }}</span>
9858
-
9859
- <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9860
- <span *ngIf="_Vmsg.Type=='MaxLength'" style="color: #bd4147">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9861
- </ng-container>
9862
- </ng-container>
9863
-
9864
- <ng-container *ngIf="pageForm.form.get(item.Description)['errors']['pattern']">
9865
- <span class="red">{{GlobelService.CurrentLanguage =='Ar'? (item.LabelAr ?item.LabelAr +( 'pattern not valid'|translate) : ((item.Label + 'pattern not valid')|translate)) :item.Label +( 'pattern not valid'|translate) }}</span>
9866
- <ng-container *ngFor="let _Vmsg of item.ValidationMessage">
9867
- <span *ngIf="_Vmsg.Type=='Pattern'" style="color: #bd4147">{{GlobelService.CurrentLanguage =='Ar'? (_Vmsg.MsgAr ?_Vmsg.MsgAr : (_Vmsg.MsgEn | translate)) :_Vmsg.MsgEn }}</span>
9868
- </ng-container>
9869
- </ng-container>
9870
-
9871
-
9872
-
9873
-
9874
-
9875
- </ng-container>
9876
- </ng-container>
9877
- `,
9878
- styles: [`
9879
- span {
9880
- display:block;
9880
+ getWfStageAction(EntityTypeId, StageId) {
9881
+ this.entityTypeSetup.urlGetWfStageAction(EntityTypeId, StageId).subscribe((res) => {
9882
+ this.wfActionData = res;
9883
+ console.log(res);
9884
+ }, (error) => {
9885
+ error.error;
9886
+ });
9881
9887
  }
9882
- `]
9883
- },] }
9884
- ];
9885
- ValidationErrorComponent.ctorParameters = () => [
9886
- { type: GlobalService }
9887
- ];
9888
- ValidationErrorComponent.propDecorators = {
9889
- item: [{ type: Input }],
9890
- pageForm: [{ type: Input }],
9891
- fieldsList: [{ type: Input }]
9892
- };
9893
-
9894
- class SelfServiceFlowComponent {
9895
- constructor(supportService, fb, entityTypeSetup, globalService, document) {
9896
- this.supportService = supportService;
9897
- this.fb = fb;
9898
- this.entityTypeSetup = entityTypeSetup;
9899
- this.globalService = globalService;
9900
- this.document = document;
9901
- this.IssueType = 11;
9902
- this.Channel = '3';
9903
- this.ChannelEn = 'Portal';
9904
- this.ChannelAr = 'صفحة العميل';
9905
- this.IssueAllList = [];
9906
- this.IssueCaseList = [];
9907
- this.translatePipe = new TranslatePipe(this.globalService);
9888
+ getStatusField(data) {
9889
+ if (this.GridCheckedData.length <= 0) {
9890
+ Swal.fire(this.translatePipe.transform('Atleast Select One Row'));
9891
+ return;
9892
+ }
9893
+ this.action = data.ActionRecId;
9894
+ this.workflowEntityFormId = data.WorkFlowForm;
9895
+ this.showWorkflowPopup = true;
9896
+ this.entityTypeSetup.onshowWorkflowPopup.next({
9897
+ showWorkflowPopup: true,
9898
+ fieldConfig: [],
9899
+ });
9900
+ // this.EntityTypeSetupService.urlGetStatusField(data.ActionRecId).subscribe(
9901
+ // (res: any) => {
9902
+ //
9903
+ // this.wfStatusFields = res.Data;
9904
+ // this.EntityTypeSetupService.onshowWorkflowPopup.next({
9905
+ // showWorkflowPopup: true,
9906
+ // fieldConfig: res.Data,
9907
+ // });
9908
+ // // this.showWorkflowPopup = true;
9909
+ // console.log(res);
9910
+ // },
9911
+ // (error) => {
9912
+ //
9913
+ // error.error;
9914
+ // }
9915
+ // );
9908
9916
  }
9909
- ngOnInit() {
9910
- this.getIssueGroupRequesterMappingByRequesterType();
9917
+ getgridCheckedData(item) {
9918
+ this.GridCheckedData = item;
9911
9919
  }
9912
- getIssueGroupRequesterMappingByRequesterType() {
9913
- this.IssueAllList = [];
9914
- this.supportService.getIssueGroupRequesterMappingByRequesterType(this.RequesterTypeId).subscribe((res) => {
9915
- this.IssueAllList = res.filter(x => x.IssueType == this.IssueType);
9916
- this.IssueCaseList = [];
9917
- this.IssueAllList.forEach(x => {
9918
- x.IssueGroup.forEach(group => {
9919
- this.IssueCaseList.push(...group.Issue);
9920
- });
9921
- });
9922
- this.IssueCaseList.map(x => {
9923
- if (x.IssueImage && !x.IssueImage.includes("Account/ShowImageByPath")) {
9924
- x.IssueImage = "/Account/ShowImageByPath?_Path=" + x.IssueImage;
9925
- }
9920
+ getWorkflowActionComments(comments, updateFileds, updateFieldsObject) {
9921
+ // alert("zz");
9922
+ // let updateFieldsObjectString = JSON.stringify(updateFieldsObject);
9923
+ let updateFieldsObjectString = '';
9924
+ let RecIds = [];
9925
+ if (this.GridCheckedData.length > 0) {
9926
+ this.GridCheckedData.forEach(x => {
9927
+ RecIds.push(x.RecId);
9926
9928
  });
9929
+ }
9930
+ this.entityTypeSetup.urlPostTicketWfActionMultiple(RecIds, this.StatusId, this.action, comments, updateFileds, updateFieldsObjectString, this.EntityTypeId).subscribe((res) => {
9931
+ Swal.fire('Action Updated Successfully');
9932
+ this.getListDatas(this.Searchcriteria);
9933
+ console.log(res);
9927
9934
  }, (error) => {
9928
- console.log(error);
9929
- Swal.fire({
9930
- title: this.translatePipe.transform(error.error),
9931
- });
9935
+ var _a, _b, _c;
9936
+ error.error;
9937
+ if (((_a = error.error) === null || _a === void 0 ? void 0 : _a.status) == false) {
9938
+ let msg = JSON.parse((_b = error.error) === null || _b === void 0 ? void 0 : _b.msg);
9939
+ if (msg && msg.msg) {
9940
+ msg = msg.msg;
9941
+ }
9942
+ else {
9943
+ msg = (_c = error.error) === null || _c === void 0 ? void 0 : _c.msg;
9944
+ }
9945
+ Swal.fire(this.translatePipe.transform(msg));
9946
+ }
9947
+ else {
9948
+ Swal.fire(this.translatePipe.transform(error.ExceptionMessage), this.translatePipe.transform(error.message));
9949
+ }
9932
9950
  });
9933
9951
  }
9934
- selectCase(item) {
9935
- this.selectedCaseItem = item;
9936
- }
9937
- backtoCard() {
9938
- this.selectedCaseItem = null;
9952
+ slider(direction, Id) {
9953
+ this.slide(direction, Id);
9939
9954
  }
9940
- imageExists(image_url) {
9941
- var http = new XMLHttpRequest();
9942
- http.open('HEAD', image_url, false);
9943
- http.send();
9955
+ slide(direction, Id) {
9944
9956
  debugger;
9945
- return http.status != 404;
9957
+ let container = document.getElementById(Id);
9958
+ let scrollCompleted = 0;
9959
+ let slideVar = setInterval(function () {
9960
+ if (direction == 'left') {
9961
+ container.scrollLeft -= 50;
9962
+ }
9963
+ else {
9964
+ container.scrollLeft += 50;
9965
+ }
9966
+ scrollCompleted += 10;
9967
+ if (scrollCompleted >= 50) {
9968
+ window.clearInterval(slideVar);
9969
+ }
9970
+ }, 50);
9946
9971
  }
9947
9972
  }
9948
- SelfServiceFlowComponent.decorators = [
9973
+ CaseListComponent.decorators = [
9949
9974
  { type: Component, args: [{
9950
- selector: 'app-self-service-flow',
9951
- template: "<div class=\"req_page whole\" [ngClass]=\"{'lang_Arabic': globalService.CurrentLanguage=='Ar'}\">\r\n\r\n <div class=\"whole m-t-10 clearfix\">\r\n <div class=\"pull-left\">\r\n <h2 class=\"heading pull-left\">{{'Customer Self Service'|translate}}\r\n </h2>\r\n\r\n </div>\r\n <div class=\"pull-right m-r-10\" *ngIf=\"selectedCaseItem && selectedCaseItem.CaseId && !supportService.IsShowBackBtn\">\r\n <button class=\"btn btn-outline btn-danger\" (click)=\"backtoCard()\">\r\n <i class=\"la la-arrow-left\"></i>\r\n {{'Back'|translate}}</button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"whole m-t-20 clearfix\">\r\n\r\n\r\n <ng-container *ngIf=\"selectedCaseItem && selectedCaseItem.CaseId;else flipcard\">\r\n\r\n <app-case-list [EntityTypeId]=\"selectedCaseItem.CaseId\" [RequesterTypeId]=\"RequesterTypeId\" [RequesterId]=\"RequesterId\"\r\n [RequesterTypeIdEn]=\"RequesterTypeIdEn\" [Source]=\"Source\" [Channel]=\"Channel\" [ChannelEn]=\"ChannelEn\"\r\n [ChannelAr]=\"ChannelAr\" [RequestField]=\"RequesterField\"></app-case-list>\r\n\r\n </ng-container>\r\n <ng-template #flipcard>\r\n\r\n <div class=\"form-card whole\">\r\n <!-- && !Notespopup -->\r\n <div class=\"form-group w-100\">\r\n \r\n <div class=\"tiles_div row\">\r\n <div class=\"col-sm-12 col-md-6 col-lg-3\" *ngFor=\"let item of IssueCaseList\">\r\n \r\n <div class=\"flip-card tiles\" (click)=\"selectCase(item)\">\r\n <div class=\"flip-card-inner\">\r\n <div class=\"flip-card-front\">\r\n <img *ngIf=\"item.IssueImage\" src=\"{{globalService.SystemConfigs.ERPUrl}}{{item.IssueImage}}\" alt=\"Case Img\">\r\n <h1>{{ globalService.CurrentLanguage=='Ar'?(item.CaseIdAr ?item.CaseIdAr : (item.CaseIdEn | translate)) :item.CaseIdEn}}</h1>\r\n </div>\r\n <div class=\"flip-card-back bg-themecolor\">\r\n <h1>\r\n {{ globalService.CurrentLanguage=='Ar'?(item.IssueAr ?item.IssueAr : (item.IssueEn | translate)) :item.IssueEn}}\r\n </h1>\r\n <p class=\"white-space-pre-line\">\r\n {{ globalService.CurrentLanguage=='Ar'?(item.IssueDescriptionAr ?item.IssueDescriptionAr : (item.IssueDescriptionEn | translate)) :item.IssueDescriptionEn}}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n </ng-template>\r\n\r\n\r\n </div>\r\n\r\n</div>",
9952
- styles: [""]
9975
+ selector: 'app-case-list',
9976
+ template: "<div class=\"req_page whole\" [ngClass]=\"{'lang_Arabic': globalService.CurrentLanguage=='Ar'}\">\r\n <div class=\"whole m-t-10\">\r\n <div class=\"clearfix\" *ngIf=\"!isShowCreateRequest && !isDetails\">\r\n <div class=\"float-left\" style=\"width: calc(100% - 50px);\">\r\n <div class=\"progress-wrap\">\r\n <div id=\"progress-container\">\r\n <div class=\"line\"></div>\r\n <ul id=\"slider-arrow\">\r\n <li class=\"clearfix\" *ngFor=\"let item of StatusAndStageList;let i= index\" (click)=\"selectStage(item)\">\r\n <span class=\"circle-content\" [ngClass]=\"{'active':selectedStage==item.RecId}\">\r\n <i *ngIf=\"item.StageIcon else elseicon;\" [ngClass]=\"item.StageIcon\"></i>\r\n <ng-template #elseicon>\r\n <i class=\"la la-list-alt\" *ngIf=\"item?.StageId == -1\"></i>\r\n <i class=\"la la-hourglass-half\" *ngIf=\"item?.StageId == 0\"></i>\r\n <i class=\"las la-clipboard-check\" *ngIf=\"item?.StageId != 0 && item?.StageId != -1\"></i>\r\n </ng-template>\r\n </span>\r\n <br>\r\n <a href=\"javascript:void(0);\" class=\"text-center\">\r\n {{item.StageDescription |translate}} \r\n <br>\r\n <span class=\"badge\" *ngIf=\"selectedStage==item.RecId\">{{totalRecordCount}}</span>\r\n <!-- <br>\r\n <span> {{item?.StageId}} - {{item?.RecordsStatusEn |translate}}</span> -->\r\n </a>\r\n </li>\r\n </ul>\r\n <!-- <ul>\r\n <li><i class=\"fa fa-check-square-o\"></i> <p>Step 1</p></li>\r\n <li><i class=\"fa fa-times\"></i><p>Step 2</p></li>\r\n <li><p>Step 3</p></li>\r\n </ul> -->\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!isShowCreateRequest && !isDetails\" class=\"float-right\" style=\"width: 50px;border-radius: 5px 5px 0 0;background: #dddddd;\">\r\n <a href=\"javascript:void(0);\" class=\"arrownext\" style=\"font-size:22px;\" (click)=\"slider('left','slider-arrow')\"><i class=\"fa fa-arrow-left\"></i></a>\r\n <a href=\"javascript:void(0);\" class=\"arrownext\" style=\"font-size:22px;\" (click)=\"slider('right','slider-arrow')\"><i class=\"fa fa-arrow-right\"></i></a>\r\n </div> \r\n </div>\r\n <div class=\"workflow\" *ngIf=\"!isShowCreateRequest && !isDetails && false\">\r\n <ul>\r\n <li *ngFor=\"let item of StatusAndStageList\" class=\"clearfix\">\r\n <a href=\"javascript:void(0);\" (click)=\"selectStage(item)\">StageDescriptionAr\r\n {{globalService.CurrentLanguage=='Ar' ? (item.StageDescriptionAr ? item.StageDescriptionAr : (item.StageDescription|translate) ) : (item.StageDescription |translate)}} - <sup *ngIf=\"selectedStage==item.RecId\"> {{totalRecordCount}}</sup>\r\n <span> {{item?.StageId}} - {{item?.RecordsStatusEn |translate}}</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </div>\r\n <h2 class=\"heading pull-left\" style=\"font-size: 23px !important;\">{{pageTitle |translate}}\r\n <span *ngIf=\"isShowCreateRequest\">- {{'Create'|translate}}</span>\r\n <span *ngIf=\"displayPopupDetailView\">- {{'Details'|translate}}</span>\r\n </h2>\r\n <div class=\"pull-left\" *ngIf=\"!(isShowCreateRequest || isDetails)\">\r\n <div class=\"pull-left create_req hierarchy-view\">\r\n <button class=\"add_req_btn\" (click)=\"openPopupCreatePage()\">\r\n {{'CreateNew'|translate}}\r\n <i class=\"fa fa-plus\" style=\"float: right;margin: 4px 1px 2px 8px;\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"pull-right m-r-10\" *ngIf=\"isDetails\">\r\n <button class=\"btn btn-outline btn-danger\" (click)=\"closePopupDetailView()\">\r\n <i class=\"la la-arrow-left\"></i>\r\n {{'Back'|translate}}\r\n </button>\r\n </div>\r\n <div class=\"pull-right m-r-10\" *ngIf=\"isShowCreateRequest\">\r\n <button class=\"btn btn-outline btn-danger\" (click)=\"backtoCard()\">\r\n <i class=\"la la-arrow-left\"></i>\r\n {{'Back'|translate}}\r\n </button>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"!(isShowCreateRequest || isDetails)\">\r\n \r\n <div class=\"whole bg-white p-3\">\r\n <div class=\"m-r-10 pull-left status_dropdown_div\" *ngIf=\"false\">\r\n <div class=\"dropdown status_dropdown pull-left\" style=\"min-width: 200px;\" *ngIf=\"false\">\r\n\r\n <ng-select *ngIf=\"globalService.CurrentLanguage == 'Ar' else elseEng\" (change)=\"filterStatus()\"\r\n [(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\" [placeholder]=\"'\u062D\u0627\u0644\u0629'\" bindLabel=\"NameAr\"\r\n bindValue=\"Name\">\r\n </ng-select>\r\n <ng-template #elseEng>\r\n <ng-select (change)=\"filterStatus()\" [(ngModel)]=\"StatusListValue\" [items]=\"StatusListDDL\"\r\n [placeholder]=\"'Status'\" bindLabel=\"Name\" bindValue=\"Name\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class=\"pull-left\">\r\n <div class=\"m-r-10 pull-left sort_div\">\r\n <div class=\"dropdown sort_dropdown pull-left\" style=\"min-width: 240px;\">\r\n\r\n <ng-select *ngIf=\"globalService.CurrentLanguage == 'Ar' else elseTemplate\" [items]=\"FieldListDDL\"\r\n [placeholder]=\"'\u0646\u0648\u0639'\" bindLabel=\"FieldAr\" bindValue=\"Name\" (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n\r\n <ng-template #elseTemplate>\r\n <ng-select [items]=\"FieldListDDL\" [placeholder]=\"'Sort'\" bindLabel=\"Name\" bindValue=\"Field\"\r\n (change)=\"SortGridData($event)\">\r\n </ng-select>\r\n </ng-template>\r\n </div>\r\n <ng-container *ngIf=\"CurrentSortingField\">\r\n <span class=\"pull-right sort-icon\" style=\" font-size: 20px;\">\r\n <i class=\"la la-sort-amount-asc\" *ngIf=\"SortingField.direction=='0'\" (click)=\"SortDirection(1)\"></i>\r\n <i class=\"la la-sort-amount-desc\" *ngIf=\"SortingField.direction=='1'\" (click)=\"SortDirection(0)\"></i>\r\n </span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"pull-right\">\r\n <div class=\"custom-dropdown\" *ngIf=\"wfActionData.length > 0\">\r\n <!-- -->\r\n <div class=\"custom-dropdown\" style=\"color: #fff;border-radius: 10px;margin-bottom: 10px;background: #339e33;\">\r\n <div class=\"dropdown\">\r\n <button class=\"dropbtn btn btn-success\">{{'Action'|translate}}</button>\r\n <div class=\"dropdown-content\">\r\n <span *ngIf=\"wfActionData.length<= 0\">\r\n <a href=\"javascript:void(0);\" class=\"dropdownlist\">\r\n {{'No Action Found'|translate}}\r\n </a>\r\n </span>\r\n <span *ngFor=\"let item of wfActionData\">\r\n <a href=\"javascript:void(0);\" class=\"dropdownlist\" (click)=\"getStatusField(item)\">{{item.ActionDescription |translate}}</a>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"pull-right\">\r\n\r\n <input placeholder=\"{{'Search the CaseId/Iqama/Name here' | translate }}\" type=\"text\" class=\"serach_box pull-left\"\r\n [(ngModel)]=\"SearchBox\" (keyup)=\"searchData($event)\">\r\n\r\n <a href=\"javascript:void(0)\" class=\"themecolor action-btn m-r-10\" style=\"color: #000;font-size: 20px;\"\r\n *ngFor=\"let item of viewTypes; let i = index\" [ngClass]=\"{'themecolor':selectedIndex != i}\">\r\n <span [class.active]=\"selectedIndex === i\" (click)=\"viewType(item, i)\">\r\n <i class=\"la {{item.class}}\"></i>\r\n </span>\r\n </a>\r\n\r\n\r\n </div>\r\n \r\n </div>\r\n\r\n <div class=\"body whole\">\r\n <div *ngIf=\"viewTypeData ==2\">\r\n <div class=\"lists\" *ngFor=\"let item of selfServiceRequestData\">\r\n\r\n <div class=\"assign_to_div\" (click)=\"openDetailsPopup(item)\">\r\n <p>{{'ID' | translate}}</p>\r\n <span>#{{item?.CaseId}}</span>\r\n </div>\r\n\r\n <div class=\"content\" (click)=\"openDetailsPopup(item)\">\r\n <h4 class=\"themecolor\">{{'#'+item.LabourId}} | {{item.LaborName}} </h4>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Iqama Number'|translate}} </i>: {{item.IqamaNumber}}</span>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Passport Number'|translate}} </i>: {{item.PassportNumber}}</span>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Border Number'|translate}} </i>: {{item.BorderNumber}}</span>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Mobile Number'|translate}} </i>: {{item.MobileNumber}}</span>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Nationality'|translate}} </i>: {{item.NationalityEn}}</span>\r\n <span class=\"f-s-12\"><i class=\"text-bold f-s-12\">{{'Profession'|translate}} </i>: {{item.ProfessionEn}}</span>\r\n <div class=\"line_2\">\r\n <div class=\"pull-left\">{{'Added On'|translate}} {{item.CreatedDatetime | date}} {{'By'|translate}}\r\n {{item.CreatedBy}}</div>\r\n </div>\r\n <p>{{item.Description}}</p>\r\n <!-- <span><i class=\"text-bold\">Assigned Date </i>: {{item.AssignedDate | date}}</span>\r\n <span><i class=\"text-bold\">DeadLine Date </i>: {{item.DeadLineDateTime | date}}</span> -->\r\n <!-- <p>Steps:1.Login to Bugasura with valid user.2.Select respective project and open it 3.In issues list search enter text for search and hit enter button4.</p> -->\r\n </div>\r\n\r\n <div class=\"req_id\" (click)=\"openDetailsPopup(item)\">\r\n <!-- <label>{{item.CaseTypeIdEn}}</label>\r\n <p>{{item.CaseTypeId}}</p> -->\r\n <span><span class=\"text-bold\">{{globalService.CurrentLanguage =='Ar' ? (item.CaseTypeIdAr ? item.CaseTypeIdAr\r\n :\r\n (item.CaseTypeIdEn |translate)) : item.CaseTypeIdEn}}</span></span>\r\n <span><i class=\"text-bold\">{{'Request Date'|translate}} </i>: {{(item.DateofRequest ? item.DateofRequest : DateOfRequest) | date}}</span>\r\n <span><i class=\"text-bold\">{{'Start Date'|translate}} </i>: {{item.StartDate | date}}</span>\r\n <span><i class=\"text-bold\">{{'End Date'|translate}} </i>: {{item.EndDate | date}}</span>\r\n <!-- <span><i class=\"text-bold\"> {{'DeadLine Date' | translate}} </i>: {{item.DeadLineDateTime | date}}</span> -->\r\n </div>\r\n <div class=\"prioritys\">\r\n <div class=\"custom-dropdown\" *ngIf=\"wfActionData.length > 0 && false\">\r\n <!-- *ngIf=\"wfActionData.length > 0\" -->\r\n <div class=\"custom-dropdown\" style=\"color: #fff;border-radius: 10px;margin-bottom: 10px;background: #339e33;\">\r\n <div class=\"dropdown\">\r\n <a href=\"javascript:void(0)\" class=\"dropbtn atext\">{{'Action'|translate}} <i class=\"fa fa-sort-desc m-r-5\"></i></a>\r\n <div class=\"dropdown-content\">\r\n <span *ngIf=\"wfActionData.length<= 0\">\r\n <a href=\"javascript:void(0);\" class=\"dropdownlist\">\r\n {{'No Action Found'|translate}}\r\n </a>\r\n </span>\r\n <span *ngFor=\"let item of wfActionData\">\r\n <a href=\"javascript:void(0);\" class=\"dropdownlist\" (click)=\"getStatusField(item)\">{{item.ActionDescription |translate}}</a>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span class=\"priority\" [ngClass]=\"item?.PriorityEn\">{{globalService.CurrentLanguage =='Ar' ? (item?.PriorityAr\r\n ?\r\n item?.PriorityAr : (item?.PriorityEn |translate)) : item?.PriorityEn }}\r\n <ng-container *ngIf=\"item.PriorityEn == null\">{{'Medium'|translate}}</ng-container>\r\n </span>\r\n <span class=\"priority\" style=\"background: #3535f238;color: #9c5145;\">{{globalService.CurrentLanguage =='Ar' ? (item?.ProcessStageAr\r\n ?\r\n item?.ProcessStageAr : (item?.ProcessStageEn |translate)) : item?.ProcessStageEn }}\r\n </span>\r\n\r\n <div class=\"status\" [ngClass]=\"item?.StatusIdEn\">\r\n <span>{{item?.StatusIdEn |translate}}\r\n <ng-container *ngIf=\"item.StatusIdEn == null\">{{'New'|translate}}</ng-container>\r\n </span>\r\n </div>\r\n\r\n </div>\r\n <!-- <div class=\"assign_to_div\">\r\n <p>{{'Assigned To' | translate}}</p>\r\n <i class=\"las la-user-circle\" title=\"{{item.AssignedTo }}\"></i>\r\n </div> -->\r\n <div class=\"comments\" (click)=\"openDetailsPopup(item)\">\r\n <div>\r\n <i class=\"fa fa-comments-o\" aria-hidden=\"true\"></i>\r\n <span>{{item.CommentsCount}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <app-pagination *ngIf=\"!IsClientPagination\" [totalCount]=\"totalRecordCount\" [pageCount]=\"pageCount\"\r\n [currentPage]=\"pageNo\" [pageSize]=\"pageSize\" [gridSearchType]=\"GridSearchType\"\r\n (getPaginationListData)=\"getPaginationListData($event.pageCount,$event.pageSize)\">\r\n </app-pagination>\r\n </div>\r\n <div *ngIf=\"viewTypeData ==1\">\r\n <app-grid [columnDefs]=\"columnDefs\" [GridTitle]=\"pageTitle\" \r\n [selectMode]=\"selectMode\" [IsCreate]=\"false\" [IsDelete]=\"false\"\r\n [IsEdit]=\"false\" [grid]=\"1\" (getPageList)=\"getListDatas($event.Criteria)\" (getGridCheckedData)=\"getgridCheckedData($event.gridData)\" (goToDetails)=\"openDetailsPopup($event.data)\">\r\n </app-grid>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"isDetails && detailsRecId\">\r\n\r\n <app-support-request-details [ViewFrom]=\"'Popup'\" [IsWfAction]=\"true\" [RecId]=\"detailsRecId\" [EntityTypeRecId]=\"detailsEntityTypeRecId\">\r\n </app-support-request-details>\r\n\r\n </ng-container>\r\n\r\n\r\n <ng-container *ngIf=\"isShowCreateRequest\">\r\n\r\n <app-support-request-create class=\"support_req_div\" *ngIf=\"CreateItemId\" [ViewFrom]=\"'Popup'\" [Source]=\"Source\"\r\n [IssueType]=\"11\" [IssueTypeEn]=\"'Customer Self Service'\"\r\n [CreatedByUserType]=\"RequesterTypeId\" [Channel]=\"Channel\" [ChannelEn]=\"ChannelEn\" [ChannelAr]=\"ChannelAr\"\r\n [RequesterId]=\"RequesterId\" [RequesterIdEn]=\"RequesterTypeIdEn\" [RequestField]=\"RequesterField\" [Type]=\"'Create'\"\r\n [EntityTypeId]=\"CreateItemId\" (closeCreate)=\"closePopupCreateView($event.Type,$event.Data)\">\r\n </app-support-request-create>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"showWorkflowPopup\">\r\n\r\n <app-workflow-dynamic-popup [showWorkflowPopups]=\"showWorkflowPopup\"\r\n [EntityTypeId]=\"EntityTypeId\"\r\n [EntityFormId]=\"workflowEntityFormId\"\r\n (getWorkflowActionComments)=\"getWorkflowActionComments($event.comments, $event.updateFileds, $event.updateFieldsObject)\">\r\n </app-workflow-dynamic-popup>\r\n </ng-container>\r\n</div>",
9977
+ styles: ["@charset \"UTF-8\";.f-s-12{font-size:12px!important}.workflow ul{list-style-type:none;margin:0;padding:0;overflow:hidden}.workflow li{float:left;background:#ea6a6a}.workflow li a{display:block;color:#fff;text-align:center;padding:16px;text-decoration:none;cursor:pointer!important}.workflow li a:hover{background-color:#111}body,html{background-color:#f2f2f2;display:flex;justify-content:center;align-items:center;width:100%}.progress-wrap{padding-bottom:70px;margin-bottom:20px;width:100%;overflow:hidden}#progress-container{display:flex;position:relative;height:100%;width:100%;overflow:hidden;margin:auto}#progress-container a{font-size:10px;line-height:10px;max-width:70px;float:left;text-decoration:none}#progress-container a span.badge{margin-top:6px}#progress-container .line{height:1px;width:100%;border-bottom:4px solid #d4d4d4;position:absolute;margin-top:25px;z-index:0}@media (max-width:600px){#progress-container .line{width:100%}}#progress-container ul{list-style-type:none;margin:0;padding:0;overflow:hidden;display:flex;z-index:1}#progress-container li{float:left}#progress-container li:last-child span{margin-right:0!important}#progress-container li .circle-content{margin-right:70px;display:inline-flex;border:4px solid #d4d4d4;background:#fff;padding:10px;border-radius:50%;text-align:center;justify-content:center;align-items:center;font-weight:700;color:#000;font-size:25px;cursor:pointer}#progress-container li .circle-content:before{font-size:12px;position:absolute;margin-top:50px;color:#2b2020}#progress-container li .circle-content a{color:#312a2a}#progress-container li .done{font-family:FontAwesome;border:4px solid #8cc43d;color:#8cc43d}#progress-container li .done:after{content:\"\uF00C\"}#progress-container li .done a{color:#8cc43d}#progress-container li .active{color:#fff;border:4px solid #b9dfc5;background:#225d34}#progress-container li .active a{color:#225d34}.custom-dropdown .dropdown-content{display:none;position:absolute;background-color:#f9f9f9;min-width:160px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1}.custom-dropdown .dropdown-content a{color:#000;padding:6px 8px;text-decoration:none;font-size:15px;display:block;text-align:left}.custom-dropdown .dropdown-content a:hover{background-color:#f1f1f1}.custom-dropdown .dropdown:hover .dropdown-content{display:block}.atext{color:#fff!important;text-decoration:none!important}"]
9953
9978
  },] }
9954
9979
  ];
9955
- SelfServiceFlowComponent.ctorParameters = () => [
9980
+ CaseListComponent.ctorParameters = () => [
9956
9981
  { type: SupportRequestService },
9957
- { type: FormBuilder },
9958
9982
  { type: EntityTypeSetupService },
9959
9983
  { type: GlobalService },
9984
+ { type: GridServiceService },
9960
9985
  { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
9961
9986
  ];
9962
- SelfServiceFlowComponent.propDecorators = {
9987
+ CaseListComponent.propDecorators = {
9988
+ EntityTypeId: [{ type: Input }],
9963
9989
  RequesterTypeId: [{ type: Input }],
9964
9990
  RequesterTypeIdEn: [{ type: Input }],
9965
9991
  RequesterId: [{ type: Input }],
@@ -9968,7 +9994,9 @@ SelfServiceFlowComponent.propDecorators = {
9968
9994
  Source: [{ type: Input }],
9969
9995
  Channel: [{ type: Input }],
9970
9996
  ChannelEn: [{ type: Input }],
9971
- ChannelAr: [{ type: Input }]
9997
+ ChannelAr: [{ type: Input }],
9998
+ GridSearchType: [{ type: Input }],
9999
+ IsClientPagination: [{ type: Input }]
9972
10000
  };
9973
10001
 
9974
10002
  class WorkflowDynamicPopupComponent {
@@ -10999,5 +11027,5 @@ SupportRequestModule.decorators = [
10999
11027
  * Generated bundle index. Do not edit.
11000
11028
  */
11001
11029
 
11002
- export { ArcoSupportRequestComponent, ArcoSupportRequestModule, ArcoSupportRequestService, RequestFlowComponent, SupportRequestModule, environment, SearchPipe as ɵa, SupportRequestIndexComponent as ɵb, GridComponent as ɵba, GridDatatypeComponent as ɵbb, InnerGridComponent as ɵbc, HomeComponent as ɵc, ActionComponent as ɵd, EntityTypeSetupService as ɵe, GlobalService as ɵf, SupportRequestService as ɵg, SupportRequestDetailsComponent as ɵh, TaskService as ɵi, GridServiceService as ɵj, TicketApiService as ɵk, SupportRequestCreateComponent as ɵl, AttachmentService as ɵm, PaginationComponent as ɵn, EntityDynamicViewComponent as ɵo, WorkflowDynamicPopupComponent as ɵp, EntityDynamicFieldComponent as ɵq, DynamicDetailsViewComponent as ɵr, ActivitiesCreateComponent as ɵs, ActivitiesViewComponent as ɵt, TranslatePipe as ɵu, FilterPipe as ɵv, UniqueFilterPipe as ɵw, ValidationErrorComponent as ɵx, SelfServiceFlowComponent as ɵy, CaseListComponent as ɵz };
11030
+ export { ArcoSupportRequestComponent, ArcoSupportRequestModule, ArcoSupportRequestService, RequestFlowComponent, SearchPipe, SelfServiceFlowComponent, SupportRequestModule, TranslatePipe, environment, SupportRequestIndexComponent as ɵa, HomeComponent as ɵb, ActionComponent as ɵc, EntityTypeSetupService as ɵd, GlobalService as ɵe, SupportRequestService as ɵf, SupportRequestDetailsComponent as ɵg, TaskService as ɵh, GridServiceService as ɵi, TicketApiService as ɵj, SupportRequestCreateComponent as ɵk, AttachmentService as ɵl, PaginationComponent as ɵm, EntityDynamicViewComponent as ɵn, WorkflowDynamicPopupComponent as ɵo, EntityDynamicFieldComponent as ɵp, DynamicDetailsViewComponent as ɵq, ActivitiesCreateComponent as ɵr, ActivitiesViewComponent as ɵs, FilterPipe as ɵt, UniqueFilterPipe as ɵu, ValidationErrorComponent as ɵv, CaseListComponent as ɵw, GridComponent as ɵx, GridDatatypeComponent as ɵy, InnerGridComponent as ɵz };
11003
11031
  //# sourceMappingURL=arco-support-request.js.map