{"version":3,"file":"customerListCtrl.js","sourceRoot":"","sources":["../../../../src/modules/controllers/master/customerListCtrl.ts"],"names":[],"mappings":"AAAA,IAAO,WAAW,CA+oBjB;AA/oBD,WAAO,WAAW;IACd,IAAc,MAAM,CA6oBnB;IA7oBD,WAAc,MAAM;QAQhB;YAiCI,0BAAoB,MAA0B,EAClC,UAAiD,EAClD,cAA0D,EACzD,EAAgB,EAAU,uBAAuB,EACjD,aAAwD,EACxD,QAA4B,EAC5B,SAAwC,EACxC,eAAmD,EACnD,MAA2B,EAC3B,YAA6B,EAC7B,YAAoC;gBAVhD,iBA6BC;gBA7BmB,WAAM,GAAN,MAAM,CAAoB;gBAClC,eAAU,GAAV,UAAU,CAAuC;gBAClD,mBAAc,GAAd,cAAc,CAA4C;gBACzD,OAAE,GAAF,EAAE,CAAc;gBAAU,4BAAuB,GAAvB,uBAAuB,CAAA;gBACjD,kBAAa,GAAb,aAAa,CAA2C;gBACxD,aAAQ,GAAR,QAAQ,CAAoB;gBAC5B,cAAS,GAAT,SAAS,CAA+B;gBACxC,oBAAe,GAAf,eAAe,CAAoC;gBACnD,WAAM,GAAN,MAAM,CAAqB;gBAC3B,iBAAY,GAAZ,YAAY,CAAiB;gBAC7B,iBAAY,GAAZ,YAAY,CAAwB;gBA7BhD,cAAS,GAAY,KAAK,CAAC;gBAG3B,oBAAe,GAAY,KAAK,CAAC;gBAGjC,mBAAc,GAAsC,EACnD,CAAC;gBAEF,sBAAiB,GAAG;oBAChB,UAAU,EAAE,CAAC;oBACb,QAAQ,EAAE,EAAE;iBACf,CAAC;gBA4FK,iBAAY,GAA8B;oBAC7C,IAAI,EAAE,EAAE;oBACR,aAAa,EAAE,IAAI;oBACnB,eAAe,EAAE,IAAI;oBACrB,oBAAoB,EAAE,IAAI;oBAC1B,cAAc,EAAE,KAAK;oBACrB,kBAAkB,EAAE,IAAI;oBACxB,WAAW,EAAE,KAAK;oBAClB,oBAAoB,EAAE,IAAI;oBAC1B,kBAAkB,EAAE,K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interface ICustomerParams extends ng.ui.IStateParamsService {\r\n }\r\n\r\n export class customerListCtrl {\r\n static $inject = [\"$scope\",\r\n \"$rootScope\",\r\n \"generalService\",\r\n \"$q\",\r\n \"bsLoadingOverlayService\",\r\n \"entityService\",\r\n \"$timeout\",\r\n \"$uibModal\",\r\n \"customerService\",\r\n \"$state\",\r\n \"$stateParams\",\r\n \"$transitions\",\r\n ];\r\n IsLoading: boolean = false;\r\n gridApi: uiGrid.IGridApi;\r\n allDirtyRows: Array;\r\n searchAccordian: boolean = false;\r\n myHook: any;\r\n \r\n customerSearch: interfaces.master.ICustomerSearch = {\r\n };\r\n\r\n paginationOptions = {\r\n pageNumber: 1,\r\n pageSize: 25\r\n };\r\n\r\n ctrlName: string;\r\n \r\n sortName: string;\r\n sortDirection: string;\r\n\r\n constructor(private $scope: ICustomerCtrlScope,\r\n private $rootScope: interfaces.applicationcore.IRootScope,\r\n public generalService: interfaces.applicationcore.IGeneralService,\r\n private $q: ng.IQService, private bsLoadingOverlayService,\r\n private entityService: interfaces.applicationcore.IEntityService,\r\n private $timeout: ng.ITimeoutService,\r\n private $uibModal: ng.ui.bootstrap.IModalService,\r\n private customerService: interfaces.master.ICustomerService,\r\n private $state: ng.ui.IStateService,\r\n private $stateParams: ICustomerParams,\r\n private $transitions: ng.ui.core.ITransition\r\n ) {\r\n this.customerSearch = {\r\n };\r\n \r\n this.ctrlName = 'Customer List Controller';\r\n\r\n this.loadCustomers();\r\n\r\n this.myHook = $transitions.onSuccess({\r\n to: 'auth.MasterData.Customer',\r\n from: 'auth.MasterData.Customer.**'\r\n }, () => {\r\n this.loadCustomers();\r\n });\r\n\r\n $scope.$on('$destroy', () => {\r\n $transitions.onStart({}, this.myHook)\r\n });\r\n }\r\n\r\n loadCustomers() {\r\n this.bsLoadingOverlayService.wrap({\r\n referenceId: 'customerList'\r\n },\r\n () => {\r\n var searchObject: interfaces.applicationcore.ISearchObject = {\r\n filters: [],\r\n sorts: []\r\n }\r\n\r\n angular.forEach(this.customerSearch, (n, key) => {\r\n if (n[\"Id\"]) {\r\n searchObject.filters.push({ Name: key, Value: n.Id });\r\n } else {\r\n searchObject.filters.push({ Name: key, Value: n });\r\n }\r\n });\r\n\r\n if (this.gridApi) {\r\n var grid = this.gridApi.grid;\r\n angular.forEach(grid.columns, (n: uiGrid.IGridColumn) => {\r\n if (n.filters[0].term) {\r\n searchObject.filters.push({ Name: n.name, Value: n.filters[0].term });\r\n }\r\n\r\n if (n.sort.direction) {\r\n searchObject.sorts.push({\r\n Name: n.name,\r\n SortDirection: n.sort.direction === \"asc\" ? 0 : 1,\r\n SortOrder: n.sort.priority\r\n });\r\n }\r\n });\r\n }\r\n\r\n var params = {\r\n connectSearch: searchObject,\r\n numberRecords: this.paginationOptions.pageSize,\r\n pageNumber: this.paginationOptions.pageNumber,\r\n }\r\n\r\n return this.customerService.getList().query(params, (result: Array) => {\r\n this.gvwCustomers.data = result;\r\n if (result[0]) {\r\n this.gvwCustomers.totalItems = result[0].NumRecs;\r\n } else {\r\n this.gvwCustomers.totalItems = 0;\r\n }\r\n }, (errorResponse) => {\r\n this.generalService.displayMessageHandler(errorResponse.data);\r\n }).$promise;\r\n });\r\n }\r\n\r\n public gvwCustomers: uiGrid.IGridOptions | any = {\r\n data: [],\r\n enableSorting: true,\r\n enableFiltering: true,\r\n useExternalFiltering: true,\r\n enableCellEdit: false,\r\n useExternalSorting: true,\r\n multiSelect: false,\r\n enableColumnResizing: true,\r\n enableRowSelection: false,\r\n enableFullRowSelection: false,\r\n enableRowHeaderSelection: false,\r\n enableHorizontalScrollbar: 2,\r\n enablePinning: false,\r\n rowEditWaitInterval: -1,\r\n paginationPageSizes: [25, 50, 75, 100],\r\n paginationPageSize: 25,\r\n enableVerticalScrollbar: 1,\r\n useExternalPagination: true,\r\n enableGridMenu: false,\r\n exporterMenuCsv: false,\r\n exporterMenuPdf: false,\r\n exporterMenuExcel: false,\r\n gridMenuShowHideColumns: false,\r\n exporterFieldCallback: (grid, row, col, value) => {\r\n return this.generalService.handleValue(value);\r\n },\r\n exporterSuppressColumns: ['EDIT', 'NUMRECS'],\r\n onRegisterApi: (gridApi) => { this.registerGridApi(gridApi) },\r\n columnDefs: [{\r\n name: \"EDIT\",\r\n displayName: \"\",\r\n enableFiltering: false,\r\n cellTemplate: `\r\n
\r\n \r\n
`,\r\n enableSorting: false,\r\n enableColumnMenu: false,\r\n width: 35\r\n }, {\r\n name: \"EntityCode\",\r\n displayName: \"Entity\",\r\n field: \"EntityCode\",\r\n width: 100,\r\n filterHeaderTemplate: `\r\n
\r\n
\r\n \r\n
\r\n
`,\r\n cellTemplate: `
{{MODEL_COL_FIELD}}
`,\r\n }, {\r\n name: \"Code\",\r\n displayName: \"Code\",\r\n field: \"Code\",\r\n width: 100,\r\n filterHeaderTemplate: `\r\n
\r\n
\r\n \r\n
\r\n
`,\r\n cellTemplate: `
{{MODEL_COL_FIELD}}
`,\r\n }, {\r\n name: \"Name\",\r\n displayName: \"Name\",\r\n field: \"Name\",\r\n width: 300,\r\n filterHeaderTemplate: `\r\n
\r\n
\r\n \r\n
\r\n
`,\r\n cellTemplate: `
{{MODEL_COL_FIELD}}
`,\r\n },\r\n {\r\n name: \"AlternateReference\",\r\n displayName: \"Alternate Reference\",\r\n field: \"AlternateReference\",\r\n width: 200,\r\n filterHeaderTemplate: `\r\n
\r\n
\r\n \r\n
\r\n
`,\r\n cellTemplate: `
{{MODEL_COL_FIELD}}
`,\r\n },\r\n {\r\n name: \"CountryCode\",\r\n displayName: \"Country\",\r\n field: \"CountryCode\",\r\n width: 100,\r\n filterHeaderTemplate: `\r\n
\r\n
\r\n \r\n
\r\n
`,\r\n cellTemplate: `
{{MODEL_COL_FIELD}}
`,\r\n },\r\n {\r\n name: \"CompanyType\",\r\n displayName: \"Type\",\r\n field: \"CompanyType\",\r\n width: 200,\r\n filterHeaderTemplate: `\r\n
\r\n
\r\n \r\n
\r\n
`,\r\n cellTemplate: `
{{MODEL_COL_FIELD}}
`,\r\n },\r\n {\r\n name: \"CurrencyCode\",\r\n displayName: \"Currency\",\r\n field: \"CurrencyCode\",\r\n width: 100,\r\n filterHeaderTemplate: `\r\n
\r\n
\r\n \r\n
\r\n
`,\r\n cellTemplate: `
{{MODEL_COL_FIELD}}
`,\r\n },\r\n {\r\n name: \"IncotermCode\",\r\n displayName: \"Incoterm\",\r\n field: \"IncotermCode\",\r\n width: 100,\r\n filterHeaderTemplate: `\r\n
\r\n
\r\n \r\n
\r\n
`,\r\n cellTemplate: `
{{MODEL_COL_FIELD}}
`,\r\n },\r\n {\r\n name: \"IsZeroRated\",\r\n displayName: \"Zero Rated?\",\r\n field: \"IsZeroRated\",\r\n width: 100,\r\n filterHeaderTemplate: `\r\n
\r\n
\r\n \r\n
\r\n
`,\r\n cellTemplate: `
{{MODEL_COL_FIELD}}
`,\r\n },\r\n {\r\n name: \"CompanyStatus\",\r\n displayName: \"Status\",\r\n field: \"CompanyStatus\",\r\n width: 200,\r\n filterHeaderTemplate: `\r\n
\r\n
\r\n \r\n
\r\n
`,\r\n cellTemplate: `
{{MODEL_COL_FIELD}}
`,\r\n }\r\n ]\r\n };\r\n\r\n public registerGridApi(gridApi: uiGrid.IGridApi) {\r\n this.gridApi = gridApi;\r\n\r\n this.gridApi.core.on.filterChanged(this.$scope, () => { this.comListFilterChange(gridApi) });\r\n this.gridApi.core.on.sortChanged(this.$scope, (grid, sortColumns) => {\r\n this.comListShortChange(gridApi);\r\n if (sortColumns[0]) {\r\n this.sortName = sortColumns[0].name;\r\n this.sortDirection = sortColumns[0].sort.direction;\r\n }\r\n else {\r\n this.sortName = \"\";\r\n this.sortDirection = \"\";\r\n }\r\n });\r\n\r\n\r\n this.gridApi.pagination.on.paginationChanged(this.$scope, (newPage, pageSize) => { this.ListPageChange(newPage, pageSize) });\r\n\r\n this.gridApi.cellNav.on.navigate(this.$scope, (newCol) => {\r\n this.$timeout(() => {\r\n this.gridApi.selection.selectRow(newCol.row.entity);\r\n });\r\n });\r\n }\r\n\r\n comListShortChange(gridApi) {\r\n this.DoSearch();\r\n }\r\n\r\n comListFilterChange(gridApi: uiGrid.IGridApi) {\r\n this.DoSearch();\r\n }\r\n\r\n public editCustomer(id: number) {\r\n this.$state.go(\"auth.MasterData.Customer.Update\", { comId: id });\r\n }\r\n\r\n ListPageChange(newPage, pageSize) {\r\n var dirtyRows = _.map(this.gridApi.rowEdit.getDirtyRows(), (value) => { return value.entity; });\r\n if (this.allDirtyRows) {\r\n _.forEach(dirtyRows, (value) => {\r\n //If a dirty row exists in the new dirty rows then overwrite the old one.\r\n var row: interfaces.master.ICustomerDisplay = _.find(this.allDirtyRows, _.matchesProperty('Id', value.Id));\r\n\r\n if (row) {\r\n //Row exists with the same Id.\r\n var i: number = _.indexOf(this.allDirtyRows, row);\r\n this.allDirtyRows[i] = row;\r\n }\r\n else {\r\n this.allDirtyRows = _.concat(this.allDirtyRows, value);\r\n }\r\n });\r\n }\r\n else {\r\n this.allDirtyRows = dirtyRows;\r\n }\r\n\r\n this.paginationOptions.pageNumber = newPage;\r\n this.paginationOptions.pageSize = pageSize;\r\n\r\n this.DoSearch();\r\n }\r\n\r\n loadEntities(searchText: string) {\r\n return this.entityService.getDropdownList(searchText).query(\r\n () => {\r\n }, (failureData) => {\r\n }).$promise;\r\n }\r\n\r\n showAll_click() {\r\n this.customerSearch = {\r\n };\r\n if (this.gridApi !== undefined) {\r\n this.gridApi.grid.clearAllFilters(true, true, true).then(() => {\r\n this.gridApi.grid.resetColumnSorting(null);\r\n });\r\n }\r\n\r\n this.searchAccordian = false;\r\n this.DoSearch();\r\n }\r\n\r\n search_click() {\r\n this.searchAccordian = false;\r\n this.DoSearch();\r\n }\r\n\r\n downloadToExcel() {\r\n this.IsLoading = true;\r\n\r\n var searchObject: interfaces.applicationcore.ISearchObject = {\r\n filters: [],\r\n sorts: []\r\n }\r\n angular.forEach(this.customerSearch, (n, key) => {\r\n\r\n if (n[\"Id\"]) {\r\n searchObject.filters.push({ Name: key, Value: n.Id });\r\n } else {\r\n searchObject.filters.push({ Name: key, Value: n });\r\n }\r\n });\r\n\r\n if (this.gridApi) {\r\n\r\n var grid = this.gridApi.grid;\r\n\r\n angular.forEach(grid.columns, (n: uiGrid.IGridColumn) => {\r\n if (n.filters[0].term) {\r\n searchObject.filters.push({ Name: n.name, Value: n.filters[0].term });\r\n }\r\n\r\n if (n.sort.direction) {\r\n searchObject.sorts.push({\r\n Name: n.name,\r\n SortDirection: n.sort.direction === \"asc\" ? 0 : 1,\r\n SortOrder: n.sort.priority\r\n });\r\n }\r\n });\r\n }\r\n\r\n var params = {\r\n connectSearch: searchObject\r\n }\r\n\r\n this.customerService.getCustomerListExcel(params).then(() => {\r\n this.IsLoading = false;\r\n }, (data) => {\r\n this.IsLoading = false;\r\n this.gvwCustomers.data = [];\r\n this.gvwCustomers.totalItems = 0;\r\n this.generalService.displayMessageHandler(data.data);\r\n });\r\n }\r\n\r\n DoSearch() {\r\n this.bsLoadingOverlayService.wrap({\r\n referenceId: 'customerList'\r\n },\r\n () => {\r\n var searchObject: interfaces.applicationcore.ISearchObject = {\r\n filters: [],\r\n sorts: []\r\n }\r\n\r\n angular.forEach(this.customerSearch, (n, key) => {\r\n if (n) {\r\n if (n[\"Id\"]) {\r\n searchObject.filters.push({ Name: key, Value: n.Id });\r\n } else {\r\n if (n instanceof moment) {\r\n searchObject.filters.push({ Name: key, Value: n });\r\n } else {\r\n searchObject.filters.push({ Name: key, Value: n });\r\n }\r\n }\r\n }\r\n });\r\n\r\n if (this.gridApi) {\r\n var grid = this.gridApi.grid;\r\n angular.forEach(grid.columns, (n: uiGrid.IGridColumn) => {\r\n if (n.filters[0].term) {\r\n searchObject.filters.push({ Name: n.name, Value: n.filters[0].term });\r\n }\r\n\r\n if (n.sort.direction) {\r\n searchObject.sorts.push({\r\n Name: n.name,\r\n SortDirection: n.sort.direction === \"asc\" ? 0 : 1,\r\n SortOrder: n.sort.priority\r\n });\r\n }\r\n });\r\n }\r\n\r\n var params = {\r\n connectSearch: searchObject,\r\n numberRecords: this.paginationOptions.pageSize,\r\n pageNumber: this.paginationOptions.pageNumber,\r\n }\r\n\r\n return this.customerService.getList().query(params, (result: Array) => {\r\n var currentDirtyRows: Array = [];\r\n\r\n _.forEach(this.allDirtyRows, function (value) {\r\n var row: interfaces.master.ICustomerDisplay = _.find(result, _.matchesProperty('Id', value.Id));\r\n\r\n if (row) {\r\n var i: number = _.indexOf(result, row);\r\n result[i] = value;\r\n currentDirtyRows.push(result[i]);\r\n }\r\n });\r\n\r\n this.gvwCustomers.data = result;\r\n\r\n if (currentDirtyRows.length > 0) {\r\n this.$timeout(() => {\r\n _.forEach(currentDirtyRows, (value) => {\r\n this.gridApi.rowEdit.setRowsDirty(currentDirtyRows);\r\n });\r\n });\r\n }\r\n\r\n if (result[0]) {\r\n this.gvwCustomers.totalItems = result[0].NumRecs;\r\n } else {\r\n this.gvwCustomers.totalItems = 0;\r\n }\r\n }, (errorResponse) => {\r\n this.generalService.displayMessageHandler(errorResponse.data);\r\n }).$promise;\r\n });\r\n }\r\n\r\n\r\n UploadFromExcel() {\r\n this.$uibModal.open({\r\n animation: true,\r\n size: \"md\",\r\n template: `\r\n
\r\n

Upload from Excel

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n {{uploadExcelCtrl.repositoryFile.filename}}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n `,\r\n controller: class uploadExcelCtrl {\r\n\r\n disableSubmit: boolean = false;\r\n messages: interfaces.applicationcore.IMessage[];\r\n \r\n repositoryFile: interfaces.applicationcore.IRepositoryFile;\r\n fileTemplate: interfaces.applicationcore.IDropdownModel;\r\n\r\n fileTemplateList: interfaces.applicationcore.IDropdownModel[] = [];\r\n\r\n viewFileTemplateRight: boolean = false;\r\n\r\n productsExcelData: interfaces.master.IProductExcelData;\r\n\r\n constructor($scope, private $uibModalInstance: angular.ui.bootstrap.IModalInstanceService,\r\n private countryService: interfaces.applicationcore.ICountryService,\r\n private entityService: interfaces.applicationcore.IEntityService,\r\n private customerService: interfaces.master.ICustomerService,\r\n public generalService: interfaces.applicationcore.IGeneralService,\r\n private $rootScope: interfaces.applicationcore.IRootScope,\r\n private $state: ng.ui.IStateService,\r\n private refundClaimTypeService: interfaces.tariff.IRefundClaimTypeService,\r\n public bsLoadingOverlayService,\r\n private fileTemplateService: interfaces.master.IFileTemplateService,\r\n private menuService: interfaces.applicationcore.IMenuService, \r\n private entityId: number\r\n ) {\r\n\r\n }\r\n\r\n getViewFileTemplateRight() {\r\n this.viewFileTemplateRight = false;\r\n return this.menuService.getGTSConnectMenuItem(703).get((result: interfaces.applicationcore.IMenu) => {\r\n if (result.name) {\r\n this.viewFileTemplateRight = true;\r\n }\r\n }).$promise;\r\n }\r\n\r\n\r\n designTemplateClick_click(){\r\n var url = '/#!/MasterData/FileTemplates';\r\n window.open(url, '_blank');\r\n }\r\n\r\n \r\n\r\n cancel() {\r\n this.$uibModalInstance.close(false);\r\n }\r\n\r\n upload() {\r\n this.disableSubmit = true;\r\n \r\n\r\n this.bsLoadingOverlayService.wrap({\r\n referenceId: 'cominv.excelupload'\r\n },\r\n () => {\r\n\r\n return this.customerService.uploadCustomerConsigneeFromExcel().save(this.repositoryFile, (result) => {\r\n this.generalService.displayMessageHandler(result);\r\n if (!result.HasErrorMessage) {\r\n this.$uibModalInstance.close(true);\r\n }\r\n\r\n this.$uibModalInstance.close(true);\r\n }, (errorResult) => {\r\n this.generalService.displayMessageHandler(errorResult.data);\r\n\r\n if (errorResult.data.Messages) {\r\n this.messages = [];\r\n }\r\n\r\n angular.forEach(errorResult.data.Messages, (o) => {\r\n angular.forEach(o.MessageItems, (n) => {\r\n this.messages.push(n);\r\n });\r\n });\r\n }).$promise;\r\n\r\n });\r\n }\r\n },\r\n controllerAs: \"uploadExcelCtrl\",\r\n resolve: \r\n { \r\n entityId : this.$rootScope.Entity.Id\r\n }\r\n }).result.then((result) => {\r\n if (result) {\r\n this.loadCustomers();\r\n }\r\n });\r\n }\r\n\r\n }\r\n\r\n angular.module(\"app\").controller(\"customerListCtrl\", controllers.master.customerListCtrl);\r\n }\r\n}"]}