@hitsoft/smart-warehouse 1.0.1

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.
Files changed (120) hide show
  1. package/README.md +24 -0
  2. package/config/enums/index.d.ts +1 -0
  3. package/config/enums/route-names.d.ts +12 -0
  4. package/config/index.d.ts +5 -0
  5. package/config/providers/connector-params-route.provider.d.ts +8 -0
  6. package/config/providers/index.d.ts +7 -0
  7. package/config/providers/order-station-route.provider.d.ts +8 -0
  8. package/config/providers/orders-route.provider.d.ts +8 -0
  9. package/config/providers/quantity-correction-route.provider.d.ts +8 -0
  10. package/config/providers/route.provider.d.ts +8 -0
  11. package/config/providers/shelf-placement-route.provider.d.ts +8 -0
  12. package/config/providers/shelf-transfer-route.provider.d.ts +8 -0
  13. package/config/providers/shortages-route.provider.d.ts +8 -0
  14. package/config/providers/station.provider.d.ts +8 -0
  15. package/config/providers/stock-report.d.ts +8 -0
  16. package/config/public-api.d.ts +3 -0
  17. package/config/smart-warehouse-config.module.d.ts +8 -0
  18. package/esm2020/config/enums/index.mjs +2 -0
  19. package/esm2020/config/enums/route-names.mjs +2 -0
  20. package/esm2020/config/hitsoft-smart-warehouse-config.mjs +5 -0
  21. package/esm2020/config/providers/connector-params-route.provider.mjs +25 -0
  22. package/esm2020/config/providers/index.mjs +8 -0
  23. package/esm2020/config/providers/order-station-route.provider.mjs +25 -0
  24. package/esm2020/config/providers/orders-route.provider.mjs +25 -0
  25. package/esm2020/config/providers/quantity-correction-route.provider.mjs +25 -0
  26. package/esm2020/config/providers/route.provider.mjs +24 -0
  27. package/esm2020/config/providers/shelf-placement-route.provider.mjs +25 -0
  28. package/esm2020/config/providers/shelf-transfer-route.provider.mjs +25 -0
  29. package/esm2020/config/providers/shortages-route.provider.mjs +25 -0
  30. package/esm2020/config/providers/station.provider.mjs +25 -0
  31. package/esm2020/config/providers/stock-report.mjs +25 -0
  32. package/esm2020/config/public-api.mjs +4 -0
  33. package/esm2020/config/smart-warehouse-config.module.mjs +37 -0
  34. package/esm2020/hitsoft-smart-warehouse.mjs +5 -0
  35. package/esm2020/lib/components/connector-params/connector-params.component.mjs +182 -0
  36. package/esm2020/lib/components/connector-params/connector-params.module.mjs +41 -0
  37. package/esm2020/lib/components/order-station/order-station.component.mjs +160 -0
  38. package/esm2020/lib/components/order-station/order-station.module.mjs +57 -0
  39. package/esm2020/lib/components/orders/orders.component.mjs +445 -0
  40. package/esm2020/lib/components/orders/orders.module.mjs +75 -0
  41. package/esm2020/lib/components/quantity-correction/quantity-correction.component.mjs +231 -0
  42. package/esm2020/lib/components/quantity-correction/quantity-correction.module.mjs +41 -0
  43. package/esm2020/lib/components/shelf-placement/shelf-placement.component.mjs +297 -0
  44. package/esm2020/lib/components/shelf-placement/shelf-placement.module.mjs +66 -0
  45. package/esm2020/lib/components/shelf-transfer/shelf-transfer.component.mjs +146 -0
  46. package/esm2020/lib/components/shelf-transfer/shelf-transfer.module.mjs +41 -0
  47. package/esm2020/lib/components/shortages/shortages.component.mjs +75 -0
  48. package/esm2020/lib/components/shortages/shortages.module.mjs +42 -0
  49. package/esm2020/lib/components/smart-warehouse.component.mjs +18 -0
  50. package/esm2020/lib/components/stock-report/stock-report.component.mjs +29 -0
  51. package/esm2020/lib/components/stock-report/stock-report.module.mjs +42 -0
  52. package/esm2020/lib/guards/connector-params.guard.mjs +58 -0
  53. package/esm2020/lib/hit-proxy/connector-params/connector-params.service.mjs +27 -0
  54. package/esm2020/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.mjs +2 -0
  55. package/esm2020/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.mjs +62 -0
  56. package/esm2020/lib/hit-proxy/inventory/inventory.service.mjs +21 -0
  57. package/esm2020/lib/hit-proxy/order-station/order-station.service.mjs +18 -0
  58. package/esm2020/lib/hit-proxy/orders/model.mjs +2 -0
  59. package/esm2020/lib/hit-proxy/orders/order.service.mjs +81 -0
  60. package/esm2020/lib/hit-proxy/quantity-correction/quantity-correction.service.mjs +47 -0
  61. package/esm2020/lib/hit-proxy/shortages/model.mjs +2 -0
  62. package/esm2020/lib/hit-proxy/shortages/shortages.service.mjs +26 -0
  63. package/esm2020/lib/hit-proxy/stations/station.service.mjs +86 -0
  64. package/esm2020/lib/hit-proxy/stock-report/stock-report.service.mjs +22 -0
  65. package/esm2020/lib/hit-proxy/stock-transfer/stock-transfer.service.mjs +21 -0
  66. package/esm2020/lib/hit-proxy/warehouse/warehouse.service.mjs +65 -0
  67. package/esm2020/lib/services/smart-warehouse.service.mjs +21 -0
  68. package/esm2020/lib/smart-warehouse-routing.module.mjs +79 -0
  69. package/esm2020/lib/smart-warehouse.module.mjs +34 -0
  70. package/esm2020/lib/stations/station.component.mjs +43 -0
  71. package/esm2020/lib/stations/station.module.mjs +42 -0
  72. package/esm2020/public-api.mjs +20 -0
  73. package/fesm2015/hitsoft-smart-warehouse-config.mjs +264 -0
  74. package/fesm2015/hitsoft-smart-warehouse-config.mjs.map +1 -0
  75. package/fesm2015/hitsoft-smart-warehouse.mjs +2577 -0
  76. package/fesm2015/hitsoft-smart-warehouse.mjs.map +1 -0
  77. package/fesm2020/hitsoft-smart-warehouse-config.mjs +264 -0
  78. package/fesm2020/hitsoft-smart-warehouse-config.mjs.map +1 -0
  79. package/fesm2020/hitsoft-smart-warehouse.mjs +2515 -0
  80. package/fesm2020/hitsoft-smart-warehouse.mjs.map +1 -0
  81. package/index.d.ts +5 -0
  82. package/lib/components/connector-params/connector-params.component.d.ts +44 -0
  83. package/lib/components/connector-params/connector-params.module.d.ts +13 -0
  84. package/lib/components/order-station/order-station.component.d.ts +31 -0
  85. package/lib/components/order-station/order-station.module.d.ts +16 -0
  86. package/lib/components/orders/orders.component.d.ts +63 -0
  87. package/lib/components/orders/orders.module.d.ts +17 -0
  88. package/lib/components/quantity-correction/quantity-correction.component.d.ts +52 -0
  89. package/lib/components/quantity-correction/quantity-correction.module.d.ts +16 -0
  90. package/lib/components/shelf-placement/shelf-placement.component.d.ts +93 -0
  91. package/lib/components/shelf-placement/shelf-placement.module.d.ts +17 -0
  92. package/lib/components/shelf-transfer/shelf-transfer.component.d.ts +26 -0
  93. package/lib/components/shelf-transfer/shelf-transfer.module.d.ts +16 -0
  94. package/lib/components/shortages/shortages.component.d.ts +25 -0
  95. package/lib/components/shortages/shortages.module.d.ts +17 -0
  96. package/lib/components/smart-warehouse.component.d.ts +10 -0
  97. package/lib/components/stock-report/stock-report.component.d.ts +16 -0
  98. package/lib/components/stock-report/stock-report.module.d.ts +17 -0
  99. package/lib/guards/connector-params.guard.d.ts +21 -0
  100. package/lib/hit-proxy/connector-params/connector-params.service.d.ts +46 -0
  101. package/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.d.ts +8 -0
  102. package/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.d.ts +17 -0
  103. package/lib/hit-proxy/inventory/inventory.service.d.ts +22 -0
  104. package/lib/hit-proxy/order-station/order-station.service.d.ts +24 -0
  105. package/lib/hit-proxy/orders/model.d.ts +74 -0
  106. package/lib/hit-proxy/orders/order.service.d.ts +26 -0
  107. package/lib/hit-proxy/quantity-correction/quantity-correction.service.d.ts +88 -0
  108. package/lib/hit-proxy/shortages/model.d.ts +17 -0
  109. package/lib/hit-proxy/shortages/shortages.service.d.ts +13 -0
  110. package/lib/hit-proxy/stations/station.service.d.ts +25 -0
  111. package/lib/hit-proxy/stock-report/stock-report.service.d.ts +12 -0
  112. package/lib/hit-proxy/stock-transfer/stock-transfer.service.d.ts +19 -0
  113. package/lib/hit-proxy/warehouse/warehouse.service.d.ts +59 -0
  114. package/lib/services/smart-warehouse.service.d.ts +10 -0
  115. package/lib/smart-warehouse-routing.module.d.ts +7 -0
  116. package/lib/smart-warehouse.module.d.ts +13 -0
  117. package/lib/stations/station.component.d.ts +14 -0
  118. package/lib/stations/station.module.d.ts +17 -0
  119. package/package.json +45 -0
  120. package/public-api.d.ts +16 -0
@@ -0,0 +1,2515 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, ViewChild, NgModule, ViewEncapsulation } from '@angular/core';
3
+ import * as i1 from '@abp/ng.core';
4
+ import { CoreModule, LazyModuleFactory } from '@abp/ng.core';
5
+ import * as i2 from '@abp/ng.theme.shared';
6
+ import { ThemeSharedModule } from '@abp/ng.theme.shared';
7
+ import { locale } from 'devextreme/localization';
8
+ import * as i1$1 from '@angular/router';
9
+ import { RouterModule } from '@angular/router';
10
+ import * as i5 from '@angular/forms';
11
+ import { FormsModule } from '@angular/forms';
12
+ import { NgbCollapseModule, NgbDatepickerModule, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
13
+ import { NgxValidateCoreModule } from '@ngx-validate/core';
14
+ import { CommercialUiModule } from '@volo/abp.commercial.ng.ui';
15
+ import * as i5$1 from '@abp/ng.components/page';
16
+ import { PageModule } from '@abp/ng.components/page';
17
+ import DataSource from 'devextreme/data/data_source';
18
+ import * as AspNetData from 'devextreme-aspnet-data-nojquery';
19
+ import * as i4 from '@angular/common';
20
+ import * as i6 from 'devextreme-angular';
21
+ import { DxDataGridModule, DxPopupModule, DxNumberBoxModule, DxButtonModule, DxSelectBoxModule } from 'devextreme-angular';
22
+ import * as i7 from 'devextreme-angular/ui/nested';
23
+ import * as i8 from 'devextreme-angular/core';
24
+ import CustomStore from 'devextreme/data/custom_store';
25
+ import { firstValueFrom, of, forkJoin } from 'rxjs';
26
+ import { map, catchError } from 'rxjs/operators';
27
+
28
+ class SmartWarehouseService {
29
+ constructor(restService) {
30
+ this.restService = restService;
31
+ this.apiName = 'SmartWarehouse';
32
+ }
33
+ sample() {
34
+ return this.restService.request({ method: 'GET', url: '/api/SmartWarehouse/sample' }, { apiName: this.apiName });
35
+ }
36
+ }
37
+ SmartWarehouseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
38
+ SmartWarehouseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseService, providedIn: 'root' });
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseService, decorators: [{
40
+ type: Injectable,
41
+ args: [{
42
+ providedIn: 'root',
43
+ }]
44
+ }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
45
+
46
+ class SmartWarehouseComponent {
47
+ constructor(service) {
48
+ this.service = service;
49
+ }
50
+ ngOnInit() {
51
+ this.service.sample().subscribe(console.log);
52
+ }
53
+ }
54
+ SmartWarehouseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseComponent, deps: [{ token: SmartWarehouseService }], target: i0.ɵɵFactoryTarget.Component });
55
+ SmartWarehouseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SmartWarehouseComponent, selector: "lib-smart-warehouse", ngImport: i0, template: ` <p>smart-warehouse works!</p> `, isInline: true });
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseComponent, decorators: [{
57
+ type: Component,
58
+ args: [{ selector: 'lib-smart-warehouse', template: ` <p>smart-warehouse works!</p> ` }]
59
+ }], ctorParameters: function () { return [{ type: SmartWarehouseService }]; } });
60
+
61
+ class DevexpressRestService {
62
+ constructor(envService, toaster) {
63
+ this.envService = envService;
64
+ this.toaster = toaster;
65
+ this.createStore = (options) => AspNetData.createStore({
66
+ key: options.key,
67
+ loadParams: options.params,
68
+ loadUrl: `${this.envService.getEnvironment().apis.SmartWarehouse.url + '/' + options.loadUrl}`,
69
+ insertUrl: options.insertUrl
70
+ ? `${this.envService.getEnvironment().apis.SmartWarehouse.url + '/' + options.insertUrl}`
71
+ : undefined,
72
+ insertMethod: 'POST',
73
+ updateUrl: options.updateUrl
74
+ ? `${this.envService.getEnvironment().apis.SmartWarehouse.url + '/' + options.updateUrl}`
75
+ : undefined,
76
+ updateMethod: 'PUT',
77
+ deleteUrl: options.deleteUrl
78
+ ? `${this.envService.getEnvironment().apis.SmartWarehouse.url + '/' + options.deleteUrl}`
79
+ : undefined,
80
+ deleteMethod: 'DELETE',
81
+ onBeforeSend(operation, ajaxSettings) {
82
+ if (operation === 'insert' || operation === 'update' || operation === 'delete') {
83
+ if (operation === 'delete') {
84
+ ajaxSettings.url =
85
+ ajaxSettings.url + '/' + localStorage.getItem('appointment-deleted-id');
86
+ }
87
+ ajaxSettings.contentType = 'application/json';
88
+ ajaxSettings.data = ajaxSettings.data.values;
89
+ }
90
+ ajaxSettings.headers = {
91
+ Authorization: 'Bearer ' + localStorage.getItem('access_token'),
92
+ };
93
+ },
94
+ onAjaxError: this.onAjaxError,
95
+ });
96
+ }
97
+ onAjaxError(e) {
98
+ try {
99
+ let jsonObj = e.xhr.responseJSON || JSON.parse(e.xhr.responseText);
100
+ e.error = jsonObj?.error?.message
101
+ ? `${jsonObj.error.message}${jsonObj.error.details ? ' : ' + jsonObj.error.details : ''}`
102
+ : jsonObj?.error || `Server error: ${e.xhr.status} ${e.xhr.statusText}`;
103
+ }
104
+ catch (err) {
105
+ e.error = `Server error: ${e.xhr.status} ${e.xhr.statusText}`;
106
+ }
107
+ }
108
+ }
109
+ DevexpressRestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DevexpressRestService, deps: [{ token: i1.EnvironmentService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Injectable });
110
+ DevexpressRestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DevexpressRestService, providedIn: 'root' });
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DevexpressRestService, decorators: [{
112
+ type: Injectable,
113
+ args: [{
114
+ providedIn: 'root',
115
+ }]
116
+ }], ctorParameters: function () { return [{ type: i1.EnvironmentService }, { type: i2.ToasterService }]; } });
117
+
118
+ class OrderService {
119
+ constructor(restService, devexService) {
120
+ this.restService = restService;
121
+ this.devexService = devexService;
122
+ this.apiName = 'SmartWarehouse';
123
+ this.loadOrders = this.devexService.createStore({
124
+ key: 'DocEntry',
125
+ loadUrl: 'api/smart-warehouse/sap-orders/load-orders',
126
+ });
127
+ this.getAllOrders = () => this.restService.request({
128
+ method: 'GET',
129
+ url: '/api/smart-warehouse/sap-orders/get-all-orders',
130
+ }, { apiName: this.apiName });
131
+ this.getOrderByDocEntry = (docEntry) => this.restService.request({
132
+ method: 'GET',
133
+ url: `/api/smart-warehouse/sap-orders/get-order/${docEntry}`,
134
+ }, { apiName: this.apiName });
135
+ this.startTask = (docEntries) => this.restService.request({
136
+ method: 'POST',
137
+ url: '/api/smart-warehouse/sap-orders/start-task',
138
+ body: { docEntries },
139
+ }, { apiName: this.apiName });
140
+ this.approveTask = (docEntries, orderType) => this.restService.request({
141
+ method: 'POST',
142
+ url: '/api/smart-warehouse/sap-orders/approve-task',
143
+ body: { docEntries, orderType },
144
+ }, { apiName: this.apiName });
145
+ this.closeOrder = (docEntries) => this.restService.request({
146
+ method: 'POST',
147
+ url: '/api/smart-warehouse/sap-orders/close-order',
148
+ body: { docEntries },
149
+ }, { apiName: this.apiName });
150
+ // ── Reservation Methods ──
151
+ this.reserveOrders = (docEntries, warehouseCode) => this.restService.request({
152
+ method: 'POST',
153
+ url: '/api/smart-warehouse/sap-reservations/reserve-orders',
154
+ body: { docEntries, warehouseCode },
155
+ }, { apiName: this.apiName });
156
+ this.reserveAllOrders = (warehouseCode, orderType, overwriteExisting = false) => this.restService.request({
157
+ method: 'POST',
158
+ url: '/api/smart-warehouse/sap-reservations/reserve-all-orders',
159
+ body: { warehouseCode, orderType: orderType || '', overwriteExisting },
160
+ }, { apiName: this.apiName });
161
+ this.cancelReservations = (docEntries) => this.restService.request({
162
+ method: 'POST',
163
+ url: '/api/smart-warehouse/sap-reservations/cancel-reservations',
164
+ body: { docEntries },
165
+ }, { apiName: this.apiName });
166
+ this.cancelAllReservations = (orderType) => this.restService.request({
167
+ method: 'POST',
168
+ url: '/api/smart-warehouse/sap-reservations/cancel-all-reservations',
169
+ body: { orderType: orderType || '' },
170
+ }, { apiName: this.apiName });
171
+ this.updateTaskStatus = (docEntries) => this.restService.request({
172
+ method: 'POST',
173
+ url: '/api/smart-warehouse/sap-orders/update-task-status',
174
+ body: { docEntries },
175
+ }, { apiName: this.apiName });
176
+ this.getEmptyBoxes = (stationId, shelfId, boxCount, warehouseCode) => this.restService.request({
177
+ method: 'POST',
178
+ url: '/api/smart-warehouse/sap-orders/get-empty-boxes',
179
+ body: { stationId, shelfId, boxCount, warehouseCode },
180
+ }, { apiName: this.apiName });
181
+ this.getHalfBoxes = (stationId, shelfId, boxCount, warehouseCode) => this.restService.request({
182
+ method: 'POST',
183
+ url: '/api/smart-warehouse/sap-orders/get-half-boxes',
184
+ body: { stationId, shelfId, boxCount, warehouseCode },
185
+ }, { apiName: this.apiName });
186
+ }
187
+ }
188
+ OrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderService, deps: [{ token: i1.RestService }, { token: DevexpressRestService }], target: i0.ɵɵFactoryTarget.Injectable });
189
+ OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderService, providedIn: 'root' });
190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderService, decorators: [{
191
+ type: Injectable,
192
+ args: [{ providedIn: 'root' }]
193
+ }], ctorParameters: function () { return [{ type: i1.RestService }, { type: DevexpressRestService }]; } });
194
+
195
+ class WarehouseService {
196
+ constructor(restService) {
197
+ this.restService = restService;
198
+ this.apiName = 'SmartWarehouse';
199
+ /**
200
+ * U_SWSmartWhs = "Y" olan depoları getirir
201
+ */
202
+ this.getSmartWarehouses = () => this.restService.request({
203
+ method: 'GET',
204
+ url: '/api/smart-warehouse/sap-warehouses/get-smart-warehouses',
205
+ }, { apiName: this.apiName });
206
+ /**
207
+ * Seçilen depoya ait depo yerlerini (bin locations) getirir
208
+ */
209
+ this.getBinLocationsByWarehouse = (whsCode) => this.restService.request({
210
+ method: 'GET',
211
+ url: `/api/smart-warehouse/sap-warehouses/get-bin-locations/${whsCode}`,
212
+ }, { apiName: this.apiName });
213
+ /**
214
+ * Tüm akıllı depolardaki depo yerlerini getirir
215
+ */
216
+ this.getAllBinLocations = () => this.restService.request({
217
+ method: 'GET',
218
+ url: '/api/smart-warehouse/sap-warehouses/get-all-bin-locations',
219
+ }, { apiName: this.apiName });
220
+ /**
221
+ * Belirtilen depo yerindeki stok bilgisini getirir
222
+ */
223
+ this.getBinLocationContent = (binAbsEntry) => this.restService.request({
224
+ method: 'GET',
225
+ url: `/api/smart-warehouse/sap-warehouses/get-bin-location-content/${binAbsEntry}`,
226
+ }, { apiName: this.apiName });
227
+ /**
228
+ * Kalem koduna göre SAP'den kalem adını getirir
229
+ */
230
+ this.getItemNameByCode = (itemCode) => this.restService.request({
231
+ method: 'GET',
232
+ url: `/api/smart-warehouse/sap-warehouses/get-item-name/${itemCode}`,
233
+ }, { apiName: this.apiName });
234
+ /**
235
+ * Barkod üzerinden SAP'den kalem bilgisini getirir
236
+ */
237
+ this.getItemByBarcode = (barcode) => this.restService.request({
238
+ method: 'GET',
239
+ url: `/api/smart-warehouse/sap-warehouses/get-item-by-barcode/${barcode}`,
240
+ }, { apiName: this.apiName });
241
+ /**
242
+ * BinCode üzerinden SAP'den depo yeri bilgisini (AbsEntry) getirir
243
+ */
244
+ this.getBinLocationByBinCode = (binCode) => this.restService.request({
245
+ method: 'GET',
246
+ url: `/api/smart-warehouse/sap-warehouses/get-bin-location-by-bincode/${binCode}`,
247
+ }, { apiName: this.apiName });
248
+ }
249
+ }
250
+ WarehouseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WarehouseService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
251
+ WarehouseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WarehouseService, providedIn: 'root' });
252
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WarehouseService, decorators: [{
253
+ type: Injectable,
254
+ args: [{ providedIn: 'root' }]
255
+ }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
256
+
257
+ class OrdersComponent {
258
+ constructor(orderService, warehouseService, toasterService, confirmationService) {
259
+ this.orderService = orderService;
260
+ this.warehouseService = warehouseService;
261
+ this.toasterService = toasterService;
262
+ this.confirmationService = confirmationService;
263
+ this.selectedOrders = [];
264
+ // Toolbar filters
265
+ this.selectedWarehouse = '';
266
+ this.selectedDate = new Date().toISOString().substring(0, 10);
267
+ this.activeListType = null; // null = tümü, '1' | '2' | '3'
268
+ this.activeStatus = null; // null = tümü, 'beklemede' (0) | 'onayBekliyor' (1) | 'isleniyor' (2) | 'tamamlandi' (3)
269
+ this.statusMap = {
270
+ beklemede: '0',
271
+ onayBekliyor: '1',
272
+ isleniyor: '2',
273
+ tamamlandi: '3',
274
+ };
275
+ // Additional inputs
276
+ this.customInputValue = '';
277
+ this.warehouses = [];
278
+ this.isLoadingWarehouses = false;
279
+ this.isGorevBaslatLoading = false;
280
+ this.isReservationLoading = false;
281
+ this.isBeeCellLoading = false;
282
+ this.bosKasaPopupVisible = false;
283
+ this.bosKasaStationId = 1;
284
+ this.bosKasaShelfId = 1;
285
+ this.bosKasaBoxCount = 5;
286
+ this.bosKasaMode = 'empty';
287
+ }
288
+ ngOnInit() {
289
+ this.loadWarehouses();
290
+ this.setupDataSource();
291
+ }
292
+ loadWarehouses() {
293
+ this.isLoadingWarehouses = true;
294
+ this.warehouseService.getSmartWarehouses().subscribe({
295
+ next: (data) => {
296
+ this.warehouses = data || [];
297
+ if (this.warehouses.length > 0) {
298
+ this.selectedWarehouse = this.warehouses[0].WhsCode;
299
+ }
300
+ this.isLoadingWarehouses = false;
301
+ },
302
+ error: (err) => {
303
+ console.error('Depolar yüklenemedi:', err);
304
+ this.toasterService.error('Depolar yüklenemedi.');
305
+ this.isLoadingWarehouses = false;
306
+ }
307
+ });
308
+ }
309
+ setupDataSource() {
310
+ this.ordersDataSource = new DataSource({
311
+ store: this.orderService.loadOrders,
312
+ filter: this.buildCombinedFilter(),
313
+ });
314
+ }
315
+ buildCombinedFilter() {
316
+ const statusFilter = this.buildStatusFilter();
317
+ const listTypeFilter = this.buildListTypeFilter();
318
+ if (statusFilter && listTypeFilter) {
319
+ return [statusFilter, 'and', listTypeFilter];
320
+ }
321
+ return statusFilter || listTypeFilter || null;
322
+ }
323
+ buildListTypeFilter() {
324
+ if (!this.activeListType) {
325
+ return null;
326
+ }
327
+ return ['U_SWOrderType', '=', this.activeListType];
328
+ }
329
+ buildStatusFilter() {
330
+ if (!this.activeStatus) {
331
+ return null;
332
+ }
333
+ if (this.activeStatus === 'beklemede') {
334
+ // SAP'dan gelen U_SWDurum null/boş değerler backend'de '0' olarak normalize ediliyor
335
+ return ['U_SWDurum', '=', '0'];
336
+ }
337
+ return ['U_SWDurum', '=', this.statusMap[this.activeStatus]];
338
+ }
339
+ toggleStatus(key) {
340
+ this.activeStatus = this.activeStatus === key ? null : key;
341
+ this.applyFilters();
342
+ }
343
+ toggleListType(key) {
344
+ this.activeListType = this.activeListType === key ? null : key;
345
+ this.applyFilters();
346
+ }
347
+ applyFilters() {
348
+ // Depo Talepleri de dahil, üç chip de aynı SAP siparişleri kaynağını (U_SWOrderType filtresiyle) kullanır.
349
+ // DataSource yeniden oluşturulup grid'e atanıyor; mevcut DataSource üzerinde .filter()+.reload()
350
+ // çağırmak grid'e yansımıyordu çünkü Angular binding sadece referans değişince tetikleniyor.
351
+ this.ordersDataSource = new DataSource({
352
+ store: this.orderService.loadOrders,
353
+ filter: this.buildCombinedFilter(),
354
+ });
355
+ }
356
+ onSelectionChanged(e) {
357
+ this.selectedOrders = e.selectedRowsData || [];
358
+ }
359
+ onRowClick(e) {
360
+ // Eğer expand/collapse icon'una veya checkbox'a tıklandıysa, DevExtreme'in kendi davranışını kullan
361
+ const target = e.event?.target;
362
+ if (target?.closest('.dx-command-expand') || target?.closest('.dx-master-detail-cell') || target?.closest('.dx-select-checkbox') || target?.closest('.dx-command-select')) {
363
+ return;
364
+ }
365
+ if (e.rowType === 'data') {
366
+ const isExpanded = e.component.isRowExpanded(e.key);
367
+ if (isExpanded) {
368
+ e.component.collapseRow(e.key);
369
+ }
370
+ else {
371
+ e.component.expandRow(e.key);
372
+ }
373
+ }
374
+ }
375
+ onRowPrepared(e) {
376
+ if (e.rowType === 'data' && e.data?.U_SWIsError === 'Y') {
377
+ e.rowElement.classList.add('order-row-error');
378
+ }
379
+ }
380
+ onGorevBaslat() {
381
+ if (!this.selectedOrders || this.selectedOrders.length === 0) {
382
+ this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
383
+ return;
384
+ }
385
+ // Validate: U_SWDurum must be "1" (Onay Bekliyor)
386
+ const invalidStatus = this.selectedOrders.filter(o => o.U_SWDurum !== '1');
387
+ if (invalidStatus.length > 0) {
388
+ const docNums = invalidStatus.map(o => o.DocNum).join(', ');
389
+ this.toasterService.error(`Şu siparişlerin durumu "Onay Bekliyor" değil: ${docNums}. Sadece eşlemesi yapılmış siparişler için görev başlatılabilir.`);
390
+ return;
391
+ }
392
+ // Validate: U_SWStationCode must be filled
393
+ const noStation = this.selectedOrders.filter(o => !o.U_SWStationCode || o.U_SWStationCode.trim() === '');
394
+ if (noStation.length > 0) {
395
+ const docNums = noStation.map(o => o.DocNum).join(', ');
396
+ this.toasterService.error(`Şu siparişlerin istasyon bilgisi boş: ${docNums}. İstasyon alanı dolu olmalıdır.`);
397
+ return;
398
+ }
399
+ const docEntries = this.selectedOrders.map(o => o.DocEntry);
400
+ this.isGorevBaslatLoading = true;
401
+ this.orderService.startTask(docEntries).subscribe({
402
+ next: (result) => {
403
+ this.toasterService.success(result);
404
+ this.isGorevBaslatLoading = false;
405
+ this.dxOrdersInstance?.instance?.refresh();
406
+ this.dxOrdersInstance?.instance?.clearSelection();
407
+ },
408
+ error: (error) => {
409
+ const errorMessage = error?.error?.error?.message || 'Görev başlatılırken bir hata oluştu.';
410
+ this.toasterService.error(errorMessage);
411
+ this.isGorevBaslatLoading = false;
412
+ },
413
+ });
414
+ }
415
+ // Görevi Tamamla: İşleniyor (2) durumundaki siparişleri BeeCell görevi bitmişse doğrudan
416
+ // Tamamlandı'ya (3) götürür — eski "Görev Tamamla" + "Onay Ver" iki adımı, eski sistemin
417
+ // tek-aksiyon davranışına uygun şekilde tek butonda birleştirir.
418
+ onOnayVer() {
419
+ if (!this.selectedOrders || this.selectedOrders.length === 0) {
420
+ this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
421
+ return;
422
+ }
423
+ // Validate: U_SWDurum "2" (İşleniyor) olmalı
424
+ const invalidStatus = this.selectedOrders.filter(o => !o.U_SWDurum || o.U_SWDurum !== '2');
425
+ if (invalidStatus.length > 0) {
426
+ const docNums = invalidStatus.map(o => o.DocNum).join(', ');
427
+ this.toasterService.error(`Şu siparişlerin durumu "İşleniyor" değil: ${docNums}. Sadece bu durumdaki siparişler tamamlanabilir.`);
428
+ return;
429
+ }
430
+ const docEntries = this.selectedOrders.map(o => o.DocEntry);
431
+ this.confirmationService
432
+ .warn('Seçili siparişler tamamlanacak. Stok nakli ve fatura oluşturulacaktır. Emin misiniz?', 'Görevi Tamamla')
433
+ .subscribe((status) => {
434
+ if (status === 'confirm') {
435
+ this.orderService.approveTask(docEntries, this.activeListType).subscribe({
436
+ next: (result) => {
437
+ this.toasterService.success(result);
438
+ this.dxOrdersInstance?.instance?.refresh();
439
+ this.dxOrdersInstance?.instance?.clearSelection();
440
+ },
441
+ error: (error) => {
442
+ const errorMessage = error?.error?.error?.message || 'Onay verilirken bir hata oluştu.';
443
+ this.toasterService.error(errorMessage);
444
+ },
445
+ });
446
+ }
447
+ });
448
+ }
449
+ // ── Sipariş(ler)i sevkiyata sokmadan doğrudan kapat ──
450
+ onSiparisKapat() {
451
+ if (!this.selectedOrders || this.selectedOrders.length === 0) {
452
+ this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
453
+ return;
454
+ }
455
+ // "İşleniyor" (aktif BeeCell görevi) durumundaki siparişler kapatılamaz
456
+ const invalidStatus = this.selectedOrders.filter(o => o.U_SWDurum === '2');
457
+ if (invalidStatus.length > 0) {
458
+ const docNums = invalidStatus.map(o => o.DocNum).join(', ');
459
+ this.toasterService.error(`Şu siparişler "İşleniyor" durumunda (aktif görev var): ${docNums}. Önce görevi tamamlayın ya da BeeCell'de iptal edin.`);
460
+ return;
461
+ }
462
+ const docEntries = this.selectedOrders.map(o => o.DocEntry);
463
+ const docNums = this.selectedOrders.map(o => o.DocNum).join(', ');
464
+ this.confirmationService
465
+ .warn(`${docNums} numaralı siparişler sevkiyata sokulmadan doğrudan "Tamamlandı" olarak kapatılacak. ` +
466
+ 'Hiçbir stok hareketi/irsaliye/fatura oluşturulmayacak. Emin misiniz?', 'Sipariş Kapat')
467
+ .subscribe((status) => {
468
+ if (status === 'confirm') {
469
+ this.orderService.closeOrder(docEntries).subscribe({
470
+ next: (result) => {
471
+ this.toasterService.success(result);
472
+ this.dxOrdersInstance?.instance?.refresh();
473
+ this.dxOrdersInstance?.instance?.clearSelection();
474
+ },
475
+ error: (error) => {
476
+ const errorMessage = error?.error?.error?.message || 'Sipariş kapatılırken bir hata oluştu.';
477
+ this.toasterService.error(errorMessage);
478
+ },
479
+ });
480
+ }
481
+ });
482
+ }
483
+ onBosKasaGetir() {
484
+ this.bosKasaMode = 'empty';
485
+ this.bosKasaPopupVisible = true;
486
+ }
487
+ onYarimKasa() {
488
+ this.bosKasaMode = 'half';
489
+ this.bosKasaPopupVisible = true;
490
+ }
491
+ onBosKasaGonder() {
492
+ this.bosKasaPopupVisible = false;
493
+ this.isBeeCellLoading = true;
494
+ const call = this.bosKasaMode === 'empty'
495
+ ? this.orderService.getEmptyBoxes(this.bosKasaStationId, this.bosKasaShelfId, this.bosKasaBoxCount, this.selectedWarehouse)
496
+ : this.orderService.getHalfBoxes(this.bosKasaStationId, this.bosKasaShelfId, this.bosKasaBoxCount, this.selectedWarehouse);
497
+ call.subscribe({
498
+ next: (result) => {
499
+ this.toasterService.success(result);
500
+ this.isBeeCellLoading = false;
501
+ },
502
+ error: (error) => {
503
+ const errorMessage = error?.error?.error?.message || 'BeeCell görevi oluşturulurken hata oluştu.';
504
+ this.toasterService.error(errorMessage);
505
+ this.isBeeCellLoading = false;
506
+ },
507
+ });
508
+ }
509
+ onDurumGuncelle() {
510
+ if (!this.selectedOrders || this.selectedOrders.length === 0) {
511
+ this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
512
+ return;
513
+ }
514
+ const docEntries = this.selectedOrders.map(o => o.DocEntry);
515
+ this.isBeeCellLoading = true;
516
+ this.orderService.updateTaskStatus(docEntries).subscribe({
517
+ next: (result) => {
518
+ this.toasterService.success(result);
519
+ this.isBeeCellLoading = false;
520
+ this.dxOrdersInstance?.instance?.refresh();
521
+ },
522
+ error: (error) => {
523
+ const errorMessage = error?.error?.error?.message || 'Durum güncellenirken hata oluştu.';
524
+ this.toasterService.error(errorMessage);
525
+ this.isBeeCellLoading = false;
526
+ },
527
+ });
528
+ }
529
+ // ── Seçili siparişler için rezervasyon yap ──
530
+ onRezervasyonYap() {
531
+ if (!this.selectedOrders || this.selectedOrders.length === 0) {
532
+ this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
533
+ return;
534
+ }
535
+ if (!this.selectedWarehouse) {
536
+ this.toasterService.warn('Lütfen bir depo seçiniz.');
537
+ return;
538
+ }
539
+ // Sadece Beklemede (0) siparişler için rezervasyon yapılabilir
540
+ const invalidStatus = this.selectedOrders.filter(o => o.U_SWDurum && o.U_SWDurum !== '0');
541
+ if (invalidStatus.length > 0) {
542
+ const docNums = invalidStatus.map(o => o.DocNum).join(', ');
543
+ this.toasterService.error(`Şu siparişlerin durumu "Beklemede" değil: ${docNums}. Sadece beklemede olan siparişler için rezervasyon yapılabilir.`);
544
+ return;
545
+ }
546
+ const docEntries = this.selectedOrders.map(o => o.DocEntry);
547
+ this.isReservationLoading = true;
548
+ this.orderService.reserveOrders(docEntries, this.selectedWarehouse).subscribe({
549
+ next: (result) => {
550
+ this.handleReservationResult(result);
551
+ this.isReservationLoading = false;
552
+ this.dxOrdersInstance?.instance?.refresh();
553
+ this.dxOrdersInstance?.instance?.clearSelection();
554
+ },
555
+ error: (error) => {
556
+ const errorMessage = error?.error?.error?.message || 'Rezervasyon yapılırken bir hata oluştu.';
557
+ this.toasterService.error(errorMessage);
558
+ this.isReservationLoading = false;
559
+ },
560
+ });
561
+ }
562
+ // ── Seçili siparişlerin rezervasyonlarını sil ──
563
+ onRezervasyonSil() {
564
+ if (!this.selectedOrders || this.selectedOrders.length === 0) {
565
+ this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
566
+ return;
567
+ }
568
+ const docEntries = this.selectedOrders.map(o => o.DocEntry);
569
+ const docNums = this.selectedOrders.map(o => o.DocNum).join(', ');
570
+ this.confirmationService
571
+ .warn(`${docNums} numaralı siparişlerin rezervasyonları iptal edilecektir. Emin misiniz?`, 'Rezervasyon İptal')
572
+ .subscribe((status) => {
573
+ if (status === 'confirm') {
574
+ this.isReservationLoading = true;
575
+ this.orderService.cancelReservations(docEntries).subscribe({
576
+ next: (result) => {
577
+ this.handleReservationResult(result);
578
+ this.isReservationLoading = false;
579
+ this.dxOrdersInstance?.instance?.refresh();
580
+ this.dxOrdersInstance?.instance?.clearSelection();
581
+ },
582
+ error: (error) => {
583
+ const errorMessage = error?.error?.error?.message || 'Rezervasyon iptal edilirken bir hata oluştu.';
584
+ this.toasterService.error(errorMessage);
585
+ this.isReservationLoading = false;
586
+ },
587
+ });
588
+ }
589
+ });
590
+ }
591
+ // ── Toplu rezervasyon yap (tüm uygun siparişler) ──
592
+ onTopluRezervasyonYap() {
593
+ if (!this.selectedWarehouse) {
594
+ this.toasterService.warn('Lütfen bir depo seçiniz.');
595
+ return;
596
+ }
597
+ // Zaten rezervasyonu olan siparişler için kullanıcıya seçim sun:
598
+ // - "Yeniden Hesapla" (confirm) → mevcut rezervasyonları silip yeniden kurar (overwriteExisting=true)
599
+ // - "Sadece Yeni Siparişler" (reject) → mevcutları korur, yalnızca rezervasyonsuzları işler (false)
600
+ // - Diyaloğu kapatma (dismiss) → işlemi iptal eder
601
+ this.confirmationService
602
+ .warn('Zaten rezervasyonu olan siparişler için ne yapılsın? "Yeniden Hesapla" mevcut rezervasyonları silip yeniden kurar; ' +
603
+ '"Sadece Yeni Siparişler" mevcutları korur ve yalnızca rezervasyonsuz siparişleri işler.', 'Toplu Rezervasyon', { yesText: 'Yeniden Hesapla', cancelText: 'Sadece Yeni Siparişler', dismissible: true })
604
+ .subscribe((status) => {
605
+ if (status === 'dismiss') {
606
+ return; // iptal
607
+ }
608
+ const overwriteExisting = status === 'confirm';
609
+ this.isReservationLoading = true;
610
+ this.orderService.reserveAllOrders(this.selectedWarehouse, this.activeListType, overwriteExisting).subscribe({
611
+ next: (result) => {
612
+ this.handleReservationResult(result);
613
+ this.isReservationLoading = false;
614
+ this.dxOrdersInstance?.instance?.refresh();
615
+ this.dxOrdersInstance?.instance?.clearSelection();
616
+ },
617
+ error: (error) => {
618
+ const errorMessage = error?.error?.error?.message || 'Toplu rezervasyon yapılırken bir hata oluştu.';
619
+ this.toasterService.error(errorMessage);
620
+ this.isReservationLoading = false;
621
+ },
622
+ });
623
+ });
624
+ }
625
+ // ── Toplu rezervasyon sil (tüm aktif rezervasyonlar) ──
626
+ onTumRezervasyonlariSil() {
627
+ this.confirmationService
628
+ .warn('Tüm aktif rezervasyonlar silinecektir. Emin misiniz?', 'Tüm Rezervasyonları Sil')
629
+ .subscribe((status) => {
630
+ if (status === 'confirm') {
631
+ this.isReservationLoading = true;
632
+ this.orderService.cancelAllReservations(this.activeListType).subscribe({
633
+ next: (result) => {
634
+ this.handleReservationResult(result);
635
+ this.isReservationLoading = false;
636
+ this.dxOrdersInstance?.instance?.refresh();
637
+ this.dxOrdersInstance?.instance?.clearSelection();
638
+ },
639
+ error: (error) => {
640
+ const errorMessage = error?.error?.error?.message || 'Rezervasyonlar silinirken bir hata oluştu.';
641
+ this.toasterService.error(errorMessage);
642
+ this.isReservationLoading = false;
643
+ },
644
+ });
645
+ }
646
+ });
647
+ }
648
+ handleReservationResult(result) {
649
+ const shortsOrders = result.OrderResults?.filter(r => r.Shorts && r.Shorts.length > 0) || [];
650
+ const hasShorts = shortsOrders.length > 0;
651
+ if (result.FailCount === 0 && !hasShorts) {
652
+ this.toasterService.success(result.Summary);
653
+ }
654
+ else if (result.SuccessCount > 0) {
655
+ this.toasterService.warn(result.Summary);
656
+ }
657
+ else {
658
+ this.toasterService.error(result.Summary);
659
+ }
660
+ // Eksik kalemler varsa detay göster
661
+ if (hasShorts) {
662
+ const totalShortItems = shortsOrders.reduce((sum, o) => sum + o.Shorts.length, 0);
663
+ const shortMessage = totalShortItems > OrdersComponent.MAX_SHORT_ITEMS_DETAILED
664
+ ? `Kalem miktarları eksik (${shortsOrders.length} sipariş, ${totalShortItems} kalem).`
665
+ : `Eksik Kalemler:\n${shortsOrders
666
+ .map(o => `Sipariş ${o.DocNum}: ${o.Shorts.map(s => `${s.ItemCode} (eksik: ${s.ShortQty})`).join(', ')}`)
667
+ .join('\n')}`;
668
+ this.toasterService.warn(shortMessage);
669
+ }
670
+ }
671
+ onRefresh() {
672
+ this.dxOrdersInstance?.instance?.refresh();
673
+ }
674
+ onExportExcel() {
675
+ // TODO: Implement
676
+ }
677
+ }
678
+ OrdersComponent.MAX_SHORT_ITEMS_DETAILED = 5;
679
+ OrdersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrdersComponent, deps: [{ token: OrderService }, { token: WarehouseService }, { token: i2.ToasterService }, { token: i2.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component });
680
+ OrdersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OrdersComponent, selector: "lib-orders", viewQueries: [{ propertyName: "dxOrdersInstance", first: true, predicate: ["dxOrdersInstance"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'SmartWarehouse::Orders' | abpLocalization\">\r\n\r\n <!-- Toolbar -->\r\n <div class=\"orders-toolbar\">\r\n <!-- Row 1: Filters -->\r\n <div class=\"toolbar-row\">\r\n <div class=\"toolbar-group\">\r\n <label>Sipari\u015F Grubu</label>\r\n <div class=\"status-group\">\r\n <span class=\"status-chip list-purchase\" [class.active]=\"activeListType === '1'\"\r\n (click)=\"toggleListType('1')\">\r\n <i class=\"fa fa-shopping-cart\"></i> Sanayi Sipari\u015Fleri\r\n </span>\r\n <span class=\"status-chip list-distribution\" [class.active]=\"activeListType === '2'\"\r\n (click)=\"toggleListType('2')\">\r\n <i class=\"fa fa-truck\"></i> Da\u011F\u0131t\u0131m Sipari\u015Fleri\r\n </span>\r\n <span class=\"status-chip list-warehouse\" [class.active]=\"activeListType === '3'\"\r\n (click)=\"toggleListType('3')\">\r\n <i class=\"fa fa-warehouse\"></i> Depo Talepleri\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"toolbar-group toolbar-group--durum\">\r\n <label>Durum</label>\r\n <div class=\"status-group\">\r\n <span class=\"status-chip pending\" [class.active]=\"activeStatus === 'beklemede'\"\r\n (click)=\"toggleStatus('beklemede')\">\r\n <i class=\"fa fa-clock\"></i> Beklemede\r\n </span>\r\n <span class=\"status-chip processing\" [class.active]=\"activeStatus === 'isleniyor'\"\r\n (click)=\"toggleStatus('isleniyor')\">\r\n <i class=\"fa fa-spinner\"></i> \u0130\u015Fleniyor\r\n </span>\r\n <span class=\"status-chip awaiting\" [class.active]=\"activeStatus === 'onayBekliyor'\"\r\n (click)=\"toggleStatus('onayBekliyor')\">\r\n <i class=\"fa fa-hourglass-half\"></i> Onay Bekliyor\r\n </span>\r\n <span class=\"status-chip completed\" [class.active]=\"activeStatus === 'tamamlandi'\"\r\n (click)=\"toggleStatus('tamamlandi')\">\r\n <i class=\"fa fa-check-circle\"></i> Tamamland\u0131\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"toolbar-group toolbar-group--depo\">\r\n <label>Depo</label>\r\n <select [(ngModel)]=\"selectedWarehouse\" class=\"form-select\">\r\n <option value=\"\">T\u00FCm\u00FC</option>\r\n <option *ngFor=\"let wh of warehouses\" [value]=\"wh.WhsCode\">{{ wh.WhsName }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"toolbar-divider\" />\r\n\r\n <!-- Row 3: Action input + related buttons | Reservation | Refresh/Excel -->\r\n <div class=\"toolbar-row\">\r\n <div class=\"action-group\">\r\n <button class=\"btn btn-action-primary btn-sm\" (click)=\"onGorevBaslat()\" [disabled]=\"isGorevBaslatLoading\">\r\n <i class=\"fa fa-plus-circle\"></i> G\u00F6rev Ba\u015Flat\r\n </button>\r\n <button class=\"btn btn-action-approve btn-sm\" (click)=\"onOnayVer()\">\r\n <i class=\"fa fa-thumbs-up\"></i> G\u00F6revi Tamamla\r\n </button>\r\n <button class=\"btn btn-action-danger btn-sm\" (click)=\"onSiparisKapat()\">\r\n <i class=\"fa fa-times-circle\"></i> Sipari\u015F Kapat\r\n </button>\r\n <button class=\"btn btn-action-sync btn-sm\" (click)=\"onDurumGuncelle()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-sync-alt\"></i> Durum G\u00FCncelle\r\n </button>\r\n <button class=\"btn btn-action-info btn-sm\" (click)=\"onBosKasaGetir()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-box-open\"></i> Bo\u015F Kasa Getir\r\n </button>\r\n <button class=\"btn btn-action-warning btn-sm\" (click)=\"onYarimKasa()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-box\"></i> Yar\u0131m Kasa Getir\r\n </button>\r\n <span class=\"action-divider\"></span>\r\n <button class=\"btn btn-action-reservation btn-sm\" (click)=\"onRezervasyonYap()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-lock\"></i> Rezervasyon Yap\r\n </button>\r\n <button class=\"btn btn-action-reservation-cancel btn-sm\" (click)=\"onRezervasyonSil()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-unlock\"></i> Rezervasyon Sil\r\n </button>\r\n <button class=\"btn btn-action-reservation-bulk btn-sm\" (click)=\"onTopluRezervasyonYap()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-lock\"></i> Toplu Rez. Yap\r\n </button>\r\n <button class=\"btn btn-action-reservation-bulk-cancel btn-sm\" (click)=\"onTumRezervasyonlariSil()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-unlock\"></i> Toplu Rez. Sil\r\n </button>\r\n <span class=\"action-divider\"></span>\r\n <button class=\"btn btn-action-secondary btn-sm\" (click)=\"onRefresh()\">\r\n <i class=\"fa fa-redo\"></i> Yenile\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid -->\r\n <div class=\"card orders-grid-card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid\r\n #dxOrdersInstance\r\n [dataSource]=\"ordersDataSource\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [remoteOperations]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\"\r\n columnResizingMode=\"widget\"\r\n [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [columnHidingEnabled]=\"true\"\r\n (onRowClick)=\"onRowClick($event)\"\r\n (onSelectionChanged)=\"onSelectionChanged($event)\"\r\n (onRowPrepared)=\"onRowPrepared($event)\"\r\n style=\"height: 60vh\"\r\n >\r\n <dxo-pager\r\n [visible]=\"true\"\r\n [showInfo]=\"true\"\r\n [allowedPageSizes]=\"[5, 10, 20]\"\r\n [showNavigationButtons]=\"true\"\r\n [showPageSizeSelector]=\"true\"\r\n >\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"10\"></dxo-paging>\r\n <dxo-column-chooser\r\n [allowSearch]=\"true\"\r\n [enabled]=\"true\"\r\n mode=\"select\"\r\n ></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\r\n <dxo-selection\r\n mode=\"multiple\"\r\n showCheckBoxesMode=\"always\"\r\n [allowSelectAll]=\"true\"\r\n ></dxo-selection>\r\n\r\n <dxi-column\r\n dataField=\"DocNum\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocNum' | abpLocalization }}\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"CardCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:CardCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"CardName\"\r\n caption=\"{{ 'SmartWarehouse::Order:CardName' | abpLocalization }}\"\r\n [width]=\"220\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocDueDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocDueDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWTalepTarihi\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWTalepTarihi' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"130\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWDurum\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWDurum' | abpLocalization }}\"\r\n [width]=\"110\"\r\n cellTemplate=\"swDurumTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWIsError\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWIsError' | abpLocalization }}\"\r\n [width]=\"50\"\r\n cellTemplate=\"errorTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWErrorMessage\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWErrorMessage' | abpLocalization }}\"\r\n [width]=\"260\"\r\n cellTemplate=\"errorMessageTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"OwnerCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:OwnerCode' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"Comments\"\r\n caption=\"{{ 'SmartWarehouse::Order:Comments' | abpLocalization }}\"\r\n [width]=\"200\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWGonderildi\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWGonderildi' | abpLocalization }}\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWStationCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWStationCode' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWEyeCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWEyeCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWOrderType\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWOrderType' | abpLocalization }}\"\r\n [width]=\"160\"\r\n cellTemplate=\"orderTypeTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"NumAtCard\"\r\n caption=\"{{ 'SmartWarehouse::Order:NumAtCard' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocTotal\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocTotal' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.00\"\r\n [width]=\"130\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocCur\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocCur' | abpLocalization }}\"\r\n [width]=\"90\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocStatus\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocStatus' | abpLocalization }}\"\r\n [width]=\"90\"\r\n cellTemplate=\"statusTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocEntry\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocEntry' | abpLocalization }}\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n\r\n <div *dxTemplate=\"let cell of 'statusTemplate'\">\r\n <span\r\n class=\"badge\"\r\n [ngClass]=\"{\r\n 'bg-success': cell.value === 'O',\r\n 'bg-secondary': cell.value === 'C'\r\n }\"\r\n >\r\n {{ cell.value === 'O' ? 'A\u00E7\u0131k' : 'Kapal\u0131' }}\r\n </span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'swDurumTemplate'\">\r\n <span\r\n class=\"badge\"\r\n [ngClass]=\"{\r\n 'bg-warning': cell.value === '0' || !cell.value,\r\n 'bg-info': cell.value === '1',\r\n 'bg-primary': cell.value === '2',\r\n 'bg-success': cell.value === '3'\r\n }\"\r\n >\r\n {{\r\n cell.value === '1' ? 'Onay Bekliyor' :\r\n cell.value === '2' ? '\u0130\u015Fleniyor' :\r\n cell.value === '3' ? 'Tamamland\u0131' : 'Beklemede'\r\n }}\r\n </span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'errorTemplate'\">\r\n <i\r\n *ngIf=\"cell.value === 'Y'\"\r\n class=\"fa fa-exclamation-triangle text-danger\"\r\n [title]=\"cell.data.U_SWErrorMessage\"\r\n ></i>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'errorMessageTemplate'\">\r\n <span\r\n *ngIf=\"cell.data.U_SWIsError === 'Y'\"\r\n class=\"error-message-cell\"\r\n [title]=\"cell.value\"\r\n >{{ cell.value }}</span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'orderTypeTemplate'\">\r\n <span class=\"badge bg-secondary\">\r\n {{\r\n cell.value === '1' ? 'Sanayi Sipari\u015Fleri' :\r\n cell.value === '2' ? 'Da\u011F\u0131t\u0131m Sipari\u015Fleri' :\r\n cell.value === '3' ? 'Depo Talepleri' : '-'\r\n }}\r\n </span>\r\n </div>\r\n\r\n <!-- Master-Detail: Sipari\u015F Sat\u0131rlar\u0131 -->\r\n <dxo-master-detail [enabled]=\"true\" template=\"orderLinesTemplate\"></dxo-master-detail>\r\n\r\n <div *dxTemplate=\"let detail of 'orderLinesTemplate'\">\r\n <div class=\"p-3\">\r\n <h6 class=\"mb-3\">\r\n <i class=\"fa fa-list me-1\"></i>\r\n {{ 'SmartWarehouse::Order:DocNum' | abpLocalization }}:\r\n {{ detail.data.DocNum }} - Sipari\u015F Sat\u0131rlar\u0131\r\n </h6>\r\n <dx-data-grid\r\n [dataSource]=\"detail.data.DocumentLines\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [rowAlternationEnabled]=\"true\"\r\n >\r\n <dxi-column\r\n dataField=\"LineNum\"\r\n caption=\"{{ 'SmartWarehouse::Order:LineNum' | abpLocalization }}\"\r\n [width]=\"70\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ItemCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:ItemCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ItemDescription\"\r\n caption=\"Kalem Ad\u0131\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"Quantity\"\r\n caption=\"{{ 'SmartWarehouse::Order:Quantity' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.##\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWTeslimMiktar\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWTeslimMiktar' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.##\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"LineTotal\"\r\n caption=\"{{ 'SmartWarehouse::Order:LineTotal' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.00\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"WarehouseCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:WhsCode' | abpLocalization }}\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ShipDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:ShipDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SonGorevId\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SonGorevId' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n\r\n <dxo-summary>\r\n <dxi-total-item\r\n column=\"lineTotal\"\r\n summaryType=\"sum\"\r\n displayFormat=\"Toplam: {0}\"\r\n valueFormat=\"#,##0.00\"\r\n ></dxi-total-item>\r\n <dxi-total-item\r\n column=\"quantity\"\r\n summaryType=\"sum\"\r\n displayFormat=\"Toplam: {0}\"\r\n valueFormat=\"#,##0.##\"\r\n ></dxi-total-item>\r\n </dxo-summary>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n <!-- Bo\u015F / Yar\u0131m Kasa Popup -->\r\n <dx-popup\r\n [visible]=\"bosKasaPopupVisible\"\r\n (onHidden)=\"bosKasaPopupVisible = false\"\r\n [width]=\"380\"\r\n [height]=\"'auto'\"\r\n [showTitle]=\"true\"\r\n [title]=\"bosKasaMode === 'empty' ? 'Bo\u015F Kasa Getir' : 'Yar\u0131m Kasa Getir'\"\r\n [dragEnabled]=\"true\"\r\n [resizeEnabled]=\"false\"\r\n [showCloseButton]=\"true\"\r\n [closeOnOutsideClick]=\"false\"\r\n >\r\n <div *dxTemplate=\"let data of 'content'\" class=\"p-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">\u0130stasyon No</label>\r\n <dx-number-box [(value)]=\"bosKasaStationId\" [min]=\"1\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">Raf No (Shelf ID)</label>\r\n <dx-number-box [(value)]=\"bosKasaShelfId\" [min]=\"1\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">Kasa Adedi</label>\r\n <dx-number-box [(value)]=\"bosKasaBoxCount\" [min]=\"1\" [max]=\"50\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"d-flex justify-content-end gap-2 mt-3\">\r\n <dx-button text=\"\u0130ptal\" (onClick)=\"bosKasaPopupVisible = false\" type=\"normal\"></dx-button>\r\n <dx-button\r\n [text]=\"bosKasaMode === 'empty' ? 'Bo\u015F Kasa G\u00F6nder' : 'Yar\u0131m Kasa G\u00F6nder'\"\r\n type=\"default\"\r\n (onClick)=\"onBosKasaGonder()\"\r\n ></dx-button>\r\n </div>\r\n </div>\r\n </dx-popup>\r\n\r\n</abp-page>\r\n", styles: [":host{display:block;max-width:100%;overflow-x:hidden}.orders-toolbar{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:16px 20px;margin-bottom:16px;box-shadow:0 1px 3px #0000000f;max-width:100%;overflow:hidden}.toolbar-divider{border:none;border-top:1px solid #eee;margin:10px 0}.toolbar-row{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.toolbar-group{display:flex;flex-direction:column;gap:4px}.toolbar-group--durum{margin-left:80px}.toolbar-group--depo{margin-left:auto}.toolbar-group label{font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px}.toolbar-group select,.toolbar-group input[type=date]{height:36px;border:1px solid #ced4da;border-radius:6px;padding:0 10px;font-size:13px;background:#fff;transition:border-color .15s}.toolbar-group select:focus,.toolbar-group input[type=date]:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.toolbar-group select{min-width:180px}.radio-group{display:flex;gap:12px;height:36px;align-items:center}.radio-group .form-check{margin:0;padding-left:22px}.radio-group .form-check-label{font-size:13px;cursor:pointer;white-space:nowrap}.status-group{display:flex;gap:10px;align-items:center}.status-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:20px;font-size:12px;font-weight:500;cursor:pointer;border:1px solid transparent;transition:all .15s;-webkit-user-select:none;user-select:none}.status-chip.pending{background:#fff9e6;color:#c9a227;border-color:#ffe082}.status-chip.pending.active{background:#ffc107;color:#fff;border-color:#ffc107}.status-chip.processing{background:#e8f0fe;color:#7aadf5;border-color:#a8c8f7}.status-chip.processing.active{background:#0d6efd;color:#fff;border-color:#0d6efd}.status-chip.awaiting{background:#e6f9fc;color:#6ec6d8;border-color:#a0e1ed}.status-chip.awaiting.active{background:#0dcaf0;color:#fff;border-color:#0dcaf0}.status-chip.completed{background:#e8f5e9;color:#6db680;border-color:#a5d6a7}.status-chip.completed.active{background:#198754;color:#fff;border-color:#198754}.status-chip.list-purchase{background:#eef0fa;color:#9aa1d4;border-color:#b3b9e6}.status-chip.list-purchase.active{background:#5c6bc0;color:#fff;border-color:#5c6bc0}.status-chip.list-distribution{background:#fce8ee;color:#e87a9e;border-color:#f0a3bb}.status-chip.list-distribution.active{background:#e91e63;color:#fff;border-color:#e91e63}.status-chip.list-warehouse{background:#e5f5f4;color:#6db5ab;border-color:#a0d4cd}.status-chip.list-warehouse.active{background:#009688;color:#fff;border-color:#009688}.action-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.action-input{width:140px;height:32px;border:1px solid #ced4da;border-radius:6px;padding:0 10px;font-size:13px}.action-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.toolbar-separator{width:1px;height:28px;background:#dee2e6;align-self:center}.reservation-group{display:flex;align-items:center;gap:8px}.toolbar-actions{display:flex;gap:8px;margin-left:auto;align-items:center}.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{display:inline-flex;align-items:center;gap:5px;font-size:12px;padding:5px 12px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s}.btn-action-primary{background:#556ee6;color:#fff;border:none}.btn-action-primary:hover{background:#4458cb;color:#fff}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-approve{background:#6f42c1;color:#fff;border:none}.btn-action-approve:hover{background:#5a32a3;color:#fff}.btn-action-warning{background:#f1b44c;color:#fff;border:none}.btn-action-warning:hover{background:#d9a043;color:#fff}.btn-action-info{background:#50a5f1;color:#fff;border:none}.btn-action-info:hover{background:#3d8ed8;color:#fff}.btn-action-danger{background:#f46a6a;color:#fff;border:none}.btn-action-danger:hover{background:#e05555;color:#fff}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.btn-action-secondary{background:#74788d;color:#fff;border:none}.btn-action-secondary:hover{background:#5f6373;color:#fff}.btn-action-reservation{background:#7c4dff;color:#fff;border:none}.btn-action-reservation:hover{background:#651fff;color:#fff}.btn-action-reservation:disabled{background:#b39ddb;cursor:not-allowed}.btn-action-reservation-cancel{background:#ff6e40;color:#fff;border:none}.btn-action-reservation-cancel:hover{background:#ff3d00;color:#fff}.btn-action-reservation-cancel:disabled{background:#ffab91;cursor:not-allowed}.btn-action-reservation-bulk{background:#536dfe;color:#fff;border:none}.btn-action-reservation-bulk:hover{background:#304ffe;color:#fff}.btn-action-reservation-bulk:disabled{background:#8c9eff;cursor:not-allowed}.btn-action-reservation-bulk-cancel{background:#ff5252;color:#fff;border:none}.btn-action-reservation-bulk-cancel:hover{background:#ff1744;color:#fff}.btn-action-reservation-bulk-cancel:disabled{background:#ff8a80;cursor:not-allowed}.action-divider{width:1px;height:24px;background:#dee2e6;display:inline-block;vertical-align:middle;margin:0 4px}.orders-grid-card{border-radius:8px;border:1px solid #e0e0e0;box-shadow:0 1px 3px #0000000f;overflow:hidden;max-width:100%}.orders-grid-card .card-body{padding:12px;overflow-x:auto}::ng-deep .order-row-error{background-color:#fdecea!important}::ng-deep .order-row-error:hover{background-color:#fbd9d5!important}::ng-deep .error-message-cell{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#b02a37;font-size:12px}@media (max-width: 1200px){.toolbar-actions{margin-left:0}.radio-group{flex-wrap:wrap;height:auto}.action-group{width:100%}.toolbar-separator{display:none}}@media (max-width: 992px){.toolbar-group--durum,.toolbar-group--depo{margin-left:0}.toolbar-row{gap:12px}.toolbar-group select{min-width:0}.status-group{flex-wrap:wrap;gap:6px}.reservation-group{flex-wrap:wrap}}@media (max-width: 768px){.orders-toolbar{padding:12px}.toolbar-row{flex-direction:column;align-items:stretch;gap:10px}.toolbar-group,.toolbar-group select,.toolbar-group input[type=date]{width:100%}.radio-group{flex-direction:column;align-items:flex-start;gap:8px}.status-group{flex-wrap:wrap;gap:6px}.status-chip{font-size:11px;padding:3px 10px}.action-group,.reservation-group,.toolbar-actions{flex-wrap:wrap;gap:6px}.action-divider{display:none}.action-input{width:100%}.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{font-size:11px;padding:5px 10px}}@media (max-width: 480px){.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{flex:1 1 calc(50% - 6px);justify-content:center}.status-chip{font-size:10px;padding:2px 8px}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i7.DxoColumnChooserComponent, selector: "dxo-column-chooser", inputs: ["allowSearch", "emptyPanelText", "enabled", "height", "mode", "searchTimeout", "sortOrder", "title", "width"] }, { kind: "component", type: i7.DxoColumnFixingComponent, selector: "dxo-column-fixing", inputs: ["enabled", "texts"] }, { kind: "component", type: i7.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i7.DxoHeaderFilterComponent, selector: "dxo-header-filter", inputs: ["allowSearch", "dataSource", "groupInterval", "height", "searchMode", "width", "searchTimeout", "texts", "visible", "showRelevantValues"] }, { kind: "component", type: i7.DxoExportComponent, selector: "dxo-export", inputs: ["backgroundColor", "enabled", "fileName", "formats", "margin", "printingEnabled", "svgToCanvas", "allowExportSelectedData", "texts"] }, { kind: "component", type: i7.DxoFilterBuilderComponent, selector: "dxo-filter-builder", inputs: ["accessKey", "activeStateEnabled", "allowHierarchicalFields", "customOperations", "disabled", "elementAttr", "fields", "filterOperationDescriptions", "focusStateEnabled", "groupOperationDescriptions", "groupOperations", "height", "hint", "hoverStateEnabled", "maxGroupLevel", "onContentReady", "onDisposing", "onEditorPrepared", "onEditorPreparing", "onInitialized", "onOptionChanged", "onValueChanged", "rtlEnabled", "tabIndex", "value", "visible", "width"], outputs: ["valueChange"] }, { kind: "component", type: i7.DxoFilterPanelComponent, selector: "dxo-filter-panel", inputs: ["customizeText", "filterEnabled", "texts", "visible"], outputs: ["filterEnabledChange"] }, { kind: "component", type: i7.DxoFilterRowComponent, selector: "dxo-filter-row", inputs: ["applyFilter", "applyFilterText", "betweenEndText", "betweenStartText", "operationDescriptions", "resetOperationText", "showAllText", "showOperationChooser", "visible"] }, { kind: "component", type: i7.DxoMasterDetailComponent, selector: "dxo-master-detail", inputs: ["autoExpandAll", "enabled", "template"] }, { kind: "component", type: i7.DxoPagerComponent, selector: "dxo-pager", inputs: ["allowedPageSizes", "displayMode", "infoText", "label", "showInfo", "showNavigationButtons", "showPageSizeSelector", "visible"] }, { kind: "component", type: i7.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i7.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i7.DxoSelectionComponent, selector: "dxo-selection", inputs: ["allowSelectAll", "deferred", "mode", "selectAllMode", "showCheckBoxesMode", "recursive"] }, { kind: "component", type: i7.DxoSortingComponent, selector: "dxo-sorting", inputs: ["ascendingText", "clearText", "descendingText", "mode", "showSortIndexes"] }, { kind: "component", type: i7.DxoSummaryComponent, selector: "dxo-summary", inputs: ["calculateCustomSummary", "groupItems", "recalculateWhileEditing", "skipEmptyValues", "texts", "totalItems"] }, { kind: "component", type: i7.DxiTotalItemComponent, selector: "dxi-total-item", inputs: ["alignment", "column", "cssClass", "customizeText", "displayFormat", "name", "showInColumn", "skipEmptyValues", "summaryType", "valueFormat"] }, { kind: "directive", type: i8.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i6.DxPopupComponent, selector: "dx-popup", inputs: ["accessKey", "animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "dragAndResizeArea", "dragEnabled", "dragOutsideBoundary", "elementAttr", "focusStateEnabled", "fullScreen", "height", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "resizeEnabled", "restorePosition", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showTitle", "tabIndex", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onResize", "onResizeEnd", "onResizeStart", "onShowing", "onShown", "onTitleRendered", "accessKeyChange", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "dragAndResizeAreaChange", "dragEnabledChange", "dragOutsideBoundaryChange", "elementAttrChange", "focusStateEnabledChange", "fullScreenChange", "heightChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "resizeEnabledChange", "restorePositionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showTitleChange", "tabIndexChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { kind: "component", type: i6.DxNumberBoxComponent, selector: "dx-number-box", inputs: ["accessKey", "activeStateEnabled", "buttons", "disabled", "elementAttr", "focusStateEnabled", "format", "height", "hint", "hoverStateEnabled", "inputAttr", "invalidValueMessage", "isValid", "label", "labelMode", "max", "min", "mode", "name", "placeholder", "readOnly", "rtlEnabled", "showClearButton", "showSpinButtons", "step", "stylingMode", "tabIndex", "text", "useLargeSpinButtons", "validationError", "validationErrors", "validationMessageMode", "validationMessagePosition", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOptionChanged", "onPaste", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "formatChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "invalidValueMessageChange", "isValidChange", "labelChange", "labelModeChange", "maxChange", "minChange", "modeChange", "nameChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showClearButtonChange", "showSpinButtonsChange", "stepChange", "stylingModeChange", "tabIndexChange", "textChange", "useLargeSpinButtonsChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationMessagePositionChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "component", type: i6.DxButtonComponent, selector: "dx-button", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useSubmitBehavior", "validationGroup", "visible", "width"], outputs: ["onClick", "onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconChange", "rtlEnabledChange", "stylingModeChange", "tabIndexChange", "templateChange", "textChange", "typeChange", "useSubmitBehaviorChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrdersComponent, decorators: [{
682
+ type: Component,
683
+ args: [{ selector: 'lib-orders', template: "<abp-page [title]=\"'SmartWarehouse::Orders' | abpLocalization\">\r\n\r\n <!-- Toolbar -->\r\n <div class=\"orders-toolbar\">\r\n <!-- Row 1: Filters -->\r\n <div class=\"toolbar-row\">\r\n <div class=\"toolbar-group\">\r\n <label>Sipari\u015F Grubu</label>\r\n <div class=\"status-group\">\r\n <span class=\"status-chip list-purchase\" [class.active]=\"activeListType === '1'\"\r\n (click)=\"toggleListType('1')\">\r\n <i class=\"fa fa-shopping-cart\"></i> Sanayi Sipari\u015Fleri\r\n </span>\r\n <span class=\"status-chip list-distribution\" [class.active]=\"activeListType === '2'\"\r\n (click)=\"toggleListType('2')\">\r\n <i class=\"fa fa-truck\"></i> Da\u011F\u0131t\u0131m Sipari\u015Fleri\r\n </span>\r\n <span class=\"status-chip list-warehouse\" [class.active]=\"activeListType === '3'\"\r\n (click)=\"toggleListType('3')\">\r\n <i class=\"fa fa-warehouse\"></i> Depo Talepleri\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"toolbar-group toolbar-group--durum\">\r\n <label>Durum</label>\r\n <div class=\"status-group\">\r\n <span class=\"status-chip pending\" [class.active]=\"activeStatus === 'beklemede'\"\r\n (click)=\"toggleStatus('beklemede')\">\r\n <i class=\"fa fa-clock\"></i> Beklemede\r\n </span>\r\n <span class=\"status-chip processing\" [class.active]=\"activeStatus === 'isleniyor'\"\r\n (click)=\"toggleStatus('isleniyor')\">\r\n <i class=\"fa fa-spinner\"></i> \u0130\u015Fleniyor\r\n </span>\r\n <span class=\"status-chip awaiting\" [class.active]=\"activeStatus === 'onayBekliyor'\"\r\n (click)=\"toggleStatus('onayBekliyor')\">\r\n <i class=\"fa fa-hourglass-half\"></i> Onay Bekliyor\r\n </span>\r\n <span class=\"status-chip completed\" [class.active]=\"activeStatus === 'tamamlandi'\"\r\n (click)=\"toggleStatus('tamamlandi')\">\r\n <i class=\"fa fa-check-circle\"></i> Tamamland\u0131\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"toolbar-group toolbar-group--depo\">\r\n <label>Depo</label>\r\n <select [(ngModel)]=\"selectedWarehouse\" class=\"form-select\">\r\n <option value=\"\">T\u00FCm\u00FC</option>\r\n <option *ngFor=\"let wh of warehouses\" [value]=\"wh.WhsCode\">{{ wh.WhsName }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"toolbar-divider\" />\r\n\r\n <!-- Row 3: Action input + related buttons | Reservation | Refresh/Excel -->\r\n <div class=\"toolbar-row\">\r\n <div class=\"action-group\">\r\n <button class=\"btn btn-action-primary btn-sm\" (click)=\"onGorevBaslat()\" [disabled]=\"isGorevBaslatLoading\">\r\n <i class=\"fa fa-plus-circle\"></i> G\u00F6rev Ba\u015Flat\r\n </button>\r\n <button class=\"btn btn-action-approve btn-sm\" (click)=\"onOnayVer()\">\r\n <i class=\"fa fa-thumbs-up\"></i> G\u00F6revi Tamamla\r\n </button>\r\n <button class=\"btn btn-action-danger btn-sm\" (click)=\"onSiparisKapat()\">\r\n <i class=\"fa fa-times-circle\"></i> Sipari\u015F Kapat\r\n </button>\r\n <button class=\"btn btn-action-sync btn-sm\" (click)=\"onDurumGuncelle()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-sync-alt\"></i> Durum G\u00FCncelle\r\n </button>\r\n <button class=\"btn btn-action-info btn-sm\" (click)=\"onBosKasaGetir()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-box-open\"></i> Bo\u015F Kasa Getir\r\n </button>\r\n <button class=\"btn btn-action-warning btn-sm\" (click)=\"onYarimKasa()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-box\"></i> Yar\u0131m Kasa Getir\r\n </button>\r\n <span class=\"action-divider\"></span>\r\n <button class=\"btn btn-action-reservation btn-sm\" (click)=\"onRezervasyonYap()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-lock\"></i> Rezervasyon Yap\r\n </button>\r\n <button class=\"btn btn-action-reservation-cancel btn-sm\" (click)=\"onRezervasyonSil()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-unlock\"></i> Rezervasyon Sil\r\n </button>\r\n <button class=\"btn btn-action-reservation-bulk btn-sm\" (click)=\"onTopluRezervasyonYap()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-lock\"></i> Toplu Rez. Yap\r\n </button>\r\n <button class=\"btn btn-action-reservation-bulk-cancel btn-sm\" (click)=\"onTumRezervasyonlariSil()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-unlock\"></i> Toplu Rez. Sil\r\n </button>\r\n <span class=\"action-divider\"></span>\r\n <button class=\"btn btn-action-secondary btn-sm\" (click)=\"onRefresh()\">\r\n <i class=\"fa fa-redo\"></i> Yenile\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid -->\r\n <div class=\"card orders-grid-card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid\r\n #dxOrdersInstance\r\n [dataSource]=\"ordersDataSource\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [remoteOperations]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\"\r\n columnResizingMode=\"widget\"\r\n [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [columnHidingEnabled]=\"true\"\r\n (onRowClick)=\"onRowClick($event)\"\r\n (onSelectionChanged)=\"onSelectionChanged($event)\"\r\n (onRowPrepared)=\"onRowPrepared($event)\"\r\n style=\"height: 60vh\"\r\n >\r\n <dxo-pager\r\n [visible]=\"true\"\r\n [showInfo]=\"true\"\r\n [allowedPageSizes]=\"[5, 10, 20]\"\r\n [showNavigationButtons]=\"true\"\r\n [showPageSizeSelector]=\"true\"\r\n >\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"10\"></dxo-paging>\r\n <dxo-column-chooser\r\n [allowSearch]=\"true\"\r\n [enabled]=\"true\"\r\n mode=\"select\"\r\n ></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\r\n <dxo-selection\r\n mode=\"multiple\"\r\n showCheckBoxesMode=\"always\"\r\n [allowSelectAll]=\"true\"\r\n ></dxo-selection>\r\n\r\n <dxi-column\r\n dataField=\"DocNum\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocNum' | abpLocalization }}\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"CardCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:CardCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"CardName\"\r\n caption=\"{{ 'SmartWarehouse::Order:CardName' | abpLocalization }}\"\r\n [width]=\"220\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocDueDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocDueDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWTalepTarihi\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWTalepTarihi' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"130\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWDurum\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWDurum' | abpLocalization }}\"\r\n [width]=\"110\"\r\n cellTemplate=\"swDurumTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWIsError\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWIsError' | abpLocalization }}\"\r\n [width]=\"50\"\r\n cellTemplate=\"errorTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWErrorMessage\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWErrorMessage' | abpLocalization }}\"\r\n [width]=\"260\"\r\n cellTemplate=\"errorMessageTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"OwnerCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:OwnerCode' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"Comments\"\r\n caption=\"{{ 'SmartWarehouse::Order:Comments' | abpLocalization }}\"\r\n [width]=\"200\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWGonderildi\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWGonderildi' | abpLocalization }}\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWStationCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWStationCode' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWEyeCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWEyeCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWOrderType\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWOrderType' | abpLocalization }}\"\r\n [width]=\"160\"\r\n cellTemplate=\"orderTypeTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"NumAtCard\"\r\n caption=\"{{ 'SmartWarehouse::Order:NumAtCard' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocTotal\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocTotal' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.00\"\r\n [width]=\"130\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocCur\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocCur' | abpLocalization }}\"\r\n [width]=\"90\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocStatus\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocStatus' | abpLocalization }}\"\r\n [width]=\"90\"\r\n cellTemplate=\"statusTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocEntry\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocEntry' | abpLocalization }}\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n\r\n <div *dxTemplate=\"let cell of 'statusTemplate'\">\r\n <span\r\n class=\"badge\"\r\n [ngClass]=\"{\r\n 'bg-success': cell.value === 'O',\r\n 'bg-secondary': cell.value === 'C'\r\n }\"\r\n >\r\n {{ cell.value === 'O' ? 'A\u00E7\u0131k' : 'Kapal\u0131' }}\r\n </span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'swDurumTemplate'\">\r\n <span\r\n class=\"badge\"\r\n [ngClass]=\"{\r\n 'bg-warning': cell.value === '0' || !cell.value,\r\n 'bg-info': cell.value === '1',\r\n 'bg-primary': cell.value === '2',\r\n 'bg-success': cell.value === '3'\r\n }\"\r\n >\r\n {{\r\n cell.value === '1' ? 'Onay Bekliyor' :\r\n cell.value === '2' ? '\u0130\u015Fleniyor' :\r\n cell.value === '3' ? 'Tamamland\u0131' : 'Beklemede'\r\n }}\r\n </span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'errorTemplate'\">\r\n <i\r\n *ngIf=\"cell.value === 'Y'\"\r\n class=\"fa fa-exclamation-triangle text-danger\"\r\n [title]=\"cell.data.U_SWErrorMessage\"\r\n ></i>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'errorMessageTemplate'\">\r\n <span\r\n *ngIf=\"cell.data.U_SWIsError === 'Y'\"\r\n class=\"error-message-cell\"\r\n [title]=\"cell.value\"\r\n >{{ cell.value }}</span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'orderTypeTemplate'\">\r\n <span class=\"badge bg-secondary\">\r\n {{\r\n cell.value === '1' ? 'Sanayi Sipari\u015Fleri' :\r\n cell.value === '2' ? 'Da\u011F\u0131t\u0131m Sipari\u015Fleri' :\r\n cell.value === '3' ? 'Depo Talepleri' : '-'\r\n }}\r\n </span>\r\n </div>\r\n\r\n <!-- Master-Detail: Sipari\u015F Sat\u0131rlar\u0131 -->\r\n <dxo-master-detail [enabled]=\"true\" template=\"orderLinesTemplate\"></dxo-master-detail>\r\n\r\n <div *dxTemplate=\"let detail of 'orderLinesTemplate'\">\r\n <div class=\"p-3\">\r\n <h6 class=\"mb-3\">\r\n <i class=\"fa fa-list me-1\"></i>\r\n {{ 'SmartWarehouse::Order:DocNum' | abpLocalization }}:\r\n {{ detail.data.DocNum }} - Sipari\u015F Sat\u0131rlar\u0131\r\n </h6>\r\n <dx-data-grid\r\n [dataSource]=\"detail.data.DocumentLines\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [rowAlternationEnabled]=\"true\"\r\n >\r\n <dxi-column\r\n dataField=\"LineNum\"\r\n caption=\"{{ 'SmartWarehouse::Order:LineNum' | abpLocalization }}\"\r\n [width]=\"70\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ItemCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:ItemCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ItemDescription\"\r\n caption=\"Kalem Ad\u0131\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"Quantity\"\r\n caption=\"{{ 'SmartWarehouse::Order:Quantity' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.##\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWTeslimMiktar\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWTeslimMiktar' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.##\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"LineTotal\"\r\n caption=\"{{ 'SmartWarehouse::Order:LineTotal' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.00\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"WarehouseCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:WhsCode' | abpLocalization }}\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ShipDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:ShipDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SonGorevId\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SonGorevId' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n\r\n <dxo-summary>\r\n <dxi-total-item\r\n column=\"lineTotal\"\r\n summaryType=\"sum\"\r\n displayFormat=\"Toplam: {0}\"\r\n valueFormat=\"#,##0.00\"\r\n ></dxi-total-item>\r\n <dxi-total-item\r\n column=\"quantity\"\r\n summaryType=\"sum\"\r\n displayFormat=\"Toplam: {0}\"\r\n valueFormat=\"#,##0.##\"\r\n ></dxi-total-item>\r\n </dxo-summary>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n <!-- Bo\u015F / Yar\u0131m Kasa Popup -->\r\n <dx-popup\r\n [visible]=\"bosKasaPopupVisible\"\r\n (onHidden)=\"bosKasaPopupVisible = false\"\r\n [width]=\"380\"\r\n [height]=\"'auto'\"\r\n [showTitle]=\"true\"\r\n [title]=\"bosKasaMode === 'empty' ? 'Bo\u015F Kasa Getir' : 'Yar\u0131m Kasa Getir'\"\r\n [dragEnabled]=\"true\"\r\n [resizeEnabled]=\"false\"\r\n [showCloseButton]=\"true\"\r\n [closeOnOutsideClick]=\"false\"\r\n >\r\n <div *dxTemplate=\"let data of 'content'\" class=\"p-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">\u0130stasyon No</label>\r\n <dx-number-box [(value)]=\"bosKasaStationId\" [min]=\"1\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">Raf No (Shelf ID)</label>\r\n <dx-number-box [(value)]=\"bosKasaShelfId\" [min]=\"1\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">Kasa Adedi</label>\r\n <dx-number-box [(value)]=\"bosKasaBoxCount\" [min]=\"1\" [max]=\"50\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"d-flex justify-content-end gap-2 mt-3\">\r\n <dx-button text=\"\u0130ptal\" (onClick)=\"bosKasaPopupVisible = false\" type=\"normal\"></dx-button>\r\n <dx-button\r\n [text]=\"bosKasaMode === 'empty' ? 'Bo\u015F Kasa G\u00F6nder' : 'Yar\u0131m Kasa G\u00F6nder'\"\r\n type=\"default\"\r\n (onClick)=\"onBosKasaGonder()\"\r\n ></dx-button>\r\n </div>\r\n </div>\r\n </dx-popup>\r\n\r\n</abp-page>\r\n", styles: [":host{display:block;max-width:100%;overflow-x:hidden}.orders-toolbar{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:16px 20px;margin-bottom:16px;box-shadow:0 1px 3px #0000000f;max-width:100%;overflow:hidden}.toolbar-divider{border:none;border-top:1px solid #eee;margin:10px 0}.toolbar-row{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.toolbar-group{display:flex;flex-direction:column;gap:4px}.toolbar-group--durum{margin-left:80px}.toolbar-group--depo{margin-left:auto}.toolbar-group label{font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px}.toolbar-group select,.toolbar-group input[type=date]{height:36px;border:1px solid #ced4da;border-radius:6px;padding:0 10px;font-size:13px;background:#fff;transition:border-color .15s}.toolbar-group select:focus,.toolbar-group input[type=date]:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.toolbar-group select{min-width:180px}.radio-group{display:flex;gap:12px;height:36px;align-items:center}.radio-group .form-check{margin:0;padding-left:22px}.radio-group .form-check-label{font-size:13px;cursor:pointer;white-space:nowrap}.status-group{display:flex;gap:10px;align-items:center}.status-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:20px;font-size:12px;font-weight:500;cursor:pointer;border:1px solid transparent;transition:all .15s;-webkit-user-select:none;user-select:none}.status-chip.pending{background:#fff9e6;color:#c9a227;border-color:#ffe082}.status-chip.pending.active{background:#ffc107;color:#fff;border-color:#ffc107}.status-chip.processing{background:#e8f0fe;color:#7aadf5;border-color:#a8c8f7}.status-chip.processing.active{background:#0d6efd;color:#fff;border-color:#0d6efd}.status-chip.awaiting{background:#e6f9fc;color:#6ec6d8;border-color:#a0e1ed}.status-chip.awaiting.active{background:#0dcaf0;color:#fff;border-color:#0dcaf0}.status-chip.completed{background:#e8f5e9;color:#6db680;border-color:#a5d6a7}.status-chip.completed.active{background:#198754;color:#fff;border-color:#198754}.status-chip.list-purchase{background:#eef0fa;color:#9aa1d4;border-color:#b3b9e6}.status-chip.list-purchase.active{background:#5c6bc0;color:#fff;border-color:#5c6bc0}.status-chip.list-distribution{background:#fce8ee;color:#e87a9e;border-color:#f0a3bb}.status-chip.list-distribution.active{background:#e91e63;color:#fff;border-color:#e91e63}.status-chip.list-warehouse{background:#e5f5f4;color:#6db5ab;border-color:#a0d4cd}.status-chip.list-warehouse.active{background:#009688;color:#fff;border-color:#009688}.action-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.action-input{width:140px;height:32px;border:1px solid #ced4da;border-radius:6px;padding:0 10px;font-size:13px}.action-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.toolbar-separator{width:1px;height:28px;background:#dee2e6;align-self:center}.reservation-group{display:flex;align-items:center;gap:8px}.toolbar-actions{display:flex;gap:8px;margin-left:auto;align-items:center}.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{display:inline-flex;align-items:center;gap:5px;font-size:12px;padding:5px 12px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s}.btn-action-primary{background:#556ee6;color:#fff;border:none}.btn-action-primary:hover{background:#4458cb;color:#fff}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-approve{background:#6f42c1;color:#fff;border:none}.btn-action-approve:hover{background:#5a32a3;color:#fff}.btn-action-warning{background:#f1b44c;color:#fff;border:none}.btn-action-warning:hover{background:#d9a043;color:#fff}.btn-action-info{background:#50a5f1;color:#fff;border:none}.btn-action-info:hover{background:#3d8ed8;color:#fff}.btn-action-danger{background:#f46a6a;color:#fff;border:none}.btn-action-danger:hover{background:#e05555;color:#fff}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.btn-action-secondary{background:#74788d;color:#fff;border:none}.btn-action-secondary:hover{background:#5f6373;color:#fff}.btn-action-reservation{background:#7c4dff;color:#fff;border:none}.btn-action-reservation:hover{background:#651fff;color:#fff}.btn-action-reservation:disabled{background:#b39ddb;cursor:not-allowed}.btn-action-reservation-cancel{background:#ff6e40;color:#fff;border:none}.btn-action-reservation-cancel:hover{background:#ff3d00;color:#fff}.btn-action-reservation-cancel:disabled{background:#ffab91;cursor:not-allowed}.btn-action-reservation-bulk{background:#536dfe;color:#fff;border:none}.btn-action-reservation-bulk:hover{background:#304ffe;color:#fff}.btn-action-reservation-bulk:disabled{background:#8c9eff;cursor:not-allowed}.btn-action-reservation-bulk-cancel{background:#ff5252;color:#fff;border:none}.btn-action-reservation-bulk-cancel:hover{background:#ff1744;color:#fff}.btn-action-reservation-bulk-cancel:disabled{background:#ff8a80;cursor:not-allowed}.action-divider{width:1px;height:24px;background:#dee2e6;display:inline-block;vertical-align:middle;margin:0 4px}.orders-grid-card{border-radius:8px;border:1px solid #e0e0e0;box-shadow:0 1px 3px #0000000f;overflow:hidden;max-width:100%}.orders-grid-card .card-body{padding:12px;overflow-x:auto}::ng-deep .order-row-error{background-color:#fdecea!important}::ng-deep .order-row-error:hover{background-color:#fbd9d5!important}::ng-deep .error-message-cell{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#b02a37;font-size:12px}@media (max-width: 1200px){.toolbar-actions{margin-left:0}.radio-group{flex-wrap:wrap;height:auto}.action-group{width:100%}.toolbar-separator{display:none}}@media (max-width: 992px){.toolbar-group--durum,.toolbar-group--depo{margin-left:0}.toolbar-row{gap:12px}.toolbar-group select{min-width:0}.status-group{flex-wrap:wrap;gap:6px}.reservation-group{flex-wrap:wrap}}@media (max-width: 768px){.orders-toolbar{padding:12px}.toolbar-row{flex-direction:column;align-items:stretch;gap:10px}.toolbar-group,.toolbar-group select,.toolbar-group input[type=date]{width:100%}.radio-group{flex-direction:column;align-items:flex-start;gap:8px}.status-group{flex-wrap:wrap;gap:6px}.status-chip{font-size:11px;padding:3px 10px}.action-group,.reservation-group,.toolbar-actions{flex-wrap:wrap;gap:6px}.action-divider{display:none}.action-input{width:100%}.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{font-size:11px;padding:5px 10px}}@media (max-width: 480px){.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{flex:1 1 calc(50% - 6px);justify-content:center}.status-chip{font-size:10px;padding:2px 8px}}\n"] }]
684
+ }], ctorParameters: function () { return [{ type: OrderService }, { type: WarehouseService }, { type: i2.ToasterService }, { type: i2.ConfirmationService }]; }, propDecorators: { dxOrdersInstance: [{
685
+ type: ViewChild,
686
+ args: ['dxOrdersInstance', { static: false }]
687
+ }] } });
688
+
689
+ const routes$9 = [
690
+ {
691
+ path: '',
692
+ component: OrdersComponent,
693
+ },
694
+ ];
695
+ class OrdersModule {
696
+ }
697
+ OrdersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrdersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
698
+ OrdersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: OrdersModule, declarations: [OrdersComponent], imports: [CoreModule,
699
+ ThemeSharedModule,
700
+ FormsModule,
701
+ CommercialUiModule,
702
+ NgxValidateCoreModule,
703
+ NgbCollapseModule,
704
+ NgbDatepickerModule,
705
+ NgbDropdownModule,
706
+ DxDataGridModule,
707
+ DxPopupModule,
708
+ DxNumberBoxModule,
709
+ DxButtonModule,
710
+ PageModule, i1$1.RouterModule] });
711
+ OrdersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrdersModule, imports: [CoreModule,
712
+ ThemeSharedModule,
713
+ FormsModule,
714
+ CommercialUiModule,
715
+ NgxValidateCoreModule,
716
+ NgbCollapseModule,
717
+ NgbDatepickerModule,
718
+ NgbDropdownModule,
719
+ DxDataGridModule,
720
+ DxPopupModule,
721
+ DxNumberBoxModule,
722
+ DxButtonModule,
723
+ PageModule,
724
+ RouterModule.forChild(routes$9)] });
725
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrdersModule, decorators: [{
726
+ type: NgModule,
727
+ args: [{
728
+ declarations: [OrdersComponent],
729
+ imports: [
730
+ CoreModule,
731
+ ThemeSharedModule,
732
+ FormsModule,
733
+ CommercialUiModule,
734
+ NgxValidateCoreModule,
735
+ NgbCollapseModule,
736
+ NgbDatepickerModule,
737
+ NgbDropdownModule,
738
+ DxDataGridModule,
739
+ DxPopupModule,
740
+ DxNumberBoxModule,
741
+ DxButtonModule,
742
+ PageModule,
743
+ RouterModule.forChild(routes$9),
744
+ ],
745
+ }]
746
+ }] });
747
+ function loadOrdersModuleAsChild() {
748
+ return Promise.resolve(OrdersModule);
749
+ }
750
+
751
+ class InventoryService {
752
+ constructor(restService) {
753
+ this.restService = restService;
754
+ this.apiName = 'SmartWarehouse';
755
+ this.processBulkOperation = (dto) => this.restService.request({
756
+ method: 'POST',
757
+ url: '/api/smart-warehouse/sap-inventory/process-bulk-operation',
758
+ body: dto,
759
+ }, { apiName: this.apiName });
760
+ }
761
+ }
762
+ InventoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InventoryService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
763
+ InventoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InventoryService, providedIn: 'root' });
764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InventoryService, decorators: [{
765
+ type: Injectable,
766
+ args: [{ providedIn: 'root' }]
767
+ }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
768
+
769
+ class ShelfPlacementComponent {
770
+ constructor(inventoryService, warehouseService, toasterService) {
771
+ this.inventoryService = inventoryService;
772
+ this.warehouseService = warehouseService;
773
+ this.toasterService = toasterService;
774
+ this.barcode = '';
775
+ this.itemCode = '';
776
+ this.itemName = '';
777
+ this.batch = '';
778
+ this.selectedWarehouse = '';
779
+ this.shelf = '';
780
+ this.quantity = null;
781
+ this.operationType = 'entry';
782
+ this.isShelfFixed = false;
783
+ this.warehouses = [];
784
+ this.gridDataSource = [];
785
+ this.nextId = 1;
786
+ // Loading states
787
+ this.isLoadingWarehouses = false;
788
+ this.isLoadingShelf = false;
789
+ this.shelfAbsEntry = null;
790
+ // Grid button handler (arrow function to preserve context)
791
+ this.deleteRowHandler = (e) => {
792
+ if (e.event) {
793
+ e.event.preventDefault();
794
+ e.event.stopPropagation();
795
+ }
796
+ this.gridDataSource = this.gridDataSource.filter(item => item.id !== e.row.data.id);
797
+ };
798
+ }
799
+ ngOnInit() {
800
+ this.loadWarehouses();
801
+ }
802
+ ngAfterViewInit() {
803
+ // İlk açılışta raf alanına focus ver
804
+ setTimeout(() => {
805
+ this.shelfInputRef?.nativeElement?.focus();
806
+ }, 200);
807
+ }
808
+ /**
809
+ * Raf okutulduğunda çağrılır.
810
+ * BinCode üzerinden SAP'den AbsEntry bilgisini çeker.
811
+ * Focus'u barkod alanına geçirir.
812
+ */
813
+ onShelfScanned() {
814
+ if (!this.shelf?.trim()) {
815
+ return;
816
+ }
817
+ this.isLoadingShelf = true;
818
+ this.shelfAbsEntry = null;
819
+ this.warehouseService.getBinLocationByBinCode(this.shelf.trim()).subscribe({
820
+ next: (binLocation) => {
821
+ if (binLocation) {
822
+ this.shelfAbsEntry = binLocation.AbsEntry;
823
+ setTimeout(() => {
824
+ this.barcodeInputRef?.nativeElement?.focus();
825
+ }, 100);
826
+ }
827
+ else {
828
+ this.toasterService.warn(`"${this.shelf}" bin kodu ile eşleşen depo yeri bulunamadı.`);
829
+ }
830
+ this.isLoadingShelf = false;
831
+ },
832
+ error: (err) => {
833
+ console.error('Bin location arama hatası:', err);
834
+ this.toasterService.error('Depo yeri bilgisi SAP\'den alınamadı.');
835
+ this.isLoadingShelf = false;
836
+ }
837
+ });
838
+ }
839
+ /**
840
+ * Barkod okutulduğunda çağrılır.
841
+ * Kalem kodu ve parti bilgisini barkoddan parse eder.
842
+ * Focus'u miktar alanına geçirir.
843
+ */
844
+ onBarcodeScanned() {
845
+ if (!this.barcode?.trim()) {
846
+ return;
847
+ }
848
+ this.parseBarcodeAndFill(this.barcode.trim());
849
+ setTimeout(() => {
850
+ this.quantityInputRef?.nativeElement?.focus();
851
+ }, 100);
852
+ }
853
+ /**
854
+ * Barkodu parse eder ve kalem kodu ile parti alanlarını doldurur.
855
+ * İlk 13 karakter = ürün barkodu, 14. karakterden itibaren = parti numarası
856
+ */
857
+ parseBarcodeAndFill(barcodeValue) {
858
+ const productBarcode = barcodeValue.substring(0, 13);
859
+ const batchNumber = barcodeValue.length > 13 ? barcodeValue.substring(13) : '';
860
+ this.itemCode = '';
861
+ this.itemName = '';
862
+ // SAP'den barkod ile kalem bilgisi getir
863
+ this.warehouseService.getItemByBarcode(productBarcode).subscribe({
864
+ next: (itemInfo) => {
865
+ if (itemInfo) {
866
+ this.itemCode = itemInfo.ItemCode || '';
867
+ this.itemName = itemInfo.ItemName || '';
868
+ this.batch = batchNumber;
869
+ }
870
+ else {
871
+ this.itemCode = '';
872
+ this.itemName = '';
873
+ this.toasterService.warn(`Barkod "${productBarcode}" ile eşleşen kalem bulunamadı.`);
874
+ }
875
+ },
876
+ error: (err) => {
877
+ console.error('Barkod ile kalem arama hatası:', err);
878
+ this.itemCode = '';
879
+ this.itemName = '';
880
+ this.toasterService.error('Barkod ile kalem bilgisi SAP\'den alınamadı.');
881
+ }
882
+ });
883
+ }
884
+ /**
885
+ * Kalem koduna göre SAP'den kalem adını çeker.
886
+ */
887
+ fetchItemNameFromSAP(itemCode) {
888
+ if (!itemCode?.trim()) {
889
+ this.itemName = '';
890
+ return;
891
+ }
892
+ this.warehouseService.getItemNameByCode(itemCode.trim()).subscribe({
893
+ next: (itemName) => {
894
+ this.itemName = itemName || '';
895
+ },
896
+ error: (err) => {
897
+ console.error('Kalem adı alınamadı:', err);
898
+ this.itemName = '';
899
+ this.toasterService.error('Kalem adı SAP\'den alınamadı.');
900
+ }
901
+ });
902
+ }
903
+ /**
904
+ * Depo seçimi değiştiğinde çağrılır.
905
+ * Seçilen depoya ait depo yerlerini (bin locations) yükler.
906
+ */
907
+ onWarehouseChanged() {
908
+ this.shelf = '';
909
+ }
910
+ /**
911
+ * Ekle butonuna basıldığında çağrılır.
912
+ * Form verilerini grid'e ekler.
913
+ */
914
+ onAdd() {
915
+ if (!this.itemCode?.trim() || !this.selectedWarehouse?.trim() || !this.shelf?.trim() || !this.quantity) {
916
+ this.toasterService.warn('Kalem kodu, depo, raf ve miktar alanları zorunludur.');
917
+ return;
918
+ }
919
+ if (!this.shelfAbsEntry) {
920
+ this.toasterService.warn('Raf için geçerli bir AbsEntry bulunamadı. Lütfen rafı tekrar okutun.');
921
+ return;
922
+ }
923
+ const newItem = {
924
+ id: this.nextId++,
925
+ barcode: this.barcode.trim(),
926
+ itemCode: this.itemCode.trim(),
927
+ itemName: this.itemName.trim(),
928
+ batch: this.batch.trim(),
929
+ warehouse: this.selectedWarehouse.trim(),
930
+ shelf: this.shelf.trim(),
931
+ shelfAbsEntry: this.shelfAbsEntry,
932
+ quantity: this.quantity,
933
+ };
934
+ this.gridDataSource = [...this.gridDataSource, newItem];
935
+ // Alanları temizle (raf sabit değilse)
936
+ if (!this.isShelfFixed) {
937
+ this.onClear();
938
+ }
939
+ else {
940
+ // Raf sabit ise sadece barkod, kalem kodu, kalem adı, parti ve miktarı temizle (depo ve raf kalır)
941
+ this.barcode = '';
942
+ this.itemCode = '';
943
+ this.itemName = '';
944
+ this.batch = '';
945
+ this.quantity = null;
946
+ // Raf sabit ise focus barkod alanına dönsün
947
+ setTimeout(() => {
948
+ this.barcodeInputRef?.nativeElement?.focus();
949
+ }, 100);
950
+ }
951
+ }
952
+ /**
953
+ * Kaydet butonuna basıldığında çağrılır.
954
+ * Grid'deki tüm verileri toplu olarak kaydeder.
955
+ */
956
+ onSave() {
957
+ if (this.gridDataSource.length === 0) {
958
+ this.toasterService.warn('Kaydedilecek veri yok.');
959
+ return;
960
+ }
961
+ const dto = {
962
+ operationType: this.operationType,
963
+ items: this.gridDataSource.map(item => ({
964
+ barcode: item.itemCode,
965
+ batch: item.batch,
966
+ warehouse: item.warehouse,
967
+ shelf: item.shelfAbsEntry?.toString(),
968
+ quantity: item.quantity
969
+ }))
970
+ };
971
+ this.inventoryService.processBulkOperation(dto).subscribe({
972
+ next: (result) => {
973
+ this.toasterService.success(result);
974
+ // Başarılı kayıt sonrası grid'i temizle
975
+ this.gridDataSource = [];
976
+ this.nextId = 1;
977
+ this.onClear();
978
+ },
979
+ error: (error) => {
980
+ const errorMessage = error?.error?.error?.message || 'İşlem sırasında bir hata oluştu.';
981
+ this.toasterService.error(errorMessage);
982
+ }
983
+ });
984
+ }
985
+ /**
986
+ * Temizle butonuna basıldığında çağrılır.
987
+ */
988
+ onClear() {
989
+ this.barcode = '';
990
+ this.itemCode = '';
991
+ this.itemName = '';
992
+ this.batch = '';
993
+ this.quantity = null;
994
+ if (!this.isShelfFixed) {
995
+ this.shelf = '';
996
+ this.shelfAbsEntry = null;
997
+ // Raf sabit değilse focus raf alanına dönsün
998
+ setTimeout(() => {
999
+ this.shelfInputRef?.nativeElement?.focus();
1000
+ }, 100);
1001
+ }
1002
+ else {
1003
+ // Raf sabit ise focus barkod alanına dönsün
1004
+ setTimeout(() => {
1005
+ this.barcodeInputRef?.nativeElement?.focus();
1006
+ }, 100);
1007
+ }
1008
+ }
1009
+ /**
1010
+ * U_SWSmartWhs = "Y" olan depoları yükler.
1011
+ * İlk depoyu otomatik olarak seçer.
1012
+ */
1013
+ loadWarehouses() {
1014
+ this.isLoadingWarehouses = true;
1015
+ this.warehouseService.getSmartWarehouses().subscribe({
1016
+ next: (data) => {
1017
+ this.warehouses = data || [];
1018
+ console.log('Depolar yüklendi:', this.warehouses);
1019
+ // İlk depoyu otomatik seç ve bin location'ları yükle
1020
+ if (this.warehouses.length > 0) {
1021
+ this.selectedWarehouse = this.warehouses[0].WhsCode || '';
1022
+ this.onWarehouseChanged();
1023
+ }
1024
+ this.isLoadingWarehouses = false;
1025
+ },
1026
+ error: (err) => {
1027
+ console.error('Depolar yüklenemedi:', err);
1028
+ this.toasterService.error('Depolar yüklenemedi.');
1029
+ this.isLoadingWarehouses = false;
1030
+ }
1031
+ });
1032
+ }
1033
+ }
1034
+ ShelfPlacementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementComponent, deps: [{ token: InventoryService }, { token: WarehouseService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
1035
+ ShelfPlacementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ShelfPlacementComponent, selector: "lib-shelf-placement", viewQueries: [{ propertyName: "shelfInputRef", first: true, predicate: ["shelfInput"], descendants: true }, { propertyName: "barcodeInputRef", first: true, predicate: ["barcodeInput"], descendants: true }, { propertyName: "itemCodeInputRef", first: true, predicate: ["itemCodeInput"], descendants: true }, { propertyName: "quantityInputRef", first: true, predicate: ["quantityInput"], descendants: true }, { propertyName: "gridInstance", first: true, predicate: ["gridInstance"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Raf Yerle\u015Ftirme'\">\r\n\r\n <!-- Loading Overlay -->\r\n <div *ngIf=\"isLoadingWarehouses\" class=\"loading-overlay\">\r\n <div class=\"loading-spinner\">\r\n <i class=\"fa fa-spinner fa-spin fa-3x\"></i>\r\n <p class=\"mt-3\">Depolar y\u00FCkleniyor...</p>\r\n </div>\r\n </div>\r\n\r\n <div class=\"shelf-placement-container\">\r\n <div class=\"shelf-placement-layout\">\r\n <!-- Form Card -->\r\n <div class=\"shelf-form-card\">\r\n <!-- Radio Buttons: Giri\u015F / \u00C7\u0131k\u0131\u015F -->\r\n <!-- <div class=\"form-section\">\r\n <label class=\"section-label\">\u0130\u015Flem Tipi</label>\r\n <div class=\"radio-group\">\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input\" type=\"radio\" name=\"operationType\" id=\"opEntry\"\r\n value=\"entry\" [(ngModel)]=\"operationType\" />\r\n <label class=\"form-check-label\" for=\"opEntry\">Giri\u015F</label>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- <hr class=\"form-divider\" /> -->\r\n \r\n <!-- Depo -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"warehouseSelect\">Depo</label>\r\n <select class=\"form-select form-input\"\r\n id=\"warehouseSelect\"\r\n [(ngModel)]=\"selectedWarehouse\"\r\n (ngModelChange)=\"onWarehouseChanged()\">\r\n <option value=\"\">Depo se\u00E7in...</option>\r\n <option *ngFor=\"let wh of warehouses\" [value]=\"wh.WhsCode\">\r\n {{ wh.WhsCode }} - {{ wh.WhsName }}\r\n </option>\r\n </select>\r\n </div>\r\n\r\n <!-- Raf -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"shelfInput\">Raf</label>\r\n <input #shelfInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"shelfInput\"\r\n [(ngModel)]=\"shelf\"\r\n (keydown.enter)=\"onShelfScanned()\"\r\n (blur)=\"onShelfScanned()\"\r\n placeholder=\"Raf kodu girin...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Barkod -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"barcodeInput\">Barkod</label>\r\n <input #barcodeInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"barcodeInput\"\r\n [(ngModel)]=\"barcode\"\r\n (keydown.enter)=\"onBarcodeScanned()\"\r\n placeholder=\"Barkod okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Kalem Kodu -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"itemCodeInput\">Kalem Kodu</label>\r\n <input #itemCodeInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"itemCodeInput\"\r\n [(ngModel)]=\"itemCode\"\r\n [readOnly]=\"true\"\r\n placeholder=\"\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Kalem Ad\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"itemNameInput\">Kalem Ad\u0131</label>\r\n <input type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"itemNameInput\"\r\n [(ngModel)]=\"itemName\"\r\n [readOnly]=\"true\"\r\n placeholder=\"\" />\r\n </div>\r\n\r\n <!-- Parti -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"batchInput\">Parti</label>\r\n <input type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"batchInput\"\r\n [(ngModel)]=\"batch\"\r\n placeholder=\"Parti numaras\u0131...\" />\r\n </div>\r\n\r\n <!-- Miktar -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"quantityInput\">Miktar</label>\r\n <input #quantityInput\r\n type=\"number\"\r\n class=\"form-control form-input\"\r\n id=\"quantityInput\"\r\n [(ngModel)]=\"quantity\"\r\n (keydown.enter)=\"onAdd()\"\r\n placeholder=\"Miktar girin...\"\r\n min=\"0\" />\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Checkbox: Raf Sabit -->\r\n <div class=\"form-section\">\r\n <div class=\"form-check checkbox-group\">\r\n <input class=\"form-check-input\" type=\"checkbox\" id=\"fixedShelf\"\r\n [(ngModel)]=\"isShelfFixed\" />\r\n <label class=\"form-check-label\" for=\"fixedShelf\">Raf Sabit</label>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-primary btn-sm\" (click)=\"onAdd()\">\r\n <i class=\"fa fa-plus\"></i> Ekle\r\n </button>\r\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onSave()\" [disabled]=\"gridDataSource.length === 0\">\r\n <i class=\"fa fa-save\"></i> Toplu Kaydet ({{ gridDataSource.length }})\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid -->\r\n <div class=\"grid-card\">\r\n <div class=\"grid-header\">\r\n <h6 class=\"grid-title\">\r\n <i class=\"fa fa-list me-1\"></i>\r\n Raf Yerle\u015Ftirme Listesi ({{ gridDataSource.length }})\r\n </h6>\r\n </div>\r\n <dx-data-grid\r\n #gridInstance\r\n [dataSource]=\"gridDataSource\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [rowAlternationEnabled]=\"true\"\r\n [allowColumnResizing]=\"true\"\r\n style=\"height: 65vh; min-height: 500px;\"\r\n >\r\n <dxo-paging [enabled]=\"false\"></dxo-paging>\r\n <dxo-scrolling mode=\"standard\"></dxo-scrolling>\r\n \r\n <dxi-column\r\n dataField=\"barcode\"\r\n caption=\"Barkod\"\r\n [width]=\"150\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"itemCode\"\r\n caption=\"Kalem Kodu\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"itemName\"\r\n caption=\"Kalem Ad\u0131\"\r\n [width]=\"200\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"batch\"\r\n caption=\"Parti\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"warehouse\"\r\n caption=\"Depo\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"shelf\"\r\n caption=\"Raf\"\r\n [width]=\"150\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"quantity\"\r\n caption=\"Miktar\"\r\n dataType=\"number\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n type=\"buttons\"\r\n [width]=\"80\"\r\n >\r\n <dxi-button\r\n icon=\"trash\"\r\n hint=\"Sil\"\r\n [onClick]=\"deleteRowHandler\"\r\n ></dxi-button>\r\n </dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</abp-page>\r\n", styles: [".shelf-placement-container{width:100%}.shelf-placement-layout{display:flex;gap:20px;align-items:flex-start}.shelf-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;flex:0 0 450px;min-width:320px}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.form-input[readonly]{background:#f5f5f5;color:#888}.radio-group{display:flex;gap:20px;align-items:center}.radio-group .form-check{margin:0;padding-left:22px}.radio-group .form-check-label{font-size:14px;cursor:pointer;white-space:nowrap;font-weight:500}.checkbox-group{display:flex;align-items:center;gap:8px}.checkbox-group .form-check-label{font-size:14px;cursor:pointer;font-weight:500}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-primary{background:#556ee6;color:#fff;border:none}.btn-action-primary:hover{background:#4458cb;color:#fff}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.grid-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;box-shadow:0 1px 3px #0000000f;overflow:hidden;flex:1;min-width:0;display:flex;flex-direction:column;min-height:500px}.grid-header{display:flex;justify-content:flex-start;align-items:center;padding:12px 16px;background:#f8f9fa;border-bottom:1px solid #e0e0e0}.grid-title{margin:0;font-size:14px;font-weight:600;color:#495057}.grid-card dx-data-grid{padding:0;flex:1}@media (max-width: 1200px){.shelf-placement-layout{flex-direction:column}.shelf-form-card{flex:1;width:100%}.grid-card{width:100%;min-height:400px}}@media (max-width: 768px){.shelf-placement-container{padding:0 8px}.shelf-form-card{padding:16px;min-width:100%}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}.loading-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:9999}.loading-spinner{background:#fff;padding:40px 60px;border-radius:8px;box-shadow:0 10px 40px #0000004d;text-align:center}.loading-spinner i{color:#556ee6}.loading-spinner p{margin:0;font-size:16px;font-weight:500;color:#495057}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i5.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i7.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i7.DxiButtonComponent, selector: "dxi-button", inputs: ["location", "name", "options", "cssClass", "disabled", "hint", "icon", "onClick", "template", "text", "visible"] }, { kind: "component", type: i7.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i7.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }] });
1036
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementComponent, decorators: [{
1037
+ type: Component,
1038
+ args: [{ selector: 'lib-shelf-placement', template: "<abp-page [title]=\"'Raf Yerle\u015Ftirme'\">\r\n\r\n <!-- Loading Overlay -->\r\n <div *ngIf=\"isLoadingWarehouses\" class=\"loading-overlay\">\r\n <div class=\"loading-spinner\">\r\n <i class=\"fa fa-spinner fa-spin fa-3x\"></i>\r\n <p class=\"mt-3\">Depolar y\u00FCkleniyor...</p>\r\n </div>\r\n </div>\r\n\r\n <div class=\"shelf-placement-container\">\r\n <div class=\"shelf-placement-layout\">\r\n <!-- Form Card -->\r\n <div class=\"shelf-form-card\">\r\n <!-- Radio Buttons: Giri\u015F / \u00C7\u0131k\u0131\u015F -->\r\n <!-- <div class=\"form-section\">\r\n <label class=\"section-label\">\u0130\u015Flem Tipi</label>\r\n <div class=\"radio-group\">\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input\" type=\"radio\" name=\"operationType\" id=\"opEntry\"\r\n value=\"entry\" [(ngModel)]=\"operationType\" />\r\n <label class=\"form-check-label\" for=\"opEntry\">Giri\u015F</label>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- <hr class=\"form-divider\" /> -->\r\n \r\n <!-- Depo -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"warehouseSelect\">Depo</label>\r\n <select class=\"form-select form-input\"\r\n id=\"warehouseSelect\"\r\n [(ngModel)]=\"selectedWarehouse\"\r\n (ngModelChange)=\"onWarehouseChanged()\">\r\n <option value=\"\">Depo se\u00E7in...</option>\r\n <option *ngFor=\"let wh of warehouses\" [value]=\"wh.WhsCode\">\r\n {{ wh.WhsCode }} - {{ wh.WhsName }}\r\n </option>\r\n </select>\r\n </div>\r\n\r\n <!-- Raf -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"shelfInput\">Raf</label>\r\n <input #shelfInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"shelfInput\"\r\n [(ngModel)]=\"shelf\"\r\n (keydown.enter)=\"onShelfScanned()\"\r\n (blur)=\"onShelfScanned()\"\r\n placeholder=\"Raf kodu girin...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Barkod -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"barcodeInput\">Barkod</label>\r\n <input #barcodeInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"barcodeInput\"\r\n [(ngModel)]=\"barcode\"\r\n (keydown.enter)=\"onBarcodeScanned()\"\r\n placeholder=\"Barkod okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Kalem Kodu -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"itemCodeInput\">Kalem Kodu</label>\r\n <input #itemCodeInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"itemCodeInput\"\r\n [(ngModel)]=\"itemCode\"\r\n [readOnly]=\"true\"\r\n placeholder=\"\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Kalem Ad\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"itemNameInput\">Kalem Ad\u0131</label>\r\n <input type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"itemNameInput\"\r\n [(ngModel)]=\"itemName\"\r\n [readOnly]=\"true\"\r\n placeholder=\"\" />\r\n </div>\r\n\r\n <!-- Parti -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"batchInput\">Parti</label>\r\n <input type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"batchInput\"\r\n [(ngModel)]=\"batch\"\r\n placeholder=\"Parti numaras\u0131...\" />\r\n </div>\r\n\r\n <!-- Miktar -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"quantityInput\">Miktar</label>\r\n <input #quantityInput\r\n type=\"number\"\r\n class=\"form-control form-input\"\r\n id=\"quantityInput\"\r\n [(ngModel)]=\"quantity\"\r\n (keydown.enter)=\"onAdd()\"\r\n placeholder=\"Miktar girin...\"\r\n min=\"0\" />\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Checkbox: Raf Sabit -->\r\n <div class=\"form-section\">\r\n <div class=\"form-check checkbox-group\">\r\n <input class=\"form-check-input\" type=\"checkbox\" id=\"fixedShelf\"\r\n [(ngModel)]=\"isShelfFixed\" />\r\n <label class=\"form-check-label\" for=\"fixedShelf\">Raf Sabit</label>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-primary btn-sm\" (click)=\"onAdd()\">\r\n <i class=\"fa fa-plus\"></i> Ekle\r\n </button>\r\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onSave()\" [disabled]=\"gridDataSource.length === 0\">\r\n <i class=\"fa fa-save\"></i> Toplu Kaydet ({{ gridDataSource.length }})\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid -->\r\n <div class=\"grid-card\">\r\n <div class=\"grid-header\">\r\n <h6 class=\"grid-title\">\r\n <i class=\"fa fa-list me-1\"></i>\r\n Raf Yerle\u015Ftirme Listesi ({{ gridDataSource.length }})\r\n </h6>\r\n </div>\r\n <dx-data-grid\r\n #gridInstance\r\n [dataSource]=\"gridDataSource\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [rowAlternationEnabled]=\"true\"\r\n [allowColumnResizing]=\"true\"\r\n style=\"height: 65vh; min-height: 500px;\"\r\n >\r\n <dxo-paging [enabled]=\"false\"></dxo-paging>\r\n <dxo-scrolling mode=\"standard\"></dxo-scrolling>\r\n \r\n <dxi-column\r\n dataField=\"barcode\"\r\n caption=\"Barkod\"\r\n [width]=\"150\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"itemCode\"\r\n caption=\"Kalem Kodu\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"itemName\"\r\n caption=\"Kalem Ad\u0131\"\r\n [width]=\"200\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"batch\"\r\n caption=\"Parti\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"warehouse\"\r\n caption=\"Depo\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"shelf\"\r\n caption=\"Raf\"\r\n [width]=\"150\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"quantity\"\r\n caption=\"Miktar\"\r\n dataType=\"number\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n type=\"buttons\"\r\n [width]=\"80\"\r\n >\r\n <dxi-button\r\n icon=\"trash\"\r\n hint=\"Sil\"\r\n [onClick]=\"deleteRowHandler\"\r\n ></dxi-button>\r\n </dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</abp-page>\r\n", styles: [".shelf-placement-container{width:100%}.shelf-placement-layout{display:flex;gap:20px;align-items:flex-start}.shelf-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;flex:0 0 450px;min-width:320px}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.form-input[readonly]{background:#f5f5f5;color:#888}.radio-group{display:flex;gap:20px;align-items:center}.radio-group .form-check{margin:0;padding-left:22px}.radio-group .form-check-label{font-size:14px;cursor:pointer;white-space:nowrap;font-weight:500}.checkbox-group{display:flex;align-items:center;gap:8px}.checkbox-group .form-check-label{font-size:14px;cursor:pointer;font-weight:500}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-primary{background:#556ee6;color:#fff;border:none}.btn-action-primary:hover{background:#4458cb;color:#fff}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.grid-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;box-shadow:0 1px 3px #0000000f;overflow:hidden;flex:1;min-width:0;display:flex;flex-direction:column;min-height:500px}.grid-header{display:flex;justify-content:flex-start;align-items:center;padding:12px 16px;background:#f8f9fa;border-bottom:1px solid #e0e0e0}.grid-title{margin:0;font-size:14px;font-weight:600;color:#495057}.grid-card dx-data-grid{padding:0;flex:1}@media (max-width: 1200px){.shelf-placement-layout{flex-direction:column}.shelf-form-card{flex:1;width:100%}.grid-card{width:100%;min-height:400px}}@media (max-width: 768px){.shelf-placement-container{padding:0 8px}.shelf-form-card{padding:16px;min-width:100%}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}.loading-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:9999}.loading-spinner{background:#fff;padding:40px 60px;border-radius:8px;box-shadow:0 10px 40px #0000004d;text-align:center}.loading-spinner i{color:#556ee6}.loading-spinner p{margin:0;font-size:16px;font-weight:500;color:#495057}\n"] }]
1039
+ }], ctorParameters: function () { return [{ type: InventoryService }, { type: WarehouseService }, { type: i2.ToasterService }]; }, propDecorators: { shelfInputRef: [{
1040
+ type: ViewChild,
1041
+ args: ['shelfInput', { static: false }]
1042
+ }], barcodeInputRef: [{
1043
+ type: ViewChild,
1044
+ args: ['barcodeInput', { static: false }]
1045
+ }], itemCodeInputRef: [{
1046
+ type: ViewChild,
1047
+ args: ['itemCodeInput', { static: false }]
1048
+ }], quantityInputRef: [{
1049
+ type: ViewChild,
1050
+ args: ['quantityInput', { static: false }]
1051
+ }], gridInstance: [{
1052
+ type: ViewChild,
1053
+ args: ['gridInstance', { static: false }]
1054
+ }] } });
1055
+
1056
+ const routes$8 = [
1057
+ {
1058
+ path: '',
1059
+ component: ShelfPlacementComponent,
1060
+ },
1061
+ ];
1062
+ class ShelfPlacementModule {
1063
+ }
1064
+ ShelfPlacementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1065
+ ShelfPlacementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementModule, declarations: [ShelfPlacementComponent], imports: [CoreModule,
1066
+ ThemeSharedModule,
1067
+ FormsModule,
1068
+ CommercialUiModule,
1069
+ NgxValidateCoreModule,
1070
+ NgbCollapseModule,
1071
+ NgbDatepickerModule,
1072
+ NgbDropdownModule,
1073
+ DxDataGridModule,
1074
+ PageModule, i1$1.RouterModule] });
1075
+ ShelfPlacementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementModule, imports: [CoreModule,
1076
+ ThemeSharedModule,
1077
+ FormsModule,
1078
+ CommercialUiModule,
1079
+ NgxValidateCoreModule,
1080
+ NgbCollapseModule,
1081
+ NgbDatepickerModule,
1082
+ NgbDropdownModule,
1083
+ DxDataGridModule,
1084
+ PageModule,
1085
+ RouterModule.forChild(routes$8)] });
1086
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementModule, decorators: [{
1087
+ type: NgModule,
1088
+ args: [{
1089
+ declarations: [ShelfPlacementComponent],
1090
+ imports: [
1091
+ CoreModule,
1092
+ ThemeSharedModule,
1093
+ FormsModule,
1094
+ CommercialUiModule,
1095
+ NgxValidateCoreModule,
1096
+ NgbCollapseModule,
1097
+ NgbDatepickerModule,
1098
+ NgbDropdownModule,
1099
+ DxDataGridModule,
1100
+ PageModule,
1101
+ RouterModule.forChild(routes$8),
1102
+ ],
1103
+ }]
1104
+ }] });
1105
+ function loadShelfPlacementModuleAsChild() {
1106
+ return Promise.resolve(ShelfPlacementModule);
1107
+ }
1108
+
1109
+ class StockTransferService {
1110
+ constructor(restService) {
1111
+ this.restService = restService;
1112
+ this.apiName = 'SmartWarehouse';
1113
+ this.createShelfTransfer = (dto) => this.restService.request({
1114
+ method: 'POST',
1115
+ url: '/api/smart-warehouse/sap-stock-transfer/create-shelf-transfer',
1116
+ body: dto,
1117
+ }, { apiName: this.apiName });
1118
+ }
1119
+ }
1120
+ StockTransferService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockTransferService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
1121
+ StockTransferService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockTransferService, providedIn: 'root' });
1122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockTransferService, decorators: [{
1123
+ type: Injectable,
1124
+ args: [{ providedIn: 'root' }]
1125
+ }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
1126
+
1127
+ class ShelfTransferComponent {
1128
+ constructor(warehouseService, stockTransferService, toasterService) {
1129
+ this.warehouseService = warehouseService;
1130
+ this.stockTransferService = stockTransferService;
1131
+ this.toasterService = toasterService;
1132
+ this.sourceBinCode = '';
1133
+ this.destinationBinCode = '';
1134
+ this.sourceBinAbsEntry = null;
1135
+ this.destinationBinAbsEntry = null;
1136
+ this.quantity = null;
1137
+ this.binContent = null;
1138
+ this.isLoadingContent = false;
1139
+ this.isLoadingDestination = false;
1140
+ this.isSaving = false;
1141
+ }
1142
+ onSourceBinEnter() {
1143
+ this.binContent = null;
1144
+ this.sourceBinAbsEntry = null;
1145
+ if (!this.sourceBinCode || this.sourceBinCode.trim() === '') {
1146
+ return;
1147
+ }
1148
+ this.isLoadingContent = true;
1149
+ this.warehouseService.getBinLocationByBinCode(this.sourceBinCode.trim()).subscribe({
1150
+ next: (binLocation) => {
1151
+ if (!binLocation) {
1152
+ this.toasterService.warn('Depo yeri bulunamad\u0131.');
1153
+ this.isLoadingContent = false;
1154
+ return;
1155
+ }
1156
+ this.sourceBinAbsEntry = binLocation.AbsEntry;
1157
+ this.loadBinContent(binLocation.AbsEntry);
1158
+ },
1159
+ error: () => {
1160
+ this.toasterService.error('Depo yeri sorgulanamad\u0131.');
1161
+ this.isLoadingContent = false;
1162
+ },
1163
+ });
1164
+ }
1165
+ onDestinationBinEnter() {
1166
+ this.destinationBinAbsEntry = null;
1167
+ if (!this.destinationBinCode || this.destinationBinCode.trim() === '') {
1168
+ return;
1169
+ }
1170
+ this.isLoadingDestination = true;
1171
+ this.warehouseService.getBinLocationByBinCode(this.destinationBinCode.trim()).subscribe({
1172
+ next: (binLocation) => {
1173
+ if (!binLocation) {
1174
+ this.toasterService.warn('Giri\u015f depo yeri bulunamad\u0131.');
1175
+ this.isLoadingDestination = false;
1176
+ return;
1177
+ }
1178
+ this.destinationBinAbsEntry = binLocation.AbsEntry;
1179
+ this.isLoadingDestination = false;
1180
+ },
1181
+ error: () => {
1182
+ this.toasterService.error('Giri\u015f depo yeri sorgulanamad\u0131.');
1183
+ this.isLoadingDestination = false;
1184
+ },
1185
+ });
1186
+ }
1187
+ onSave() {
1188
+ if (!this.sourceBinAbsEntry) {
1189
+ this.toasterService.warn('\u00c7\u0131k\u0131\u015f raf\u0131 giriniz.');
1190
+ return;
1191
+ }
1192
+ if (!this.binContent) {
1193
+ this.toasterService.warn('Se\u00e7ilen rafta kalem bilgisi bulunamad\u0131.');
1194
+ return;
1195
+ }
1196
+ if (!this.destinationBinAbsEntry) {
1197
+ this.toasterService.warn('Giri\u015f raf\u0131 giriniz.');
1198
+ return;
1199
+ }
1200
+ if (this.sourceBinAbsEntry === this.destinationBinAbsEntry) {
1201
+ this.toasterService.warn('\u00c7\u0131k\u0131\u015f ve giri\u015f raf\u0131 ayn\u0131 olamaz.');
1202
+ return;
1203
+ }
1204
+ if (!this.quantity || this.quantity <= 0) {
1205
+ this.toasterService.warn('Ge\u00e7erli bir miktar giriniz.');
1206
+ return;
1207
+ }
1208
+ if (this.quantity > this.binContent.OnHandQty) {
1209
+ this.toasterService.warn(`Miktar, mevcut stoktan (${this.binContent.OnHandQty}) fazla olamaz.`);
1210
+ return;
1211
+ }
1212
+ const dto = {
1213
+ fromBinAbsEntry: this.sourceBinAbsEntry,
1214
+ toBinAbsEntry: this.destinationBinAbsEntry,
1215
+ itemCode: this.binContent.ItemCode,
1216
+ batchNumber: this.binContent.BatchNumber,
1217
+ warehouseCode: this.binContent.WarehouseCode,
1218
+ quantity: this.quantity,
1219
+ };
1220
+ this.isSaving = true;
1221
+ this.stockTransferService.createShelfTransfer(dto).subscribe({
1222
+ next: (result) => {
1223
+ this.toasterService.success(result);
1224
+ this.onClear();
1225
+ this.isSaving = false;
1226
+ },
1227
+ error: (error) => {
1228
+ const errorMessage = error?.error?.error?.message || '\u0130\u015flem s\u0131ras\u0131nda bir hata olu\u015ftu.';
1229
+ this.toasterService.error(errorMessage);
1230
+ this.isSaving = false;
1231
+ },
1232
+ });
1233
+ }
1234
+ onClear() {
1235
+ this.sourceBinCode = '';
1236
+ this.destinationBinCode = '';
1237
+ this.sourceBinAbsEntry = null;
1238
+ this.destinationBinAbsEntry = null;
1239
+ this.quantity = null;
1240
+ this.binContent = null;
1241
+ }
1242
+ loadBinContent(binAbsEntry) {
1243
+ this.warehouseService.getBinLocationContent(binAbsEntry).subscribe({
1244
+ next: (data) => {
1245
+ this.binContent = data || null;
1246
+ this.isLoadingContent = false;
1247
+ if (!data) {
1248
+ this.toasterService.warn('Bu depo yerinde kalem bulunamad\u0131.');
1249
+ }
1250
+ },
1251
+ error: () => {
1252
+ this.toasterService.error('Depo yeri i\u00e7eri\u011fi y\u00fcklenemedi.');
1253
+ this.isLoadingContent = false;
1254
+ },
1255
+ });
1256
+ }
1257
+ }
1258
+ ShelfTransferComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferComponent, deps: [{ token: WarehouseService }, { token: StockTransferService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
1259
+ ShelfTransferComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ShelfTransferComponent, selector: "lib-shelf-transfer", ngImport: i0, template: "<abp-page [title]=\"'Raf Transfer'\">\r\n <div class=\"shelf-transfer-container\">\r\n <div class=\"shelf-transfer-layout\">\r\n <div class=\"shelf-form-card\">\r\n\r\n <!-- \u00C7\u0131k\u0131\u015F Raf\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"sourceBinInput\">\u00C7\u0131k\u0131\u015F Raf\u0131</label>\r\n <input type=\"text\" class=\"form-control form-input\" id=\"sourceBinInput\"\r\n [(ngModel)]=\"sourceBinCode\"\r\n (keydown.enter)=\"onSourceBinEnter()\"\r\n (blur)=\"onSourceBinEnter()\"\r\n placeholder=\"Depo yeri kodu girin...\"\r\n [disabled]=\"isLoadingContent\" />\r\n </div>\r\n\r\n <!-- Kalem Bilgisi -->\r\n <div class=\"form-section\" *ngIf=\"isLoadingContent\">\r\n <div class=\"content-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Kalem bilgisi y\u00FCkleniyor...\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"binContent && !isLoadingContent\">\r\n <div class=\"bin-content-card\">\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Kalem Kodu:</span>\r\n <span class=\"content-value\">{{ binContent.ItemCode }}</span>\r\n </div>\r\n <div class=\"content-row\" *ngIf=\"binContent.ItemName\">\r\n <span class=\"content-label\">Kalem Ad\u0131:</span>\r\n <span class=\"content-value\">{{ binContent.ItemName }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Parti:</span>\r\n <span class=\"content-value\">{{ binContent.BatchNumber }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Mevcut Miktar:</span>\r\n <span class=\"content-value content-qty\">{{ binContent.OnHandQty }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Depo:</span>\r\n <span class=\"content-value\">{{ binContent.WarehouseCode }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"sourceBinAbsEntry && !binContent && !isLoadingContent\">\r\n <div class=\"bin-content-empty\">\r\n <i class=\"fa fa-info-circle\"></i> Bu depo yerinde kalem bulunamad\u0131.\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Giri\u015F Raf\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"destBinInput\">Giri\u015F Raf\u0131</label>\r\n <input type=\"text\" class=\"form-control form-input\" id=\"destBinInput\"\r\n [(ngModel)]=\"destinationBinCode\"\r\n (keydown.enter)=\"onDestinationBinEnter()\"\r\n (blur)=\"onDestinationBinEnter()\"\r\n placeholder=\"Depo yeri kodu girin...\"\r\n [disabled]=\"isLoadingDestination\" />\r\n <div *ngIf=\"isLoadingDestination\" class=\"content-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Depo yeri sorgulan\u0131yor...\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Miktar -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"quantityInput\">Miktar</label>\r\n <input type=\"number\" class=\"form-control form-input\" id=\"quantityInput\"\r\n [(ngModel)]=\"quantity\" (keydown.enter)=\"onSave()\"\r\n placeholder=\"Miktar girin...\" min=\"0\"\r\n [max]=\"binContent?.OnHandQty\" />\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onSave()\"\r\n [disabled]=\"isSaving || !sourceBinAbsEntry || !destinationBinAbsEntry || !quantity || !binContent\">\r\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-save'\"></i>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\" [disabled]=\"isSaving\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n", styles: [".shelf-transfer-container{width:100%}.shelf-transfer-layout{display:flex;justify-content:center;align-items:flex-start}.shelf-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;width:500px;max-width:100%}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-dx-select{width:100%}::ng-deep .form-dx-select .dx-texteditor-input{height:40px;font-size:14px}::ng-deep .form-dx-select .dx-dropdowneditor-icon{height:40px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.bin-content-card{background:#f8f9fa;border:1px solid #e0e0e0;border-radius:6px;padding:12px 16px}.content-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-bottom:1px solid #eee}.content-row:last-child{border-bottom:none}.content-label{font-size:12px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.3px}.content-value{font-size:14px;font-weight:500;color:#333}.content-qty{color:#34c38f;font-weight:700;font-size:16px}.content-loading{padding:12px 0;color:#6c757d;font-size:13px}.content-loading i{color:#556ee6;margin-right:6px}.bin-content-empty{background:#fff3cd;border:1px solid #ffc107;border-radius:6px;padding:10px 14px;font-size:13px;color:#856404}.bin-content-empty i{margin-right:4px}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.loading-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:9999}.loading-spinner{background:#fff;padding:40px 60px;border-radius:8px;box-shadow:0 10px 40px #0000004d;text-align:center}.loading-spinner i{color:#556ee6}.loading-spinner p{margin:0;font-size:16px;font-weight:500;color:#495057}@media (max-width: 768px){.shelf-form-card{padding:16px;width:100%}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i5.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }] });
1260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferComponent, decorators: [{
1261
+ type: Component,
1262
+ args: [{ selector: 'lib-shelf-transfer', template: "<abp-page [title]=\"'Raf Transfer'\">\r\n <div class=\"shelf-transfer-container\">\r\n <div class=\"shelf-transfer-layout\">\r\n <div class=\"shelf-form-card\">\r\n\r\n <!-- \u00C7\u0131k\u0131\u015F Raf\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"sourceBinInput\">\u00C7\u0131k\u0131\u015F Raf\u0131</label>\r\n <input type=\"text\" class=\"form-control form-input\" id=\"sourceBinInput\"\r\n [(ngModel)]=\"sourceBinCode\"\r\n (keydown.enter)=\"onSourceBinEnter()\"\r\n (blur)=\"onSourceBinEnter()\"\r\n placeholder=\"Depo yeri kodu girin...\"\r\n [disabled]=\"isLoadingContent\" />\r\n </div>\r\n\r\n <!-- Kalem Bilgisi -->\r\n <div class=\"form-section\" *ngIf=\"isLoadingContent\">\r\n <div class=\"content-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Kalem bilgisi y\u00FCkleniyor...\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"binContent && !isLoadingContent\">\r\n <div class=\"bin-content-card\">\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Kalem Kodu:</span>\r\n <span class=\"content-value\">{{ binContent.ItemCode }}</span>\r\n </div>\r\n <div class=\"content-row\" *ngIf=\"binContent.ItemName\">\r\n <span class=\"content-label\">Kalem Ad\u0131:</span>\r\n <span class=\"content-value\">{{ binContent.ItemName }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Parti:</span>\r\n <span class=\"content-value\">{{ binContent.BatchNumber }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Mevcut Miktar:</span>\r\n <span class=\"content-value content-qty\">{{ binContent.OnHandQty }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Depo:</span>\r\n <span class=\"content-value\">{{ binContent.WarehouseCode }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"sourceBinAbsEntry && !binContent && !isLoadingContent\">\r\n <div class=\"bin-content-empty\">\r\n <i class=\"fa fa-info-circle\"></i> Bu depo yerinde kalem bulunamad\u0131.\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Giri\u015F Raf\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"destBinInput\">Giri\u015F Raf\u0131</label>\r\n <input type=\"text\" class=\"form-control form-input\" id=\"destBinInput\"\r\n [(ngModel)]=\"destinationBinCode\"\r\n (keydown.enter)=\"onDestinationBinEnter()\"\r\n (blur)=\"onDestinationBinEnter()\"\r\n placeholder=\"Depo yeri kodu girin...\"\r\n [disabled]=\"isLoadingDestination\" />\r\n <div *ngIf=\"isLoadingDestination\" class=\"content-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Depo yeri sorgulan\u0131yor...\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Miktar -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"quantityInput\">Miktar</label>\r\n <input type=\"number\" class=\"form-control form-input\" id=\"quantityInput\"\r\n [(ngModel)]=\"quantity\" (keydown.enter)=\"onSave()\"\r\n placeholder=\"Miktar girin...\" min=\"0\"\r\n [max]=\"binContent?.OnHandQty\" />\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onSave()\"\r\n [disabled]=\"isSaving || !sourceBinAbsEntry || !destinationBinAbsEntry || !quantity || !binContent\">\r\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-save'\"></i>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\" [disabled]=\"isSaving\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n", styles: [".shelf-transfer-container{width:100%}.shelf-transfer-layout{display:flex;justify-content:center;align-items:flex-start}.shelf-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;width:500px;max-width:100%}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-dx-select{width:100%}::ng-deep .form-dx-select .dx-texteditor-input{height:40px;font-size:14px}::ng-deep .form-dx-select .dx-dropdowneditor-icon{height:40px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.bin-content-card{background:#f8f9fa;border:1px solid #e0e0e0;border-radius:6px;padding:12px 16px}.content-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-bottom:1px solid #eee}.content-row:last-child{border-bottom:none}.content-label{font-size:12px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.3px}.content-value{font-size:14px;font-weight:500;color:#333}.content-qty{color:#34c38f;font-weight:700;font-size:16px}.content-loading{padding:12px 0;color:#6c757d;font-size:13px}.content-loading i{color:#556ee6;margin-right:6px}.bin-content-empty{background:#fff3cd;border:1px solid #ffc107;border-radius:6px;padding:10px 14px;font-size:13px;color:#856404}.bin-content-empty i{margin-right:4px}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.loading-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:9999}.loading-spinner{background:#fff;padding:40px 60px;border-radius:8px;box-shadow:0 10px 40px #0000004d;text-align:center}.loading-spinner i{color:#556ee6}.loading-spinner p{margin:0;font-size:16px;font-weight:500;color:#495057}@media (max-width: 768px){.shelf-form-card{padding:16px;width:100%}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}\n"] }]
1263
+ }], ctorParameters: function () { return [{ type: WarehouseService }, { type: StockTransferService }, { type: i2.ToasterService }]; } });
1264
+
1265
+ const routes$7 = [
1266
+ { path: '', component: ShelfTransferComponent },
1267
+ ];
1268
+ class ShelfTransferModule {
1269
+ }
1270
+ ShelfTransferModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1271
+ ShelfTransferModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferModule, declarations: [ShelfTransferComponent], imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1272
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1273
+ NgbDropdownModule, PageModule, i1$1.RouterModule] });
1274
+ ShelfTransferModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferModule, imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1275
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1276
+ NgbDropdownModule, PageModule,
1277
+ RouterModule.forChild(routes$7)] });
1278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferModule, decorators: [{
1279
+ type: NgModule,
1280
+ args: [{
1281
+ declarations: [ShelfTransferComponent],
1282
+ imports: [
1283
+ CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1284
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1285
+ NgbDropdownModule, PageModule,
1286
+ RouterModule.forChild(routes$7),
1287
+ ],
1288
+ }]
1289
+ }] });
1290
+ function loadShelfTransferModuleAsChild() {
1291
+ return Promise.resolve(ShelfTransferModule);
1292
+ }
1293
+
1294
+ class OrderStationService {
1295
+ constructor(restService) {
1296
+ this.restService = restService;
1297
+ this.apiName = 'SmartWarehouse';
1298
+ this.createOrderStation = (dto) => this.restService.request({ method: 'POST', url: '/api/smart-warehouse/sap-order-station/create', body: dto }, { apiName: this.apiName });
1299
+ this.getOrderStatus = (docEntry) => this.restService.request({ method: 'GET', url: `/api/smart-warehouse/sap-order-station/order-status/${docEntry}` }, { apiName: this.apiName });
1300
+ }
1301
+ }
1302
+ OrderStationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
1303
+ OrderStationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationService, providedIn: 'root' });
1304
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationService, decorators: [{
1305
+ type: Injectable,
1306
+ args: [{ providedIn: 'root' }]
1307
+ }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
1308
+
1309
+ class OrderStationComponent {
1310
+ constructor(orderStationService, toasterService) {
1311
+ this.orderStationService = orderStationService;
1312
+ this.toasterService = toasterService;
1313
+ this.stationCode = '';
1314
+ this.eyeCode = '';
1315
+ this.absBinEntry = '';
1316
+ this.orderId = '';
1317
+ this.isSaving = false;
1318
+ this.isCheckingOrder = false;
1319
+ this.orderStatus = null;
1320
+ }
1321
+ ngAfterViewInit() {
1322
+ setTimeout(() => {
1323
+ this.stationInputRef?.nativeElement?.focus();
1324
+ }, 200);
1325
+ }
1326
+ onStationScanned() {
1327
+ if (!this.stationCode?.trim())
1328
+ return;
1329
+ setTimeout(() => {
1330
+ this.shelfInputRef?.nativeElement?.focus();
1331
+ }, 100);
1332
+ }
1333
+ onShelfScanned() {
1334
+ if (!this.eyeCode?.trim())
1335
+ return;
1336
+ setTimeout(() => {
1337
+ this.binInputRef?.nativeElement?.focus();
1338
+ }, 100);
1339
+ }
1340
+ onBinScanned() {
1341
+ if (!this.absBinEntry?.trim())
1342
+ return;
1343
+ setTimeout(() => {
1344
+ this.orderInputRef?.nativeElement?.focus();
1345
+ }, 100);
1346
+ }
1347
+ onOrderChanged() {
1348
+ this.orderStatus = null;
1349
+ }
1350
+ onOrderScanned() {
1351
+ if (!this.orderId?.trim())
1352
+ return;
1353
+ const orderIdNum = Number(this.orderId.trim());
1354
+ if (isNaN(orderIdNum)) {
1355
+ this.toasterService.warn('Sipariş alanı sayısal bir değer olmalıdır.');
1356
+ return;
1357
+ }
1358
+ this.checkOrderStatus(orderIdNum);
1359
+ }
1360
+ checkOrderStatus(docEntry) {
1361
+ this.isCheckingOrder = true;
1362
+ this.orderStatus = null;
1363
+ this.orderStationService.getOrderStatus(docEntry).subscribe({
1364
+ next: (result) => {
1365
+ console.log(result);
1366
+ this.orderStatus = result;
1367
+ this.isCheckingOrder = false;
1368
+ if (!result.IsEligibleForMatching) {
1369
+ this.toasterService.error(`Bu siparişin durumu ${result.StatusText}. Eşleştirme işlemi yapılamaz.`);
1370
+ }
1371
+ },
1372
+ error: (error) => {
1373
+ const errorMessage = error?.error?.error?.message || 'Sipariş durumu kontrol edilemedi.';
1374
+ this.toasterService.error(errorMessage);
1375
+ this.isCheckingOrder = false;
1376
+ this.orderStatus = null;
1377
+ },
1378
+ });
1379
+ }
1380
+ onSave() {
1381
+ if (!this.stationCode?.trim()) {
1382
+ this.toasterService.warn('İstasyon alanı zorunludur.');
1383
+ return;
1384
+ }
1385
+ if (!this.eyeCode?.trim()) {
1386
+ this.toasterService.warn('Raf alanı zorunludur.');
1387
+ return;
1388
+ }
1389
+ if (!this.absBinEntry?.trim()) {
1390
+ this.toasterService.warn('Toplanacak Kasa alanı zorunludur.');
1391
+ return;
1392
+ }
1393
+ if (!this.orderId?.trim()) {
1394
+ this.toasterService.warn('Sipariş alanı zorunludur.');
1395
+ return;
1396
+ }
1397
+ const eyeCodeNum = this.eyeCode.trim();
1398
+ const absBinEntryNum = Number(this.absBinEntry.trim());
1399
+ const orderIdNum = Number(this.orderId.trim());
1400
+ if (isNaN(absBinEntryNum)) {
1401
+ this.toasterService.warn('Toplanacak Kasa alanı sayısal bir değer olmalıdır.');
1402
+ return;
1403
+ }
1404
+ if (isNaN(orderIdNum)) {
1405
+ this.toasterService.warn('Sipariş alanı sayısal bir değer olmalıdır.');
1406
+ return;
1407
+ }
1408
+ if (this.orderStatus && !this.orderStatus.IsEligibleForMatching) {
1409
+ this.toasterService.error(`Bu siparişin durumu ${this.orderStatus.StatusText}. Eşleştirme işlemi yapılamaz.`);
1410
+ return;
1411
+ }
1412
+ const dto = {
1413
+ orderId: orderIdNum,
1414
+ stationCode: this.stationCode.trim(),
1415
+ eyeCode: eyeCodeNum,
1416
+ absBinEntry: absBinEntryNum,
1417
+ };
1418
+ this.isSaving = true;
1419
+ this.orderStationService.createOrderStation(dto).subscribe({
1420
+ next: (result) => {
1421
+ this.toasterService.success(result);
1422
+ this.onClear();
1423
+ this.isSaving = false;
1424
+ },
1425
+ error: (error) => {
1426
+ const errorMessage = error?.error?.error?.message || 'İşlem sırasında bir hata oluştu.';
1427
+ this.toasterService.error(errorMessage);
1428
+ this.isSaving = false;
1429
+ },
1430
+ });
1431
+ }
1432
+ onClear() {
1433
+ this.stationCode = '';
1434
+ this.eyeCode = '';
1435
+ this.absBinEntry = '';
1436
+ this.orderId = '';
1437
+ this.orderStatus = null;
1438
+ setTimeout(() => {
1439
+ this.stationInputRef?.nativeElement?.focus();
1440
+ }, 100);
1441
+ }
1442
+ }
1443
+ OrderStationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationComponent, deps: [{ token: OrderStationService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
1444
+ OrderStationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OrderStationComponent, selector: "lib-order-station", viewQueries: [{ propertyName: "stationInputRef", first: true, predicate: ["stationInput"], descendants: true }, { propertyName: "shelfInputRef", first: true, predicate: ["shelfInput"], descendants: true }, { propertyName: "binInputRef", first: true, predicate: ["binInput"], descendants: true }, { propertyName: "orderInputRef", first: true, predicate: ["orderInput"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Sipari\u015F-Toplama Noktas\u0131 E\u015Fle\u015Ftirme'\">\r\n <div class=\"order-station-container\">\r\n <div class=\"order-station-layout\">\r\n <div class=\"order-station-form-card\">\r\n\r\n <!-- \u0130stasyon -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"stationInput\">\u0130stasyon</label>\r\n <input #stationInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"stationInput\"\r\n [(ngModel)]=\"stationCode\"\r\n (keydown.enter)=\"onStationScanned()\"\r\n placeholder=\"\u0130stasyon kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Raf -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"shelfInput\">G\u00F6z</label>\r\n <input #shelfInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"shelfInput\"\r\n [(ngModel)]=\"eyeCode\"\r\n (keydown.enter)=\"onShelfScanned()\"\r\n placeholder=\"Raf kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Toplanacak Kasa -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"binInput\">Toplanacak Kasa</label>\r\n <input #binInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"binInput\"\r\n [(ngModel)]=\"absBinEntry\"\r\n (keydown.enter)=\"onBinScanned()\"\r\n placeholder=\"Toplanacak kasa kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Sipari\u015F -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"orderInput\">Sipari\u015F</label>\r\n <input #orderInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"orderInput\"\r\n [(ngModel)]=\"orderId\"\r\n (ngModelChange)=\"onOrderChanged()\"\r\n (keydown.enter)=\"onOrderScanned()\"\r\n placeholder=\"Sipari\u015F numaras\u0131n\u0131 okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Sipari\u015F Durum Bilgisi -->\r\n <div class=\"form-section\" *ngIf=\"isCheckingOrder\">\r\n <div class=\"status-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Sipari\u015F durumu kontrol ediliyor...\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"orderStatus && !isCheckingOrder\">\r\n <div class=\"status-card\" [ngClass]=\"{\r\n 'status-ok': orderStatus.IsEligibleForMatching,\r\n 'status-error': !orderStatus.IsEligibleForMatching\r\n }\">\r\n <i class=\"fa\" [ngClass]=\"orderStatus.IsEligibleForMatching ? 'fa-check-circle' : 'fa-times-circle'\"></i>\r\n <span *ngIf=\"orderStatus.IsEligibleForMatching\">\r\n Sipari\u015F Durumu: {{ orderStatus.StatusText }}\r\n </span>\r\n <span *ngIf=\"!orderStatus.IsEligibleForMatching\">\r\n Bu sipari\u015Fin durumu {{ orderStatus.StatusText }}. E\u015Fle\u015Ftirme i\u015Flemi yap\u0131lamaz.\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-success btn-sm\"\r\n (click)=\"onSave()\"\r\n [disabled]=\"isSaving || isCheckingOrder || !stationCode || !eyeCode || !absBinEntry || !orderId || !orderStatus || !orderStatus.IsEligibleForMatching\">\r\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-save'\"></i>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\"\r\n (click)=\"onClear()\"\r\n [disabled]=\"isSaving\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n", styles: [".order-station-container{width:100%}.order-station-layout{display:flex;gap:20px;align-items:flex-start;justify-content:center}.order-station-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;flex:0 0 500px;min-width:320px;max-width:500px}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.form-input[readonly]{background:#f5f5f5;color:#888}.status-loading{padding:10px 14px;background:#f8f9fa;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#6c757d}.status-loading i{margin-right:6px;color:#556ee6}.status-card{padding:10px 14px;border-radius:6px;font-size:13px;font-weight:500;display:flex;align-items:center;gap:8px}.status-card i{font-size:16px}.status-ok{background:#e8f5e9;border:1px solid #a5d6a7;color:#2e7d32}.status-ok i{color:#2e7d32}.status-error{background:#fbe9e7;border:1px solid #ef9a9a;color:#c62828}.status-error i{color:#c62828}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}@media (max-width: 768px){.order-station-container{padding:0 8px}.order-station-form-card{padding:16px;min-width:100%;flex:1}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }] });
1445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationComponent, decorators: [{
1446
+ type: Component,
1447
+ args: [{ selector: 'lib-order-station', template: "<abp-page [title]=\"'Sipari\u015F-Toplama Noktas\u0131 E\u015Fle\u015Ftirme'\">\r\n <div class=\"order-station-container\">\r\n <div class=\"order-station-layout\">\r\n <div class=\"order-station-form-card\">\r\n\r\n <!-- \u0130stasyon -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"stationInput\">\u0130stasyon</label>\r\n <input #stationInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"stationInput\"\r\n [(ngModel)]=\"stationCode\"\r\n (keydown.enter)=\"onStationScanned()\"\r\n placeholder=\"\u0130stasyon kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Raf -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"shelfInput\">G\u00F6z</label>\r\n <input #shelfInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"shelfInput\"\r\n [(ngModel)]=\"eyeCode\"\r\n (keydown.enter)=\"onShelfScanned()\"\r\n placeholder=\"Raf kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Toplanacak Kasa -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"binInput\">Toplanacak Kasa</label>\r\n <input #binInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"binInput\"\r\n [(ngModel)]=\"absBinEntry\"\r\n (keydown.enter)=\"onBinScanned()\"\r\n placeholder=\"Toplanacak kasa kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Sipari\u015F -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"orderInput\">Sipari\u015F</label>\r\n <input #orderInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"orderInput\"\r\n [(ngModel)]=\"orderId\"\r\n (ngModelChange)=\"onOrderChanged()\"\r\n (keydown.enter)=\"onOrderScanned()\"\r\n placeholder=\"Sipari\u015F numaras\u0131n\u0131 okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Sipari\u015F Durum Bilgisi -->\r\n <div class=\"form-section\" *ngIf=\"isCheckingOrder\">\r\n <div class=\"status-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Sipari\u015F durumu kontrol ediliyor...\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"orderStatus && !isCheckingOrder\">\r\n <div class=\"status-card\" [ngClass]=\"{\r\n 'status-ok': orderStatus.IsEligibleForMatching,\r\n 'status-error': !orderStatus.IsEligibleForMatching\r\n }\">\r\n <i class=\"fa\" [ngClass]=\"orderStatus.IsEligibleForMatching ? 'fa-check-circle' : 'fa-times-circle'\"></i>\r\n <span *ngIf=\"orderStatus.IsEligibleForMatching\">\r\n Sipari\u015F Durumu: {{ orderStatus.StatusText }}\r\n </span>\r\n <span *ngIf=\"!orderStatus.IsEligibleForMatching\">\r\n Bu sipari\u015Fin durumu {{ orderStatus.StatusText }}. E\u015Fle\u015Ftirme i\u015Flemi yap\u0131lamaz.\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-success btn-sm\"\r\n (click)=\"onSave()\"\r\n [disabled]=\"isSaving || isCheckingOrder || !stationCode || !eyeCode || !absBinEntry || !orderId || !orderStatus || !orderStatus.IsEligibleForMatching\">\r\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-save'\"></i>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\"\r\n (click)=\"onClear()\"\r\n [disabled]=\"isSaving\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n", styles: [".order-station-container{width:100%}.order-station-layout{display:flex;gap:20px;align-items:flex-start;justify-content:center}.order-station-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;flex:0 0 500px;min-width:320px;max-width:500px}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.form-input[readonly]{background:#f5f5f5;color:#888}.status-loading{padding:10px 14px;background:#f8f9fa;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#6c757d}.status-loading i{margin-right:6px;color:#556ee6}.status-card{padding:10px 14px;border-radius:6px;font-size:13px;font-weight:500;display:flex;align-items:center;gap:8px}.status-card i{font-size:16px}.status-ok{background:#e8f5e9;border:1px solid #a5d6a7;color:#2e7d32}.status-ok i{color:#2e7d32}.status-error{background:#fbe9e7;border:1px solid #ef9a9a;color:#c62828}.status-error i{color:#c62828}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}@media (max-width: 768px){.order-station-container{padding:0 8px}.order-station-form-card{padding:16px;min-width:100%;flex:1}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}\n"] }]
1448
+ }], ctorParameters: function () { return [{ type: OrderStationService }, { type: i2.ToasterService }]; }, propDecorators: { stationInputRef: [{
1449
+ type: ViewChild,
1450
+ args: ['stationInput', { static: false }]
1451
+ }], shelfInputRef: [{
1452
+ type: ViewChild,
1453
+ args: ['shelfInput', { static: false }]
1454
+ }], binInputRef: [{
1455
+ type: ViewChild,
1456
+ args: ['binInput', { static: false }]
1457
+ }], orderInputRef: [{
1458
+ type: ViewChild,
1459
+ args: ['orderInput', { static: false }]
1460
+ }] } });
1461
+
1462
+ const routes$6 = [{ path: '', component: OrderStationComponent }];
1463
+ class OrderStationModule {
1464
+ }
1465
+ OrderStationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1466
+ OrderStationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: OrderStationModule, declarations: [OrderStationComponent], imports: [CoreModule,
1467
+ ThemeSharedModule,
1468
+ FormsModule,
1469
+ CommercialUiModule,
1470
+ NgxValidateCoreModule,
1471
+ NgbCollapseModule,
1472
+ NgbDatepickerModule,
1473
+ NgbDropdownModule,
1474
+ PageModule, i1$1.RouterModule] });
1475
+ OrderStationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationModule, imports: [CoreModule,
1476
+ ThemeSharedModule,
1477
+ FormsModule,
1478
+ CommercialUiModule,
1479
+ NgxValidateCoreModule,
1480
+ NgbCollapseModule,
1481
+ NgbDatepickerModule,
1482
+ NgbDropdownModule,
1483
+ PageModule,
1484
+ RouterModule.forChild(routes$6)] });
1485
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationModule, decorators: [{
1486
+ type: NgModule,
1487
+ args: [{
1488
+ declarations: [OrderStationComponent],
1489
+ imports: [
1490
+ CoreModule,
1491
+ ThemeSharedModule,
1492
+ FormsModule,
1493
+ CommercialUiModule,
1494
+ NgxValidateCoreModule,
1495
+ NgbCollapseModule,
1496
+ NgbDatepickerModule,
1497
+ NgbDropdownModule,
1498
+ PageModule,
1499
+ RouterModule.forChild(routes$6),
1500
+ ],
1501
+ }]
1502
+ }] });
1503
+ function loadOrderStationModuleAsChild() {
1504
+ return Promise.resolve(OrderStationModule);
1505
+ }
1506
+
1507
+ class StockReportService {
1508
+ constructor(restService, devexService) {
1509
+ this.restService = restService;
1510
+ this.devexService = devexService;
1511
+ this.apiName = 'SmartWarehouse';
1512
+ this.loadStockReports = this.devexService.createStore({
1513
+ key: 'ItemCode',
1514
+ loadUrl: 'api/smart-warehouse/stock-report/stock-reports',
1515
+ });
1516
+ }
1517
+ }
1518
+ StockReportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportService, deps: [{ token: i1.RestService }, { token: DevexpressRestService }], target: i0.ɵɵFactoryTarget.Injectable });
1519
+ StockReportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportService, providedIn: 'root' });
1520
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportService, decorators: [{
1521
+ type: Injectable,
1522
+ args: [{ providedIn: 'root' }]
1523
+ }], ctorParameters: function () { return [{ type: i1.RestService }, { type: DevexpressRestService }]; } });
1524
+
1525
+ class StockReportComponent {
1526
+ constructor(stockReportService, toasterService) {
1527
+ this.stockReportService = stockReportService;
1528
+ this.toasterService = toasterService;
1529
+ }
1530
+ ngOnInit() {
1531
+ this.stockDataSource = this.stockReportService.loadStockReports;
1532
+ }
1533
+ onRefresh() {
1534
+ this.dxStockInstance?.instance?.refresh();
1535
+ }
1536
+ }
1537
+ StockReportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportComponent, deps: [{ token: StockReportService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
1538
+ StockReportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: StockReportComponent, selector: "lib-stock-report", viewQueries: [{ propertyName: "dxStockInstance", first: true, predicate: ["dxStockInstance"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Depo Stok Raporu'\">\r\n\r\n <div class=\"mb-2\">\r\n <button class=\"btn btn-sm btn-outline-primary\" (click)=\"onRefresh()\">\r\n <i class=\"fa fa-redo\"></i> Yenile\r\n </button>\r\n </div>\r\n\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid #dxStockInstance [dataSource]=\"stockDataSource\" [showRowLines]=\"true\" [showBorders]=\"true\"\r\n [hoverStateEnabled]=\"true\" [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\" columnResizingMode=\"widget\" [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\" [columnHidingEnabled]=\"true\" style=\"height: 75vh;\">\r\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[50,100,200]\"\r\n [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\">\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"50\"></dxo-paging>\r\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\r\n <dxo-grouping #expand [autoExpandAll]=\"false\" [allowCollapsing]=\"true\"\r\n [contextMenuEnabled]=\"true\"></dxo-grouping>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"horizontal\" showScrollbar=\"always\"></dxo-scrolling>\r\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\"></dxi-column>\r\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\r\n <dxi-column dataField=\"WhsCode\" caption=\"Depo\"></dxi-column>\r\n <dxi-column dataField=\"BinCode\" caption=\"Depo Yeri\"></dxi-column>\r\n <dxi-column dataField=\"DistNumber\" caption=\"Parti\"></dxi-column>\r\n <dxi-column dataField=\"OnHandQty\" caption=\"Miktar\" dataType=\"number\" [format]=\"{ \r\n type: 'fixedPoint', \r\n precision: 2 \r\n }\">\r\n\r\n </dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n</abp-page>", dependencies: [{ kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i6.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i7.DxoColumnChooserComponent, selector: "dxo-column-chooser", inputs: ["allowSearch", "emptyPanelText", "enabled", "height", "mode", "searchTimeout", "sortOrder", "title", "width"] }, { kind: "component", type: i7.DxoColumnFixingComponent, selector: "dxo-column-fixing", inputs: ["enabled", "texts"] }, { kind: "component", type: i7.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i7.DxoHeaderFilterComponent, selector: "dxo-header-filter", inputs: ["allowSearch", "dataSource", "groupInterval", "height", "searchMode", "width", "searchTimeout", "texts", "visible", "showRelevantValues"] }, { kind: "component", type: i7.DxoExportComponent, selector: "dxo-export", inputs: ["backgroundColor", "enabled", "fileName", "formats", "margin", "printingEnabled", "svgToCanvas", "allowExportSelectedData", "texts"] }, { kind: "component", type: i7.DxoFilterBuilderComponent, selector: "dxo-filter-builder", inputs: ["accessKey", "activeStateEnabled", "allowHierarchicalFields", "customOperations", "disabled", "elementAttr", "fields", "filterOperationDescriptions", "focusStateEnabled", "groupOperationDescriptions", "groupOperations", "height", "hint", "hoverStateEnabled", "maxGroupLevel", "onContentReady", "onDisposing", "onEditorPrepared", "onEditorPreparing", "onInitialized", "onOptionChanged", "onValueChanged", "rtlEnabled", "tabIndex", "value", "visible", "width"], outputs: ["valueChange"] }, { kind: "component", type: i7.DxoFilterPanelComponent, selector: "dxo-filter-panel", inputs: ["customizeText", "filterEnabled", "texts", "visible"], outputs: ["filterEnabledChange"] }, { kind: "component", type: i7.DxoFilterRowComponent, selector: "dxo-filter-row", inputs: ["applyFilter", "applyFilterText", "betweenEndText", "betweenStartText", "operationDescriptions", "resetOperationText", "showAllText", "showOperationChooser", "visible"] }, { kind: "component", type: i7.DxoGroupingComponent, selector: "dxo-grouping", inputs: ["allowCollapsing", "autoExpandAll", "contextMenuEnabled", "expandMode", "texts"] }, { kind: "component", type: i7.DxoGroupPanelComponent, selector: "dxo-group-panel", inputs: ["allowColumnDragging", "emptyPanelText", "visible"], outputs: ["visibleChange"] }, { kind: "component", type: i7.DxoPagerComponent, selector: "dxo-pager", inputs: ["allowedPageSizes", "displayMode", "infoText", "label", "showInfo", "showNavigationButtons", "showPageSizeSelector", "visible"] }, { kind: "component", type: i7.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i7.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i7.DxoSortingComponent, selector: "dxo-sorting", inputs: ["ascendingText", "clearText", "descendingText", "mode", "showSortIndexes"] }] });
1539
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportComponent, decorators: [{
1540
+ type: Component,
1541
+ args: [{ selector: 'lib-stock-report', template: "<abp-page [title]=\"'Depo Stok Raporu'\">\r\n\r\n <div class=\"mb-2\">\r\n <button class=\"btn btn-sm btn-outline-primary\" (click)=\"onRefresh()\">\r\n <i class=\"fa fa-redo\"></i> Yenile\r\n </button>\r\n </div>\r\n\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid #dxStockInstance [dataSource]=\"stockDataSource\" [showRowLines]=\"true\" [showBorders]=\"true\"\r\n [hoverStateEnabled]=\"true\" [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\" columnResizingMode=\"widget\" [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\" [columnHidingEnabled]=\"true\" style=\"height: 75vh;\">\r\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[50,100,200]\"\r\n [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\">\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"50\"></dxo-paging>\r\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\r\n <dxo-grouping #expand [autoExpandAll]=\"false\" [allowCollapsing]=\"true\"\r\n [contextMenuEnabled]=\"true\"></dxo-grouping>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"horizontal\" showScrollbar=\"always\"></dxo-scrolling>\r\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\"></dxi-column>\r\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\r\n <dxi-column dataField=\"WhsCode\" caption=\"Depo\"></dxi-column>\r\n <dxi-column dataField=\"BinCode\" caption=\"Depo Yeri\"></dxi-column>\r\n <dxi-column dataField=\"DistNumber\" caption=\"Parti\"></dxi-column>\r\n <dxi-column dataField=\"OnHandQty\" caption=\"Miktar\" dataType=\"number\" [format]=\"{ \r\n type: 'fixedPoint', \r\n precision: 2 \r\n }\">\r\n\r\n </dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n</abp-page>" }]
1542
+ }], ctorParameters: function () { return [{ type: StockReportService }, { type: i2.ToasterService }]; }, propDecorators: { dxStockInstance: [{
1543
+ type: ViewChild,
1544
+ args: ['dxStockInstance', { static: false }]
1545
+ }] } });
1546
+
1547
+ const routes$5 = [
1548
+ { path: '', component: StockReportComponent },
1549
+ ];
1550
+ class StockReportModule {
1551
+ }
1552
+ StockReportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1553
+ StockReportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: StockReportModule, declarations: [StockReportComponent], imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1554
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1555
+ NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule, i1$1.RouterModule] });
1556
+ StockReportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportModule, imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1557
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1558
+ NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
1559
+ RouterModule.forChild(routes$5)] });
1560
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportModule, decorators: [{
1561
+ type: NgModule,
1562
+ args: [{
1563
+ declarations: [StockReportComponent],
1564
+ imports: [
1565
+ CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1566
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1567
+ NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
1568
+ RouterModule.forChild(routes$5),
1569
+ ],
1570
+ }]
1571
+ }] });
1572
+ function loadStockReportModuleAsChild() {
1573
+ return Promise.resolve(StockReportModule);
1574
+ }
1575
+
1576
+ class ShortagesService {
1577
+ constructor(restService) {
1578
+ this.restService = restService;
1579
+ this.apiName = 'SmartWarehouse';
1580
+ this.getShortages = (orderType) => this.restService.request({
1581
+ method: 'GET',
1582
+ url: '/api/smart-warehouse/sap-reservations/shortages',
1583
+ params: { orderType: orderType || undefined },
1584
+ }, { apiName: this.apiName });
1585
+ this.getShortagesSummary = (orderType) => this.restService.request({
1586
+ method: 'GET',
1587
+ url: '/api/smart-warehouse/sap-reservations/shortages-summary',
1588
+ params: { orderType: orderType || undefined },
1589
+ }, { apiName: this.apiName });
1590
+ }
1591
+ }
1592
+ ShortagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
1593
+ ShortagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesService, providedIn: 'root' });
1594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesService, decorators: [{
1595
+ type: Injectable,
1596
+ args: [{ providedIn: 'root' }]
1597
+ }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
1598
+
1599
+ class ShortagesComponent {
1600
+ constructor(shortagesService, toasterService) {
1601
+ this.shortagesService = shortagesService;
1602
+ this.toasterService = toasterService;
1603
+ this.viewMode = 'detay';
1604
+ this.activeOrderType = null; // null = tümü, '1' | '2' | '3'
1605
+ this.detailDataSource = [];
1606
+ this.summaryDataSource = [];
1607
+ this.isLoading = false;
1608
+ }
1609
+ ngOnInit() {
1610
+ this.load();
1611
+ }
1612
+ toggleOrderType(key) {
1613
+ this.activeOrderType = this.activeOrderType === key ? null : key;
1614
+ this.load();
1615
+ }
1616
+ setViewMode(mode) {
1617
+ this.viewMode = mode;
1618
+ this.load();
1619
+ }
1620
+ load() {
1621
+ this.isLoading = true;
1622
+ if (this.viewMode === 'detay') {
1623
+ this.shortagesService.getShortages(this.activeOrderType).subscribe({
1624
+ next: (data) => {
1625
+ this.detailDataSource = data || [];
1626
+ this.isLoading = false;
1627
+ },
1628
+ error: (error) => {
1629
+ const errorMessage = error?.error?.error?.message || 'Fark listesi yüklenirken bir hata oluştu.';
1630
+ this.toasterService.error(errorMessage);
1631
+ this.isLoading = false;
1632
+ },
1633
+ });
1634
+ }
1635
+ else {
1636
+ this.shortagesService.getShortagesSummary(this.activeOrderType).subscribe({
1637
+ next: (data) => {
1638
+ this.summaryDataSource = data || [];
1639
+ this.isLoading = false;
1640
+ },
1641
+ error: (error) => {
1642
+ const errorMessage = error?.error?.error?.message || 'Fark özeti yüklenirken bir hata oluştu.';
1643
+ this.toasterService.error(errorMessage);
1644
+ this.isLoading = false;
1645
+ },
1646
+ });
1647
+ }
1648
+ }
1649
+ onRefresh() {
1650
+ this.load();
1651
+ }
1652
+ }
1653
+ ShortagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesComponent, deps: [{ token: ShortagesService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
1654
+ ShortagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ShortagesComponent, selector: "lib-shortages", viewQueries: [{ propertyName: "dxDetailInstance", first: true, predicate: ["dxDetailInstance"], descendants: true }, { propertyName: "dxSummaryInstance", first: true, predicate: ["dxSummaryInstance"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Fark Listesi'\">\n\n <div class=\"mb-3 d-flex flex-wrap align-items-center gap-2\">\n <div class=\"btn-group me-3\" role=\"group\">\n <button\n type=\"button\"\n class=\"btn btn-sm\"\n [ngClass]=\"viewMode === 'detay' ? 'btn-primary' : 'btn-outline-primary'\"\n (click)=\"setViewMode('detay')\"\n >\n Detay (Sipari\u015F Baz\u0131nda)\n </button>\n <button\n type=\"button\"\n class=\"btn btn-sm\"\n [ngClass]=\"viewMode === 'ozet' ? 'btn-primary' : 'btn-outline-primary'\"\n (click)=\"setViewMode('ozet')\"\n >\n \u00D6zet (Kalem Baz\u0131nda)\n </button>\n </div>\n\n <span class=\"badge bg-light text-dark border\" [class.border-primary]=\"!activeOrderType\" style=\"cursor:pointer\" (click)=\"activeOrderType = null; load()\">\n T\u00FCm\u00FC\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '1' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('1')\">\n Sanayi Sipari\u015Fleri\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '2' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('2')\">\n Da\u011F\u0131t\u0131m Sipari\u015Fleri\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '3' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('3')\">\n Depo Talepleri\n </span>\n\n <button class=\"btn btn-sm btn-outline-secondary ms-auto\" (click)=\"onRefresh()\" [disabled]=\"isLoading\">\n <i class=\"fa fa-redo\"></i> Yenile\n </button>\n </div>\n\n <div class=\"card\" *ngIf=\"viewMode === 'detay'\">\n <div class=\"card-body\">\n <dx-data-grid\n #dxDetailInstance\n [dataSource]=\"detailDataSource\"\n [showRowLines]=\"true\"\n [showBorders]=\"true\"\n [hoverStateEnabled]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n [allowColumnReordering]=\"true\"\n [columnAutoWidth]=\"true\"\n [columnHidingEnabled]=\"true\"\n style=\"height: 70vh;\"\n >\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[20, 50, 100]\" [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\"></dxo-pager>\n <dxo-paging [pageSize]=\"20\"></dxo-paging>\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\n <dxo-sorting mode=\"single\"></dxo-sorting>\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\n\n <dxi-column dataField=\"OrderDocNum\" caption=\"Belge No\" [width]=\"110\"></dxi-column>\n <dxi-column dataField=\"CardCode\" caption=\"M\u00FC\u015Fteri Kodu\" [width]=\"140\"></dxi-column>\n <dxi-column dataField=\"CardName\" caption=\"M\u00FC\u015Fteri Ad\u0131\" [width]=\"220\"></dxi-column>\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\" [width]=\"140\"></dxi-column>\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\n <dxi-column dataField=\"RequestedQty\" caption=\"Talep Edilen\" dataType=\"number\" format=\"#,##0.##\" [width]=\"120\"></dxi-column>\n <dxi-column dataField=\"ShortQty\" caption=\"Eksik Miktar\" dataType=\"number\" format=\"#,##0.##\" [width]=\"120\"></dxi-column>\n\n <dxo-summary>\n <dxi-total-item column=\"ShortQty\" summaryType=\"sum\" displayFormat=\"Toplam Eksik: {0}\" valueFormat=\"#,##0.##\"></dxi-total-item>\n </dxo-summary>\n </dx-data-grid>\n </div>\n </div>\n\n <div class=\"card\" *ngIf=\"viewMode === 'ozet'\">\n <div class=\"card-body\">\n <dx-data-grid\n #dxSummaryInstance\n [dataSource]=\"summaryDataSource\"\n [showRowLines]=\"true\"\n [showBorders]=\"true\"\n [hoverStateEnabled]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n [allowColumnReordering]=\"true\"\n [columnAutoWidth]=\"true\"\n style=\"height: 70vh;\"\n >\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[20, 50, 100]\" [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\"></dxo-pager>\n <dxo-paging [pageSize]=\"20\"></dxo-paging>\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\n <dxo-sorting mode=\"single\"></dxo-sorting>\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\n\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\" [width]=\"160\"></dxi-column>\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\n <dxi-column dataField=\"TotalShortQty\" caption=\"Toplam Eksik\" dataType=\"number\" format=\"#,##0.##\" [width]=\"140\" sortOrder=\"desc\"></dxi-column>\n <dxi-column dataField=\"OrderCount\" caption=\"Sipari\u015F Say\u0131s\u0131\" dataType=\"number\" [width]=\"130\"></dxi-column>\n </dx-data-grid>\n </div>\n </div>\n\n</abp-page>\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i6.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i7.DxoColumnChooserComponent, selector: "dxo-column-chooser", inputs: ["allowSearch", "emptyPanelText", "enabled", "height", "mode", "searchTimeout", "sortOrder", "title", "width"] }, { kind: "component", type: i7.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i7.DxoHeaderFilterComponent, selector: "dxo-header-filter", inputs: ["allowSearch", "dataSource", "groupInterval", "height", "searchMode", "width", "searchTimeout", "texts", "visible", "showRelevantValues"] }, { kind: "component", type: i7.DxoExportComponent, selector: "dxo-export", inputs: ["backgroundColor", "enabled", "fileName", "formats", "margin", "printingEnabled", "svgToCanvas", "allowExportSelectedData", "texts"] }, { kind: "component", type: i7.DxoFilterPanelComponent, selector: "dxo-filter-panel", inputs: ["customizeText", "filterEnabled", "texts", "visible"], outputs: ["filterEnabledChange"] }, { kind: "component", type: i7.DxoFilterRowComponent, selector: "dxo-filter-row", inputs: ["applyFilter", "applyFilterText", "betweenEndText", "betweenStartText", "operationDescriptions", "resetOperationText", "showAllText", "showOperationChooser", "visible"] }, { kind: "component", type: i7.DxoGroupPanelComponent, selector: "dxo-group-panel", inputs: ["allowColumnDragging", "emptyPanelText", "visible"], outputs: ["visibleChange"] }, { kind: "component", type: i7.DxoPagerComponent, selector: "dxo-pager", inputs: ["allowedPageSizes", "displayMode", "infoText", "label", "showInfo", "showNavigationButtons", "showPageSizeSelector", "visible"] }, { kind: "component", type: i7.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i7.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i7.DxoSortingComponent, selector: "dxo-sorting", inputs: ["ascendingText", "clearText", "descendingText", "mode", "showSortIndexes"] }, { kind: "component", type: i7.DxoSummaryComponent, selector: "dxo-summary", inputs: ["calculateCustomSummary", "groupItems", "recalculateWhileEditing", "skipEmptyValues", "texts", "totalItems"] }, { kind: "component", type: i7.DxiTotalItemComponent, selector: "dxi-total-item", inputs: ["alignment", "column", "cssClass", "customizeText", "displayFormat", "name", "showInColumn", "skipEmptyValues", "summaryType", "valueFormat"] }] });
1655
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesComponent, decorators: [{
1656
+ type: Component,
1657
+ args: [{ selector: 'lib-shortages', template: "<abp-page [title]=\"'Fark Listesi'\">\n\n <div class=\"mb-3 d-flex flex-wrap align-items-center gap-2\">\n <div class=\"btn-group me-3\" role=\"group\">\n <button\n type=\"button\"\n class=\"btn btn-sm\"\n [ngClass]=\"viewMode === 'detay' ? 'btn-primary' : 'btn-outline-primary'\"\n (click)=\"setViewMode('detay')\"\n >\n Detay (Sipari\u015F Baz\u0131nda)\n </button>\n <button\n type=\"button\"\n class=\"btn btn-sm\"\n [ngClass]=\"viewMode === 'ozet' ? 'btn-primary' : 'btn-outline-primary'\"\n (click)=\"setViewMode('ozet')\"\n >\n \u00D6zet (Kalem Baz\u0131nda)\n </button>\n </div>\n\n <span class=\"badge bg-light text-dark border\" [class.border-primary]=\"!activeOrderType\" style=\"cursor:pointer\" (click)=\"activeOrderType = null; load()\">\n T\u00FCm\u00FC\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '1' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('1')\">\n Sanayi Sipari\u015Fleri\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '2' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('2')\">\n Da\u011F\u0131t\u0131m Sipari\u015Fleri\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '3' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('3')\">\n Depo Talepleri\n </span>\n\n <button class=\"btn btn-sm btn-outline-secondary ms-auto\" (click)=\"onRefresh()\" [disabled]=\"isLoading\">\n <i class=\"fa fa-redo\"></i> Yenile\n </button>\n </div>\n\n <div class=\"card\" *ngIf=\"viewMode === 'detay'\">\n <div class=\"card-body\">\n <dx-data-grid\n #dxDetailInstance\n [dataSource]=\"detailDataSource\"\n [showRowLines]=\"true\"\n [showBorders]=\"true\"\n [hoverStateEnabled]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n [allowColumnReordering]=\"true\"\n [columnAutoWidth]=\"true\"\n [columnHidingEnabled]=\"true\"\n style=\"height: 70vh;\"\n >\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[20, 50, 100]\" [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\"></dxo-pager>\n <dxo-paging [pageSize]=\"20\"></dxo-paging>\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\n <dxo-sorting mode=\"single\"></dxo-sorting>\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\n\n <dxi-column dataField=\"OrderDocNum\" caption=\"Belge No\" [width]=\"110\"></dxi-column>\n <dxi-column dataField=\"CardCode\" caption=\"M\u00FC\u015Fteri Kodu\" [width]=\"140\"></dxi-column>\n <dxi-column dataField=\"CardName\" caption=\"M\u00FC\u015Fteri Ad\u0131\" [width]=\"220\"></dxi-column>\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\" [width]=\"140\"></dxi-column>\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\n <dxi-column dataField=\"RequestedQty\" caption=\"Talep Edilen\" dataType=\"number\" format=\"#,##0.##\" [width]=\"120\"></dxi-column>\n <dxi-column dataField=\"ShortQty\" caption=\"Eksik Miktar\" dataType=\"number\" format=\"#,##0.##\" [width]=\"120\"></dxi-column>\n\n <dxo-summary>\n <dxi-total-item column=\"ShortQty\" summaryType=\"sum\" displayFormat=\"Toplam Eksik: {0}\" valueFormat=\"#,##0.##\"></dxi-total-item>\n </dxo-summary>\n </dx-data-grid>\n </div>\n </div>\n\n <div class=\"card\" *ngIf=\"viewMode === 'ozet'\">\n <div class=\"card-body\">\n <dx-data-grid\n #dxSummaryInstance\n [dataSource]=\"summaryDataSource\"\n [showRowLines]=\"true\"\n [showBorders]=\"true\"\n [hoverStateEnabled]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n [allowColumnReordering]=\"true\"\n [columnAutoWidth]=\"true\"\n style=\"height: 70vh;\"\n >\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[20, 50, 100]\" [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\"></dxo-pager>\n <dxo-paging [pageSize]=\"20\"></dxo-paging>\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\n <dxo-sorting mode=\"single\"></dxo-sorting>\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\n\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\" [width]=\"160\"></dxi-column>\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\n <dxi-column dataField=\"TotalShortQty\" caption=\"Toplam Eksik\" dataType=\"number\" format=\"#,##0.##\" [width]=\"140\" sortOrder=\"desc\"></dxi-column>\n <dxi-column dataField=\"OrderCount\" caption=\"Sipari\u015F Say\u0131s\u0131\" dataType=\"number\" [width]=\"130\"></dxi-column>\n </dx-data-grid>\n </div>\n </div>\n\n</abp-page>\n" }]
1658
+ }], ctorParameters: function () { return [{ type: ShortagesService }, { type: i2.ToasterService }]; }, propDecorators: { dxDetailInstance: [{
1659
+ type: ViewChild,
1660
+ args: ['dxDetailInstance', { static: false }]
1661
+ }], dxSummaryInstance: [{
1662
+ type: ViewChild,
1663
+ args: ['dxSummaryInstance', { static: false }]
1664
+ }] } });
1665
+
1666
+ const routes$4 = [
1667
+ { path: '', component: ShortagesComponent },
1668
+ ];
1669
+ class ShortagesModule {
1670
+ }
1671
+ ShortagesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1672
+ ShortagesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ShortagesModule, declarations: [ShortagesComponent], imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1673
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1674
+ NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule, i1$1.RouterModule] });
1675
+ ShortagesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesModule, imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1676
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1677
+ NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
1678
+ RouterModule.forChild(routes$4)] });
1679
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesModule, decorators: [{
1680
+ type: NgModule,
1681
+ args: [{
1682
+ declarations: [ShortagesComponent],
1683
+ imports: [
1684
+ CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1685
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1686
+ NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
1687
+ RouterModule.forChild(routes$4),
1688
+ ],
1689
+ }]
1690
+ }] });
1691
+ function loadShortagesModuleAsChild() {
1692
+ return Promise.resolve(ShortagesModule);
1693
+ }
1694
+
1695
+ class StationService {
1696
+ constructor(restService) {
1697
+ this.restService = restService;
1698
+ this.apiName = 'SmartWarehouse';
1699
+ // CustomStore.load ile doldurulan, byKey/güncellemelerin kullandığı önbellek
1700
+ this.cache = [];
1701
+ this.getAll = () => firstValueFrom(this.restService.request({ method: 'GET', url: '/api/smart-warehouse/stations/get-all-stations' }, { apiName: this.apiName }));
1702
+ this.createStation = (dto) => firstValueFrom(this.restService.request({ method: 'POST', url: '/api/smart-warehouse/stations/create-station', body: dto }, { apiName: this.apiName, skipHandleError: true }));
1703
+ this.updateStation = (dto) => firstValueFrom(this.restService.request({ method: 'PUT', url: '/api/smart-warehouse/stations/update-station', body: dto }, { apiName: this.apiName, skipHandleError: true }));
1704
+ this.deleteStation = (code) => firstValueFrom(this.restService.request({ method: 'DELETE', url: `/api/smart-warehouse/stations/delete-station/${code}` }, { apiName: this.apiName, skipHandleError: true }));
1705
+ // Ana grid için CustomStore (istemci tarafı; istasyon sayısı azdır)
1706
+ this.buildStore = () => new CustomStore({
1707
+ key: 'Code',
1708
+ loadMode: 'raw',
1709
+ load: async () => {
1710
+ const data = await this.getAll();
1711
+ this.cache = (data ?? []).map(s => ({
1712
+ ...s,
1713
+ SWSTATIONEYECollection: s.SWSTATIONEYECollection ?? [],
1714
+ }));
1715
+ return this.cache;
1716
+ },
1717
+ byKey: key => Promise.resolve(this.cache.find(s => s.Code === key)),
1718
+ insert: async (values) => {
1719
+ const dto = {
1720
+ SWSTATIONEYECollection: [],
1721
+ ...values,
1722
+ };
1723
+ try {
1724
+ await this.createStation(dto);
1725
+ }
1726
+ catch (error) {
1727
+ if (error?.status === 200)
1728
+ return dto;
1729
+ throw (error?.error?.error?.message ||
1730
+ error?.error?.message ||
1731
+ error?.message ||
1732
+ 'İstasyon oluşturulamadı.');
1733
+ }
1734
+ return dto;
1735
+ },
1736
+ update: async (key, values) => {
1737
+ const original = this.cache.find(s => s.Code === key) ??
1738
+ { Code: key, SWSTATIONEYECollection: [] };
1739
+ const merged = { ...original, ...values };
1740
+ try {
1741
+ await this.updateStation(merged);
1742
+ }
1743
+ catch (error) {
1744
+ if (error?.status === 200)
1745
+ return merged;
1746
+ throw (error?.error?.error?.message ||
1747
+ error?.error?.message ||
1748
+ error?.message ||
1749
+ 'İstasyon güncellenemedi.');
1750
+ }
1751
+ return merged;
1752
+ },
1753
+ remove: async (key) => {
1754
+ try {
1755
+ await this.deleteStation(key);
1756
+ }
1757
+ catch (error) {
1758
+ if (error?.status === 200)
1759
+ return;
1760
+ throw (error?.error?.error?.message ||
1761
+ error?.error?.message ||
1762
+ error?.message ||
1763
+ 'İstasyon silinemedi.');
1764
+ }
1765
+ },
1766
+ });
1767
+ }
1768
+ }
1769
+ StationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
1770
+ StationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationService, providedIn: 'root' });
1771
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationService, decorators: [{
1772
+ type: Injectable,
1773
+ args: [{ providedIn: 'root' }]
1774
+ }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
1775
+
1776
+ class StationComponent {
1777
+ constructor(toasterService, stationService) {
1778
+ this.toasterService = toasterService;
1779
+ this.stationService = stationService;
1780
+ }
1781
+ ngOnInit() {
1782
+ this.stationDataSource = this.stationService.buildStore();
1783
+ }
1784
+ // Gözler (alt grid) değiştiğinde istasyonun tamamı (başlık + güncel göz listesi) kaydedilir.
1785
+ // onSaved/onRowRemoved, in-memory dizi güncellendikten SONRA tetiklenir; station referansı günceldir.
1786
+ async onEyesChanged(station) {
1787
+ try {
1788
+ station.SWSTATIONEYECollection = station.SWSTATIONEYECollection ?? [];
1789
+ const message = await this.stationService.updateStation(station);
1790
+ this.toasterService.success(message);
1791
+ }
1792
+ catch (error) {
1793
+ if (error?.status === 200) {
1794
+ this.toasterService.success('Göz kaydı güncellendi.');
1795
+ return;
1796
+ }
1797
+ const detail = error?.error?.error?.message ||
1798
+ error?.error?.message ||
1799
+ 'Göz kaydı güncellenemedi.';
1800
+ this.toasterService.error(detail);
1801
+ }
1802
+ }
1803
+ }
1804
+ StationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationComponent, deps: [{ token: i2.ToasterService }, { token: StationService }], target: i0.ɵɵFactoryTarget.Component });
1805
+ StationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: StationComponent, selector: "lib-station", ngImport: i0, template: "<abp-page [title]=\"'\u0130stasyonlar'\">\r\n\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid #dxstationInstance [dataSource]=\"stationDataSource\" [showRowLines]=\"true\" [showBorders]=\"true\"\r\n [remoteOperations]=\"false\" [hoverStateEnabled]=\"true\" [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\" columnResizingMode=\"widget\" [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\" [columnHidingEnabled]=\"true\" style=\"height: 75vh;\">\r\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[50,100,200]\"\r\n [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\">\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"50\"></dxo-paging>\r\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\r\n <dxo-grouping #expand [autoExpandAll]=\"false\" [allowCollapsing]=\"true\"\r\n [contextMenuEnabled]=\"true\"></dxo-grouping>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"horizontal\" showScrollbar=\"always\"></dxo-scrolling>\r\n\r\n <dxo-editing mode=\"popup\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\"\r\n [useIcons]=\"true\">\r\n <dxo-popup title=\"\u0130stasyon\" [showTitle]=\"true\" [width]=\"500\" [height]=\"320\"></dxo-popup>\r\n <dxo-form>\r\n <dxi-item dataField=\"Code\"></dxi-item>\r\n <dxi-item dataField=\"U_SWStationName\"></dxi-item>\r\n </dxo-form>\r\n </dxo-editing>\r\n\r\n <dxi-column dataField=\"Code\" caption=\"Kodu (BeeCell \u0130stasyon ID)\">\r\n <dxi-validation-rule type=\"required\" message=\"\u0130stasyon kodu zorunludur\"></dxi-validation-rule>\r\n <dxi-validation-rule type=\"pattern\" pattern=\"^[0-9]+$\"\r\n message=\"\u0130stasyon kodu say\u0131sal olmal\u0131d\u0131r (BeeCell ID)\"></dxi-validation-rule>\r\n </dxi-column>\r\n <dxi-column dataField=\"U_SWStationName\" caption=\"Ad\u0131\"></dxi-column>\r\n\r\n <dxo-master-detail [enabled]=\"true\" template=\"detailTemplate\"></dxo-master-detail>\r\n <div *dxTemplate=\"let master of 'detailTemplate'\">\r\n <div style=\"padding: 10px 0; font-weight: 600;\">\r\n G\u00D6ZLER: {{ master.data.U_SWStationName }} ({{ master.data.Code }})\r\n </div>\r\n\r\n <dx-data-grid [dataSource]=\"master.data.SWSTATIONEYECollection\" keyExpr=\"U_SWEyeCode\"\r\n [showBorders]=\"true\" [columnAutoWidth]=\"true\"\r\n (onSaved)=\"onEyesChanged(master.data)\" (onRowRemoved)=\"onEyesChanged(master.data)\">\r\n\r\n <dxo-editing mode=\"row\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\"\r\n [useIcons]=\"true\"></dxo-editing>\r\n\r\n <dxi-column dataField=\"U_SWEyeCode\" caption=\"G\u00F6z Kodu (BeeCell shelf_id)\">\r\n <dxi-validation-rule type=\"required\" message=\"G\u00F6z kodu zorunludur\"></dxi-validation-rule>\r\n <dxi-validation-rule type=\"pattern\" pattern=\"^[0-9]+$\"\r\n message=\"G\u00F6z kodu say\u0131sal olmal\u0131d\u0131r (BeeCell ID)\"></dxi-validation-rule>\r\n </dxi-column>\r\n <dxi-column dataField=\"U_SWEyeName\" caption=\"G\u00F6z Ad\u0131\"></dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n</abp-page>\r\n", dependencies: [{ kind: "component", type: i7.DxiItemComponent, selector: "dxi-item", inputs: ["disabled", "html", "icon", "template", "text", "title", "titleTemplate", "visible", "onClick", "stylingMode", "type", "baseSize", "box", "ratio", "shrink", "elementAttr", "hint", "beginGroup", "closeMenuOnClick", "items", "selectable", "selected", "colSpan", "cssClass", "dataField", "editorOptions", "editorType", "helpText", "isRequired", "itemType", "label", "name", "validationRules", "visibleIndex", "alignItemLabels", "caption", "colCount", "colCountByScreen", "tabPanelOptions", "tabs", "badge", "tabTemplate", "buttonOptions", "horizontalAlignment", "verticalAlignment", "locateInMenu", "location", "menuItemTemplate", "options", "showText", "widget", "height", "width", "imageAlt", "imageSrc", "acceptedValues", "formatName", "formatValues", "key", "showChevron", "heightRatio", "widthRatio", "expanded", "hasItems", "id", "parentId"] }, { kind: "directive", type: i8.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i6.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i7.DxoColumnChooserComponent, selector: "dxo-column-chooser", inputs: ["allowSearch", "emptyPanelText", "enabled", "height", "mode", "searchTimeout", "sortOrder", "title", "width"] }, { kind: "component", type: i7.DxoColumnFixingComponent, selector: "dxo-column-fixing", inputs: ["enabled", "texts"] }, { kind: "component", type: i7.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i7.DxoHeaderFilterComponent, selector: "dxo-header-filter", inputs: ["allowSearch", "dataSource", "groupInterval", "height", "searchMode", "width", "searchTimeout", "texts", "visible", "showRelevantValues"] }, { kind: "component", type: i7.DxiValidationRuleComponent, selector: "dxi-validation-rule", inputs: ["message", "trim", "type", "ignoreEmptyValue", "max", "min", "reevaluate", "validationCallback", "comparisonTarget", "comparisonType", "pattern"] }, { kind: "component", type: i7.DxoEditingComponent, selector: "dxo-editing", inputs: ["allowAdding", "allowDeleting", "allowUpdating", "changes", "confirmDelete", "editColumnName", "editRowKey", "form", "mode", "newRowPosition", "popup", "refreshMode", "selectTextOnEditStart", "startEditAction", "texts", "useIcons", "allowAddShape", "allowChangeConnection", "allowChangeConnectorPoints", "allowChangeConnectorText", "allowChangeShapeText", "allowDeleteConnector", "allowDeleteShape", "allowMoveShape", "allowResizeShape", "allowDependencyAdding", "allowDependencyDeleting", "allowResourceAdding", "allowResourceDeleting", "allowResourceUpdating", "allowTaskAdding", "allowTaskDeleting", "allowTaskResourceUpdating", "allowTaskUpdating", "enabled", "allowDragging", "allowResizing", "allowTimeZoneEditing"], outputs: ["changesChange", "editColumnNameChange", "editRowKeyChange"] }, { kind: "component", type: i7.DxoFormComponent, selector: "dxo-form", inputs: ["accessKey", "activeStateEnabled", "alignItemLabels", "alignItemLabelsInAllGroups", "colCount", "colCountByScreen", "customizeItem", "disabled", "elementAttr", "focusStateEnabled", "formData", "height", "hint", "hoverStateEnabled", "items", "labelLocation", "labelMode", "minColWidth", "onContentReady", "onDisposing", "onEditorEnterKey", "onFieldDataChanged", "onInitialized", "onOptionChanged", "optionalMark", "readOnly", "requiredMark", "requiredMessage", "rtlEnabled", "screenByWidth", "scrollingEnabled", "showColonAfterLabel", "showOptionalMark", "showRequiredMark", "showValidationSummary", "tabIndex", "validationGroup", "visible", "width"], outputs: ["formDataChange"] }, { kind: "component", type: i7.DxoPopupComponent, selector: "dxo-popup", inputs: ["accessKey", "animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "dragAndResizeArea", "dragEnabled", "dragOutsideBoundary", "elementAttr", "focusStateEnabled", "fullScreen", "height", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onResize", "onResizeEnd", "onResizeStart", "onShowing", "onShown", "onTitleRendered", "position", "resizeEnabled", "restorePosition", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showTitle", "tabIndex", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["heightChange", "positionChange", "visibleChange", "widthChange"] }, { kind: "component", type: i7.DxoExportComponent, selector: "dxo-export", inputs: ["backgroundColor", "enabled", "fileName", "formats", "margin", "printingEnabled", "svgToCanvas", "allowExportSelectedData", "texts"] }, { kind: "component", type: i7.DxoFilterBuilderComponent, selector: "dxo-filter-builder", inputs: ["accessKey", "activeStateEnabled", "allowHierarchicalFields", "customOperations", "disabled", "elementAttr", "fields", "filterOperationDescriptions", "focusStateEnabled", "groupOperationDescriptions", "groupOperations", "height", "hint", "hoverStateEnabled", "maxGroupLevel", "onContentReady", "onDisposing", "onEditorPrepared", "onEditorPreparing", "onInitialized", "onOptionChanged", "onValueChanged", "rtlEnabled", "tabIndex", "value", "visible", "width"], outputs: ["valueChange"] }, { kind: "component", type: i7.DxoFilterPanelComponent, selector: "dxo-filter-panel", inputs: ["customizeText", "filterEnabled", "texts", "visible"], outputs: ["filterEnabledChange"] }, { kind: "component", type: i7.DxoFilterRowComponent, selector: "dxo-filter-row", inputs: ["applyFilter", "applyFilterText", "betweenEndText", "betweenStartText", "operationDescriptions", "resetOperationText", "showAllText", "showOperationChooser", "visible"] }, { kind: "component", type: i7.DxoGroupingComponent, selector: "dxo-grouping", inputs: ["allowCollapsing", "autoExpandAll", "contextMenuEnabled", "expandMode", "texts"] }, { kind: "component", type: i7.DxoGroupPanelComponent, selector: "dxo-group-panel", inputs: ["allowColumnDragging", "emptyPanelText", "visible"], outputs: ["visibleChange"] }, { kind: "component", type: i7.DxoMasterDetailComponent, selector: "dxo-master-detail", inputs: ["autoExpandAll", "enabled", "template"] }, { kind: "component", type: i7.DxoPagerComponent, selector: "dxo-pager", inputs: ["allowedPageSizes", "displayMode", "infoText", "label", "showInfo", "showNavigationButtons", "showPageSizeSelector", "visible"] }, { kind: "component", type: i7.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i7.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i7.DxoSortingComponent, selector: "dxo-sorting", inputs: ["ascendingText", "clearText", "descendingText", "mode", "showSortIndexes"] }] });
1806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationComponent, decorators: [{
1807
+ type: Component,
1808
+ args: [{ selector: 'lib-station', template: "<abp-page [title]=\"'\u0130stasyonlar'\">\r\n\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid #dxstationInstance [dataSource]=\"stationDataSource\" [showRowLines]=\"true\" [showBorders]=\"true\"\r\n [remoteOperations]=\"false\" [hoverStateEnabled]=\"true\" [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\" columnResizingMode=\"widget\" [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\" [columnHidingEnabled]=\"true\" style=\"height: 75vh;\">\r\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[50,100,200]\"\r\n [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\">\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"50\"></dxo-paging>\r\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\r\n <dxo-grouping #expand [autoExpandAll]=\"false\" [allowCollapsing]=\"true\"\r\n [contextMenuEnabled]=\"true\"></dxo-grouping>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"horizontal\" showScrollbar=\"always\"></dxo-scrolling>\r\n\r\n <dxo-editing mode=\"popup\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\"\r\n [useIcons]=\"true\">\r\n <dxo-popup title=\"\u0130stasyon\" [showTitle]=\"true\" [width]=\"500\" [height]=\"320\"></dxo-popup>\r\n <dxo-form>\r\n <dxi-item dataField=\"Code\"></dxi-item>\r\n <dxi-item dataField=\"U_SWStationName\"></dxi-item>\r\n </dxo-form>\r\n </dxo-editing>\r\n\r\n <dxi-column dataField=\"Code\" caption=\"Kodu (BeeCell \u0130stasyon ID)\">\r\n <dxi-validation-rule type=\"required\" message=\"\u0130stasyon kodu zorunludur\"></dxi-validation-rule>\r\n <dxi-validation-rule type=\"pattern\" pattern=\"^[0-9]+$\"\r\n message=\"\u0130stasyon kodu say\u0131sal olmal\u0131d\u0131r (BeeCell ID)\"></dxi-validation-rule>\r\n </dxi-column>\r\n <dxi-column dataField=\"U_SWStationName\" caption=\"Ad\u0131\"></dxi-column>\r\n\r\n <dxo-master-detail [enabled]=\"true\" template=\"detailTemplate\"></dxo-master-detail>\r\n <div *dxTemplate=\"let master of 'detailTemplate'\">\r\n <div style=\"padding: 10px 0; font-weight: 600;\">\r\n G\u00D6ZLER: {{ master.data.U_SWStationName }} ({{ master.data.Code }})\r\n </div>\r\n\r\n <dx-data-grid [dataSource]=\"master.data.SWSTATIONEYECollection\" keyExpr=\"U_SWEyeCode\"\r\n [showBorders]=\"true\" [columnAutoWidth]=\"true\"\r\n (onSaved)=\"onEyesChanged(master.data)\" (onRowRemoved)=\"onEyesChanged(master.data)\">\r\n\r\n <dxo-editing mode=\"row\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\"\r\n [useIcons]=\"true\"></dxo-editing>\r\n\r\n <dxi-column dataField=\"U_SWEyeCode\" caption=\"G\u00F6z Kodu (BeeCell shelf_id)\">\r\n <dxi-validation-rule type=\"required\" message=\"G\u00F6z kodu zorunludur\"></dxi-validation-rule>\r\n <dxi-validation-rule type=\"pattern\" pattern=\"^[0-9]+$\"\r\n message=\"G\u00F6z kodu say\u0131sal olmal\u0131d\u0131r (BeeCell ID)\"></dxi-validation-rule>\r\n </dxi-column>\r\n <dxi-column dataField=\"U_SWEyeName\" caption=\"G\u00F6z Ad\u0131\"></dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n</abp-page>\r\n" }]
1809
+ }], ctorParameters: function () { return [{ type: i2.ToasterService }, { type: StationService }]; } });
1810
+
1811
+ const routes$3 = [
1812
+ { path: '', component: StationComponent },
1813
+ ];
1814
+ class StationModule {
1815
+ }
1816
+ StationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1817
+ StationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: StationModule, declarations: [StationComponent], imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1818
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1819
+ NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule, i1$1.RouterModule] });
1820
+ StationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationModule, imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1821
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1822
+ NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
1823
+ RouterModule.forChild(routes$3)] });
1824
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationModule, decorators: [{
1825
+ type: NgModule,
1826
+ args: [{
1827
+ declarations: [StationComponent],
1828
+ imports: [
1829
+ CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
1830
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
1831
+ NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
1832
+ RouterModule.forChild(routes$3),
1833
+ ],
1834
+ }]
1835
+ }] });
1836
+ function loadStationModuleAsChild() {
1837
+ return Promise.resolve(StationModule);
1838
+ }
1839
+
1840
+ class QuantityCorrectionService {
1841
+ constructor(restService) {
1842
+ this.restService = restService;
1843
+ this.apiName = 'SmartWarehouse';
1844
+ /**
1845
+ * Fiziksel BeeCell kutu barkoduna göre açık görev taslağı satırlarını getirir
1846
+ */
1847
+ this.getLinesByBoxBarcode = (boxBarcode) => this.restService.request({
1848
+ method: 'GET',
1849
+ url: `/api/smart-warehouse/sap-quantity-correction/get-lines-by-box/${boxBarcode}`,
1850
+ }, { apiName: this.apiName });
1851
+ /**
1852
+ * "Raf ve Sipariş" modu — önizleme (hiçbir şey yazmaz)
1853
+ */
1854
+ this.previewQuantityCorrection = (dto) => this.restService.request({
1855
+ method: 'POST',
1856
+ url: '/api/smart-warehouse/sap-quantity-correction/preview',
1857
+ body: dto,
1858
+ }, { apiName: this.apiName });
1859
+ /**
1860
+ * "Raf ve Sipariş" modu — kesin algoritmayı uygular
1861
+ */
1862
+ this.applyQuantityCorrection = (dto) => this.restService.request({
1863
+ method: 'POST',
1864
+ url: '/api/smart-warehouse/sap-quantity-correction/apply',
1865
+ body: dto,
1866
+ }, { apiName: this.apiName });
1867
+ /**
1868
+ * "Sadece Sipariş" modu — stok hareketi yapmadan miktar düzeltme işlemini gerçekleştirir
1869
+ */
1870
+ this.updateQuantity = (dto) => this.restService.request({
1871
+ method: 'POST',
1872
+ url: '/api/smart-warehouse/sap-quantity-correction/update-quantity',
1873
+ body: dto,
1874
+ }, { apiName: this.apiName });
1875
+ }
1876
+ }
1877
+ QuantityCorrectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
1878
+ QuantityCorrectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionService, providedIn: 'root' });
1879
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionService, decorators: [{
1880
+ type: Injectable,
1881
+ args: [{ providedIn: 'root' }]
1882
+ }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
1883
+
1884
+ class QuantityCorrectionComponent {
1885
+ constructor(quantityCorrectionService, confirmationService, toasterService) {
1886
+ this.quantityCorrectionService = quantityCorrectionService;
1887
+ this.confirmationService = confirmationService;
1888
+ this.toasterService = toasterService;
1889
+ this.boxBarcode = '';
1890
+ this.lines = [];
1891
+ this.selectedLine = null;
1892
+ this.lastSearchedBoxBarcode = '';
1893
+ this.hasSearched = false;
1894
+ this.suppressNextBlurSearch = false;
1895
+ this.updateType = 'shelfAndOrder'; // default: Raf ve Sipariş
1896
+ this.newQuantity = null;
1897
+ this.isLoading = false;
1898
+ this.isSaving = false;
1899
+ }
1900
+ onBoxBarcodeChange(value) {
1901
+ this.boxBarcode = value;
1902
+ if (value.trim() === '') {
1903
+ this.resetLineState();
1904
+ this.hasSearched = false;
1905
+ this.lastSearchedBoxBarcode = '';
1906
+ return;
1907
+ }
1908
+ if (this.lastSearchedBoxBarcode && value.trim() !== this.lastSearchedBoxBarcode) {
1909
+ this.resetLineState();
1910
+ this.hasSearched = false;
1911
+ }
1912
+ }
1913
+ onBoxBarcodeEnterKeydown() {
1914
+ this.suppressNextBlurSearch = true;
1915
+ this.onBoxBarcodeEnter();
1916
+ }
1917
+ onBoxBarcodeBlur() {
1918
+ if (this.suppressNextBlurSearch) {
1919
+ this.suppressNextBlurSearch = false;
1920
+ return;
1921
+ }
1922
+ this.onBoxBarcodeEnter();
1923
+ }
1924
+ /**
1925
+ * Kasa barkodu girilip Enter veya blur yapıldığında çalışır.
1926
+ * Barkoda göre açık görev taslağı satırlarını yükler.
1927
+ */
1928
+ onBoxBarcodeEnter() {
1929
+ if (this.isLoading) {
1930
+ return;
1931
+ }
1932
+ const trimmedBarcode = this.boxBarcode.trim();
1933
+ this.resetLineState();
1934
+ if (!trimmedBarcode) {
1935
+ this.hasSearched = false;
1936
+ this.lastSearchedBoxBarcode = '';
1937
+ return;
1938
+ }
1939
+ this.hasSearched = true;
1940
+ this.lastSearchedBoxBarcode = trimmedBarcode;
1941
+ this.isLoading = true;
1942
+ this.quantityCorrectionService.getLinesByBoxBarcode(trimmedBarcode).subscribe({
1943
+ next: (data) => {
1944
+ this.lines = data || [];
1945
+ this.isLoading = false;
1946
+ if (this.lines.length === 0) {
1947
+ this.toasterService.warn('Bu kasada açık görev bulunamadı.');
1948
+ }
1949
+ },
1950
+ error: (error) => {
1951
+ const errorMessage = error?.error?.error?.message || 'Kasa içeriği yüklenirken bir hata oluştu.';
1952
+ this.toasterService.error(errorMessage);
1953
+ this.isLoading = false;
1954
+ },
1955
+ });
1956
+ }
1957
+ /**
1958
+ * Grid'den satır seçildiğinde çalışır.
1959
+ */
1960
+ onSelectLine(line) {
1961
+ this.selectedLine = line;
1962
+ this.newQuantity = line.CurrentQuantity;
1963
+ }
1964
+ /**
1965
+ * Güncelle butonuna basıldığında seçili moda göre miktar düzeltme akışını başlatır.
1966
+ */
1967
+ onUpdate() {
1968
+ if (!this.selectedLine) {
1969
+ this.toasterService.warn('Lütfen bir satır seçiniz.');
1970
+ return;
1971
+ }
1972
+ if (this.newQuantity === null || this.newQuantity < 0) {
1973
+ this.toasterService.warn('Geçerli bir miktar giriniz.');
1974
+ return;
1975
+ }
1976
+ if (this.updateType === 'orderOnly') {
1977
+ this.updateOrderOnly();
1978
+ }
1979
+ else {
1980
+ this.previewAndApplyShelfAndOrder();
1981
+ }
1982
+ }
1983
+ /**
1984
+ * "Sadece Sipariş": stok hareketi yok, sipariş iptali/miktar değişikliği senaryosu.
1985
+ */
1986
+ updateOrderOnly() {
1987
+ const line = this.selectedLine;
1988
+ if (this.newQuantity === line.CurrentQuantity) {
1989
+ this.toasterService.warn('Yeni miktar mevcut miktar ile aynı.');
1990
+ return;
1991
+ }
1992
+ const dto = {
1993
+ ItrDocEntry: line.ItrDocEntry,
1994
+ ItrLineNum: line.ItrLineNum,
1995
+ ReservationCode: line.ReservationCode,
1996
+ OrderDocEntry: line.OrderDocEntry,
1997
+ LineNum: 0,
1998
+ ItemCode: line.ItemCode,
1999
+ NewQuantity: this.newQuantity,
2000
+ UpdateType: this.updateType,
2001
+ BinAbs: line.BinAbs,
2002
+ BinCode: line.BinCode,
2003
+ BatchNumber: line.BatchNumber,
2004
+ WarehouseCode: line.WarehouseCode,
2005
+ };
2006
+ this.isSaving = true;
2007
+ this.quantityCorrectionService.updateQuantity(dto).subscribe({
2008
+ next: (result) => {
2009
+ this.toasterService.success(result);
2010
+ this.isSaving = false;
2011
+ this.onBoxBarcodeEnter();
2012
+ },
2013
+ error: (error) => {
2014
+ const errorMessage = error?.error?.error?.message || 'Miktar düzeltme sırasında bir hata oluştu.';
2015
+ this.toasterService.error(errorMessage);
2016
+ this.isSaving = false;
2017
+ },
2018
+ });
2019
+ }
2020
+ /**
2021
+ * "Raf ve Sipariş": kasada fiilen sayılan miktar farklıysa Dummy Kasa / çapraz kasa kesin algoritması.
2022
+ * Önce önizleme yapılır; çapraz kasa önerisi varsa kullanıcıya onay penceresi gösterilir.
2023
+ */
2024
+ previewAndApplyShelfAndOrder() {
2025
+ const line = this.selectedLine;
2026
+ const previewDto = {
2027
+ TaskDraftDocEntry: line.ItrDocEntry,
2028
+ TaskDraftLineNum: line.ItrLineNum,
2029
+ BinAbs: line.BinAbs,
2030
+ BinCode: line.BinCode,
2031
+ ItemCode: line.ItemCode,
2032
+ WarehouseCode: line.WarehouseCode,
2033
+ CountedQuantity: this.newQuantity,
2034
+ };
2035
+ this.isSaving = true;
2036
+ this.quantityCorrectionService.previewQuantityCorrection(previewDto).subscribe({
2037
+ next: (preview) => {
2038
+ if (preview.RequiresConfirmation) {
2039
+ this.isSaving = false;
2040
+ this.confirmationService.warn(preview.ConfirmationMessage, 'Çapraz Kasa').subscribe((status) => {
2041
+ const accepted = status === 'confirm';
2042
+ this.applyShelfAndOrder(line, accepted, preview.ReplacementBinCode, preview.ReplacementBinAbs);
2043
+ });
2044
+ return;
2045
+ }
2046
+ this.applyShelfAndOrder(line, false, '', 0);
2047
+ },
2048
+ error: (error) => {
2049
+ const errorMessage = error?.error?.error?.message || 'Kasa düzeltmesi önizlenirken bir hata oluştu.';
2050
+ this.toasterService.error(errorMessage);
2051
+ this.isSaving = false;
2052
+ },
2053
+ });
2054
+ }
2055
+ applyShelfAndOrder(line, useReplacementBox, replacementBinCode, replacementBinAbs) {
2056
+ const applyDto = {
2057
+ TaskDraftDocEntry: line.ItrDocEntry,
2058
+ TaskDraftLineNum: line.ItrLineNum,
2059
+ BinAbs: line.BinAbs,
2060
+ BinCode: line.BinCode,
2061
+ OrderDocEntry: line.OrderDocEntry,
2062
+ OrderDocNum: line.OrderDocNum,
2063
+ ItemCode: line.ItemCode,
2064
+ ItemDescription: line.ItemName,
2065
+ WarehouseCode: line.WarehouseCode,
2066
+ CountedQuantity: this.newQuantity,
2067
+ UseReplacementBox: useReplacementBox,
2068
+ ReplacementBinCode: replacementBinCode,
2069
+ ReplacementBinAbs: replacementBinAbs,
2070
+ };
2071
+ this.isSaving = true;
2072
+ this.quantityCorrectionService.applyQuantityCorrection(applyDto).subscribe({
2073
+ next: (result) => {
2074
+ this.toasterService.success(result);
2075
+ this.isSaving = false;
2076
+ this.onBoxBarcodeEnter();
2077
+ },
2078
+ error: (error) => {
2079
+ const errorMessage = error?.error?.error?.message || 'Kasa düzeltmesi uygulanırken bir hata oluştu.';
2080
+ this.toasterService.error(errorMessage);
2081
+ this.isSaving = false;
2082
+ },
2083
+ });
2084
+ }
2085
+ /**
2086
+ * Formu temizler.
2087
+ */
2088
+ onClear() {
2089
+ this.boxBarcode = '';
2090
+ this.resetLineState();
2091
+ this.hasSearched = false;
2092
+ this.lastSearchedBoxBarcode = '';
2093
+ this.updateType = 'shelfAndOrder';
2094
+ }
2095
+ resetLineState() {
2096
+ this.lines = [];
2097
+ this.selectedLine = null;
2098
+ this.newQuantity = null;
2099
+ }
2100
+ }
2101
+ QuantityCorrectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionComponent, deps: [{ token: QuantityCorrectionService }, { token: i2.ConfirmationService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
2102
+ QuantityCorrectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: QuantityCorrectionComponent, selector: "lib-quantity-correction", ngImport: i0, template: "<abp-page [title]=\"'Al\u0131nacak Miktar D\u00FCzeltme'\">\n <div class=\"quantity-correction-container\">\n <div class=\"quantity-correction-layout\">\n <div class=\"qc-form-card\">\n\n <!-- Kasa Barkodu Giri\u015Fi -->\n <div class=\"form-section\">\n <label class=\"section-label\" for=\"boxBarcodeInput\">Kasa Kodu</label>\n <input type=\"text\" class=\"form-control form-input\" id=\"boxBarcodeInput\"\n [ngModel]=\"boxBarcode\"\n (ngModelChange)=\"onBoxBarcodeChange($event)\"\n (keydown.enter)=\"onBoxBarcodeEnterKeydown()\"\n (blur)=\"onBoxBarcodeBlur()\"\n placeholder=\"Kasa barkodunu girin veya taray\u0131n...\"\n [disabled]=\"isLoading\" />\n </div>\n\n <!-- Y\u00FCkleniyor -->\n <div class=\"form-section\" *ngIf=\"isLoading\">\n <div class=\"content-loading\">\n <i class=\"fa fa-spinner fa-spin\"></i> Kasa i\u00E7eri\u011Fi y\u00FCkleniyor...\n </div>\n </div>\n\n <!-- Sat\u0131r Listesi (Grid) -->\n <div class=\"form-section reservation-section\" *ngIf=\"lines.length > 0 && !isLoading\">\n <label class=\"section-label\">Kasadaki G\u00F6rev Sat\u0131rlar\u0131</label>\n <div class=\"reservation-table-wrap\">\n <table class=\"table table-bordered table-hover table-sm\">\n <thead class=\"table-header\">\n <tr>\n <th>Sipari\u015F No</th>\n <th>\u00DCr\u00FCn Kodu</th>\n <th>\u00DCr\u00FCn Ad\u0131</th>\n <th>Parti</th>\n <th>Miktar</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let l of lines\"\n (click)=\"onSelectLine(l)\"\n [class.selected-row]=\"selectedLine?.ReservationCode === l.ReservationCode\"\n class=\"clickable-row\">\n <td>{{ l.OrderDocNum }}</td>\n <td>{{ l.ItemCode }}</td>\n <td>{{ l.ItemName }}</td>\n <td>{{ l.BatchNumber }}</td>\n <td class=\"text-end\">{{ l.CurrentQuantity }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- Bo\u015F sonu\u00E7 -->\n <div class=\"form-section\" *ngIf=\"hasSearched && lastSearchedBoxBarcode && lines.length === 0 && !isLoading\">\n <div class=\"content-empty\">\n <i class=\"fa fa-info-circle\"></i> Bu kasada a\u00E7\u0131k g\u00F6rev bulunamad\u0131.\n </div>\n </div>\n\n <!-- D\u00FCzenleme Paneli (Sat\u0131r se\u00E7ilince aktif) -->\n <div *ngIf=\"selectedLine\" class=\"edit-panel\">\n <hr class=\"form-divider\" />\n\n <!-- \u00DCr\u00FCn Bilgileri (readonly) -->\n <div class=\"form-section product-info\">\n <div class=\"info-row\">\n <span class=\"info-label\">\u00DCr\u00FCn Kodu:</span>\n <span class=\"info-value\">{{ selectedLine.ItemCode }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">\u00DCr\u00FCn Ad\u0131:</span>\n <span class=\"info-value\">{{ selectedLine.ItemName }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Beklenen Miktar:</span>\n <span class=\"info-value info-qty\">{{ selectedLine.CurrentQuantity }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Sipari\u015F No:</span>\n <span class=\"info-value\">{{ selectedLine.OrderDocNum }}</span>\n </div>\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- G\u00FCncelleme Tipi - Radio Buttons -->\n <div class=\"form-section\">\n <label class=\"section-label\">G\u00FCncelleme Tipi</label>\n <div class=\"radio-group\">\n <label class=\"radio-option\">\n <input type=\"radio\" name=\"updateType\"\n value=\"shelfAndOrder\"\n [(ngModel)]=\"updateType\" />\n <span class=\"radio-text\">Raf ve Sipari\u015F</span>\n </label>\n <label class=\"radio-option\">\n <input type=\"radio\" name=\"updateType\"\n value=\"orderOnly\"\n [(ngModel)]=\"updateType\" />\n <span class=\"radio-text\">Sadece Sipari\u015F</span>\n </label>\n </div>\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- Miktar -->\n <div class=\"form-section\">\n <label class=\"section-label\" for=\"newQuantityInput\">\n {{ updateType === 'orderOnly' ? 'Yeni Sipari\u015F Miktar\u0131' : 'Kasada Say\u0131lan Miktar' }}\n </label>\n <input type=\"number\" class=\"form-control form-input\" id=\"newQuantityInput\"\n [(ngModel)]=\"newQuantity\"\n (keydown.enter)=\"onUpdate()\"\n placeholder=\"Miktar\u0131 girin...\"\n min=\"0\" />\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- Butonlar -->\n <div class=\"form-section button-group\">\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onUpdate()\"\n [disabled]=\"isSaving || newQuantity === null || newQuantity < 0\">\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-check'\"></i>\n {{ isSaving ? 'G\u00FCncelleniyor...' : 'G\u00FCncelle' }}\n </button>\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\" [disabled]=\"isSaving\">\n <i class=\"fa fa-eraser\"></i> Temizle\n </button>\n </div>\n </div>\n\n </div>\n </div>\n </div>\n</abp-page>\n", styles: ["lib-quantity-correction .abp-page-content{display:block!important;flex:unset!important;min-height:unset!important;height:auto!important}lib-quantity-correction .abp-page-content>.row{display:block!important;flex:unset!important;min-height:unset!important}lib-quantity-correction .abp-page-content>.row>.col,lib-quantity-correction .abp-page-content>.row>[class*=col-]{display:block!important;flex:unset!important;min-height:unset!important}.quantity-correction-container{padding:1rem}.quantity-correction-layout{max-width:800px;margin:0 auto}.qc-form-card{background:#fff;border-radius:8px;box-shadow:0 2px 8px #00000014;padding:1.5rem}.form-section{margin-bottom:1rem}.section-label{font-weight:600;font-size:.9rem;color:#333;margin-bottom:.4rem;display:block}.form-input{font-size:1rem;padding:.5rem .75rem}.content-loading{color:#666;padding:.5rem 0;font-size:.9rem}.content-empty{background:#f8f9fa;border:1px solid #e2e6ea;border-radius:6px;padding:.75rem 1rem;color:#6c757d;font-size:.9rem}.reservation-section{margin-bottom:.25rem}.reservation-table-wrap{overflow-x:auto;width:100%}.reservation-section .table{margin-bottom:0}.table-header{background-color:#f0f2f5}.table-header th{font-weight:600;font-size:.85rem;color:#444;white-space:nowrap}.clickable-row{cursor:pointer;transition:background-color .15s}.clickable-row:hover{background-color:#e9f5ff}.selected-row{background-color:#cce5ff!important;font-weight:500}.edit-panel{margin-top:0}.product-info{background:#f8f9fa;border-radius:6px;padding:.75rem 1rem}.info-row{display:flex;gap:.5rem;margin-bottom:.3rem;align-items:baseline}.info-label{font-weight:600;font-size:.85rem;color:#555;min-width:120px}.info-value{font-size:.9rem;color:#222}.info-qty{font-weight:700;color:#0d6efd}.radio-group{display:flex;gap:1.5rem}.radio-option{display:flex;align-items:center;gap:.4rem;cursor:pointer;font-size:.9rem}.radio-text{color:#333}.form-divider{border:none;border-top:1px solid #e9ecef;margin:.75rem 0}.button-group{display:flex;gap:.5rem}.btn-action-success{background-color:#28a745;border-color:#28a745;color:#fff;padding:.4rem 1.2rem;font-size:.9rem}.btn-action-success:hover:not(:disabled){background-color:#218838}.btn-action-success:disabled{opacity:.6}.btn-action-outline{background-color:transparent;border:1px solid #6c757d;color:#6c757d;padding:.4rem 1.2rem;font-size:.9rem}.btn-action-outline:hover:not(:disabled){background-color:#f8f9fa}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i5.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }], encapsulation: i0.ViewEncapsulation.None });
2103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionComponent, decorators: [{
2104
+ type: Component,
2105
+ args: [{ selector: 'lib-quantity-correction', encapsulation: ViewEncapsulation.None, template: "<abp-page [title]=\"'Al\u0131nacak Miktar D\u00FCzeltme'\">\n <div class=\"quantity-correction-container\">\n <div class=\"quantity-correction-layout\">\n <div class=\"qc-form-card\">\n\n <!-- Kasa Barkodu Giri\u015Fi -->\n <div class=\"form-section\">\n <label class=\"section-label\" for=\"boxBarcodeInput\">Kasa Kodu</label>\n <input type=\"text\" class=\"form-control form-input\" id=\"boxBarcodeInput\"\n [ngModel]=\"boxBarcode\"\n (ngModelChange)=\"onBoxBarcodeChange($event)\"\n (keydown.enter)=\"onBoxBarcodeEnterKeydown()\"\n (blur)=\"onBoxBarcodeBlur()\"\n placeholder=\"Kasa barkodunu girin veya taray\u0131n...\"\n [disabled]=\"isLoading\" />\n </div>\n\n <!-- Y\u00FCkleniyor -->\n <div class=\"form-section\" *ngIf=\"isLoading\">\n <div class=\"content-loading\">\n <i class=\"fa fa-spinner fa-spin\"></i> Kasa i\u00E7eri\u011Fi y\u00FCkleniyor...\n </div>\n </div>\n\n <!-- Sat\u0131r Listesi (Grid) -->\n <div class=\"form-section reservation-section\" *ngIf=\"lines.length > 0 && !isLoading\">\n <label class=\"section-label\">Kasadaki G\u00F6rev Sat\u0131rlar\u0131</label>\n <div class=\"reservation-table-wrap\">\n <table class=\"table table-bordered table-hover table-sm\">\n <thead class=\"table-header\">\n <tr>\n <th>Sipari\u015F No</th>\n <th>\u00DCr\u00FCn Kodu</th>\n <th>\u00DCr\u00FCn Ad\u0131</th>\n <th>Parti</th>\n <th>Miktar</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let l of lines\"\n (click)=\"onSelectLine(l)\"\n [class.selected-row]=\"selectedLine?.ReservationCode === l.ReservationCode\"\n class=\"clickable-row\">\n <td>{{ l.OrderDocNum }}</td>\n <td>{{ l.ItemCode }}</td>\n <td>{{ l.ItemName }}</td>\n <td>{{ l.BatchNumber }}</td>\n <td class=\"text-end\">{{ l.CurrentQuantity }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- Bo\u015F sonu\u00E7 -->\n <div class=\"form-section\" *ngIf=\"hasSearched && lastSearchedBoxBarcode && lines.length === 0 && !isLoading\">\n <div class=\"content-empty\">\n <i class=\"fa fa-info-circle\"></i> Bu kasada a\u00E7\u0131k g\u00F6rev bulunamad\u0131.\n </div>\n </div>\n\n <!-- D\u00FCzenleme Paneli (Sat\u0131r se\u00E7ilince aktif) -->\n <div *ngIf=\"selectedLine\" class=\"edit-panel\">\n <hr class=\"form-divider\" />\n\n <!-- \u00DCr\u00FCn Bilgileri (readonly) -->\n <div class=\"form-section product-info\">\n <div class=\"info-row\">\n <span class=\"info-label\">\u00DCr\u00FCn Kodu:</span>\n <span class=\"info-value\">{{ selectedLine.ItemCode }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">\u00DCr\u00FCn Ad\u0131:</span>\n <span class=\"info-value\">{{ selectedLine.ItemName }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Beklenen Miktar:</span>\n <span class=\"info-value info-qty\">{{ selectedLine.CurrentQuantity }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Sipari\u015F No:</span>\n <span class=\"info-value\">{{ selectedLine.OrderDocNum }}</span>\n </div>\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- G\u00FCncelleme Tipi - Radio Buttons -->\n <div class=\"form-section\">\n <label class=\"section-label\">G\u00FCncelleme Tipi</label>\n <div class=\"radio-group\">\n <label class=\"radio-option\">\n <input type=\"radio\" name=\"updateType\"\n value=\"shelfAndOrder\"\n [(ngModel)]=\"updateType\" />\n <span class=\"radio-text\">Raf ve Sipari\u015F</span>\n </label>\n <label class=\"radio-option\">\n <input type=\"radio\" name=\"updateType\"\n value=\"orderOnly\"\n [(ngModel)]=\"updateType\" />\n <span class=\"radio-text\">Sadece Sipari\u015F</span>\n </label>\n </div>\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- Miktar -->\n <div class=\"form-section\">\n <label class=\"section-label\" for=\"newQuantityInput\">\n {{ updateType === 'orderOnly' ? 'Yeni Sipari\u015F Miktar\u0131' : 'Kasada Say\u0131lan Miktar' }}\n </label>\n <input type=\"number\" class=\"form-control form-input\" id=\"newQuantityInput\"\n [(ngModel)]=\"newQuantity\"\n (keydown.enter)=\"onUpdate()\"\n placeholder=\"Miktar\u0131 girin...\"\n min=\"0\" />\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- Butonlar -->\n <div class=\"form-section button-group\">\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onUpdate()\"\n [disabled]=\"isSaving || newQuantity === null || newQuantity < 0\">\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-check'\"></i>\n {{ isSaving ? 'G\u00FCncelleniyor...' : 'G\u00FCncelle' }}\n </button>\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\" [disabled]=\"isSaving\">\n <i class=\"fa fa-eraser\"></i> Temizle\n </button>\n </div>\n </div>\n\n </div>\n </div>\n </div>\n</abp-page>\n", styles: ["lib-quantity-correction .abp-page-content{display:block!important;flex:unset!important;min-height:unset!important;height:auto!important}lib-quantity-correction .abp-page-content>.row{display:block!important;flex:unset!important;min-height:unset!important}lib-quantity-correction .abp-page-content>.row>.col,lib-quantity-correction .abp-page-content>.row>[class*=col-]{display:block!important;flex:unset!important;min-height:unset!important}.quantity-correction-container{padding:1rem}.quantity-correction-layout{max-width:800px;margin:0 auto}.qc-form-card{background:#fff;border-radius:8px;box-shadow:0 2px 8px #00000014;padding:1.5rem}.form-section{margin-bottom:1rem}.section-label{font-weight:600;font-size:.9rem;color:#333;margin-bottom:.4rem;display:block}.form-input{font-size:1rem;padding:.5rem .75rem}.content-loading{color:#666;padding:.5rem 0;font-size:.9rem}.content-empty{background:#f8f9fa;border:1px solid #e2e6ea;border-radius:6px;padding:.75rem 1rem;color:#6c757d;font-size:.9rem}.reservation-section{margin-bottom:.25rem}.reservation-table-wrap{overflow-x:auto;width:100%}.reservation-section .table{margin-bottom:0}.table-header{background-color:#f0f2f5}.table-header th{font-weight:600;font-size:.85rem;color:#444;white-space:nowrap}.clickable-row{cursor:pointer;transition:background-color .15s}.clickable-row:hover{background-color:#e9f5ff}.selected-row{background-color:#cce5ff!important;font-weight:500}.edit-panel{margin-top:0}.product-info{background:#f8f9fa;border-radius:6px;padding:.75rem 1rem}.info-row{display:flex;gap:.5rem;margin-bottom:.3rem;align-items:baseline}.info-label{font-weight:600;font-size:.85rem;color:#555;min-width:120px}.info-value{font-size:.9rem;color:#222}.info-qty{font-weight:700;color:#0d6efd}.radio-group{display:flex;gap:1.5rem}.radio-option{display:flex;align-items:center;gap:.4rem;cursor:pointer;font-size:.9rem}.radio-text{color:#333}.form-divider{border:none;border-top:1px solid #e9ecef;margin:.75rem 0}.button-group{display:flex;gap:.5rem}.btn-action-success{background-color:#28a745;border-color:#28a745;color:#fff;padding:.4rem 1.2rem;font-size:.9rem}.btn-action-success:hover:not(:disabled){background-color:#218838}.btn-action-success:disabled{opacity:.6}.btn-action-outline{background-color:transparent;border:1px solid #6c757d;color:#6c757d;padding:.4rem 1.2rem;font-size:.9rem}.btn-action-outline:hover:not(:disabled){background-color:#f8f9fa}\n"] }]
2106
+ }], ctorParameters: function () { return [{ type: QuantityCorrectionService }, { type: i2.ConfirmationService }, { type: i2.ToasterService }]; } });
2107
+
2108
+ const routes$2 = [
2109
+ { path: '', component: QuantityCorrectionComponent },
2110
+ ];
2111
+ class QuantityCorrectionModule {
2112
+ }
2113
+ QuantityCorrectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2114
+ QuantityCorrectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionModule, declarations: [QuantityCorrectionComponent], imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
2115
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
2116
+ NgbDropdownModule, PageModule, i1$1.RouterModule] });
2117
+ QuantityCorrectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionModule, imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
2118
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
2119
+ NgbDropdownModule, PageModule,
2120
+ RouterModule.forChild(routes$2)] });
2121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionModule, decorators: [{
2122
+ type: NgModule,
2123
+ args: [{
2124
+ declarations: [QuantityCorrectionComponent],
2125
+ imports: [
2126
+ CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
2127
+ NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
2128
+ NgbDropdownModule, PageModule,
2129
+ RouterModule.forChild(routes$2),
2130
+ ],
2131
+ }]
2132
+ }] });
2133
+ function loadQuantityCorrectionModuleAsChild() {
2134
+ return Promise.resolve(QuantityCorrectionModule);
2135
+ }
2136
+
2137
+ class ConnectorParamsService {
2138
+ constructor(restService) {
2139
+ this.restService = restService;
2140
+ this.apiName = 'SmartWarehouse';
2141
+ /** Mevcut tek kaydı döner; kayıt yoksa null döner */
2142
+ this.getConnectorParams = () => this.restService.request({
2143
+ method: 'GET',
2144
+ url: '/api/smart-warehouse/connector-params/get',
2145
+ }, { apiName: this.apiName });
2146
+ /** Kayıt varsa günceller, yoksa oluşturur (upsert) */
2147
+ this.saveConnectorParams = (dto) => this.restService.request({
2148
+ method: 'POST',
2149
+ url: '/api/smart-warehouse/connector-params/save',
2150
+ body: dto,
2151
+ }, { apiName: this.apiName });
2152
+ }
2153
+ }
2154
+ ConnectorParamsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
2155
+ ConnectorParamsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsService, providedIn: 'root' });
2156
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsService, decorators: [{
2157
+ type: Injectable,
2158
+ args: [{ providedIn: 'root' }]
2159
+ }], ctorParameters: function () { return [{ type: i1.RestService }]; } });
2160
+
2161
+ const SESSION_KEY = 'sw_params_configured';
2162
+ class ConnectorParamsGuard {
2163
+ constructor(connectorParamsService, router) {
2164
+ this.connectorParamsService = connectorParamsService;
2165
+ this.router = router;
2166
+ /**
2167
+ * true → parametreler doğrulandı, API çağrısı yapmadan geç.
2168
+ * null → henüz bilinmiyor, API'ye sor.
2169
+ * SessionStorage'a da yazılır: sayfa yenileme (token refresh sonrası reload)
2170
+ * durumunda geçici SAP/auth hatasını "parametre yok" olarak yorumlamaz.
2171
+ */
2172
+ this.configured = null;
2173
+ // Önceki oturumda doğrulanmışsa tekrar API çağrısı yapma.
2174
+ if (sessionStorage.getItem(SESSION_KEY) === 'true') {
2175
+ this.configured = true;
2176
+ }
2177
+ }
2178
+ canActivate() {
2179
+ if (this.configured === true) {
2180
+ return of(true);
2181
+ }
2182
+ return this.connectorParamsService.getConnectorParams().pipe(map(data => {
2183
+ if (data) {
2184
+ this.configured = true;
2185
+ sessionStorage.setItem(SESSION_KEY, 'true');
2186
+ return true;
2187
+ }
2188
+ // Backend 200 döndü ama kayıt yok — gerçekten yapılandırılmamış.
2189
+ return this.router.createUrlTree(['/smart-warehouse/connector-params'], { queryParams: { reason: 'no-config' } });
2190
+ }), catchError((err) => {
2191
+ // 401 (token yenileme), 5xx (SAP session süresi dolmuş, sunucu hatası) gibi
2192
+ // GEÇİCİ hatalar "parametre yok" anlamına gelmiyor; yönlendirme yapma.
2193
+ if (err?.status === 401 || err?.status >= 500) {
2194
+ return of(true);
2195
+ }
2196
+ // 404 veya diğer istemci hataları → parametre gerçekten tanımlı değil.
2197
+ return of(this.router.createUrlTree(['/smart-warehouse/connector-params'], { queryParams: { reason: 'no-config' } }));
2198
+ }));
2199
+ }
2200
+ /** Kayıt silindiğinde / değiştirildiğinde cache'i temizle */
2201
+ invalidate() {
2202
+ this.configured = null;
2203
+ sessionStorage.removeItem(SESSION_KEY);
2204
+ }
2205
+ }
2206
+ ConnectorParamsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsGuard, deps: [{ token: ConnectorParamsService }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
2207
+ ConnectorParamsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsGuard, providedIn: 'root' });
2208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsGuard, decorators: [{
2209
+ type: Injectable,
2210
+ args: [{ providedIn: 'root' }]
2211
+ }], ctorParameters: function () { return [{ type: ConnectorParamsService }, { type: i1$1.Router }]; } });
2212
+
2213
+ class ConnectorParamsComponent {
2214
+ constructor(connectorParamsService, toasterService, guard, router, route, warehouseService) {
2215
+ this.connectorParamsService = connectorParamsService;
2216
+ this.toasterService = toasterService;
2217
+ this.guard = guard;
2218
+ this.router = router;
2219
+ this.route = route;
2220
+ this.warehouseService = warehouseService;
2221
+ this.erpOptions = [
2222
+ { value: 'MIKRO', label: 'Mikro ERP' },
2223
+ ];
2224
+ this.warehouses = [];
2225
+ this.binLocations = [];
2226
+ this.isLoadingBinLocations = false;
2227
+ this.form = {
2228
+ erpType: 'MIKRO',
2229
+ baseUrl: '',
2230
+ apiKey: '',
2231
+ username: '',
2232
+ password: '',
2233
+ isActive: true,
2234
+ fromWarehouseCode: '',
2235
+ targetWarehouseCode: '',
2236
+ dummyBoxCode: '',
2237
+ beeCellUsername: '',
2238
+ beeCellPassword: '',
2239
+ };
2240
+ this.passwordSet = false;
2241
+ this.beeCellPasswordSet = false;
2242
+ this.isLoading = false;
2243
+ this.isSaving = false;
2244
+ }
2245
+ ngOnInit() {
2246
+ const reason = this.route.snapshot.queryParamMap.get('reason');
2247
+ if (reason === 'no-config') {
2248
+ this.toasterService.warn('Connector parametreleri yapılandırılmamış.');
2249
+ }
2250
+ this.loadData();
2251
+ }
2252
+ // İki API'yi birlikte bekle: depo listesi hazır olmadan form render edilmez,
2253
+ // böylece ngModel option geçişi (race condition) yaşanmaz.
2254
+ loadData() {
2255
+ this.isLoading = true;
2256
+ forkJoin({
2257
+ params: this.connectorParamsService.getConnectorParams(),
2258
+ warehouses: this.warehouseService.getSmartWarehouses().pipe(catchError(() => of([]))),
2259
+ }).subscribe({
2260
+ next: ({ params, warehouses }) => {
2261
+ this.warehouses = warehouses;
2262
+ if (params) {
2263
+ this.form.erpType = params.erpType ?? 'MIKRO';
2264
+ this.form.baseUrl = params.baseUrl ?? '';
2265
+ this.form.apiKey = params.apiKey ?? '';
2266
+ this.form.username = params.username ?? '';
2267
+ this.form.isActive = params.isActive;
2268
+ this.form.password = '';
2269
+ this.form.fromWarehouseCode = params.fromWarehouseCode ?? '';
2270
+ this.form.targetWarehouseCode = params.targetWarehouseCode ?? '';
2271
+ this.form.dummyBoxCode = params.dummyBoxCode ?? '';
2272
+ this.form.beeCellUsername = params.beeCellUsername ?? '';
2273
+ this.form.beeCellPassword = '';
2274
+ this.passwordSet = params.passwordSet;
2275
+ this.beeCellPasswordSet = params.beeCellPasswordSet ?? false;
2276
+ }
2277
+ this.isLoading = false;
2278
+ // Kayıtlı kaynak depo varsa, Dummy Kasa combobox'ının o depoya ait depo yerleriyle dolması için yükle.
2279
+ if (this.form.fromWarehouseCode) {
2280
+ this.loadBinLocations(this.form.fromWarehouseCode);
2281
+ }
2282
+ },
2283
+ error: err => {
2284
+ this.toasterService.error(err?.error?.error?.message ?? 'Parametreler yüklenirken bir hata oluştu.');
2285
+ this.isLoading = false;
2286
+ },
2287
+ });
2288
+ }
2289
+ get isCurrentFromWhsInList() {
2290
+ return this.warehouses.some(w => w.WhsCode === this.form.fromWarehouseCode);
2291
+ }
2292
+ get isCurrentWhsInList() {
2293
+ return this.warehouses.some(w => w.WhsCode === this.form.targetWarehouseCode);
2294
+ }
2295
+ get isCurrentDummyBoxInList() {
2296
+ return this.binLocations.some(b => b.BinCode === this.form.dummyBoxCode);
2297
+ }
2298
+ /**
2299
+ * Kaynak Depo seçimi değiştiğinde çalışır: Dummy Kasa combobox'ını seçilen deponun
2300
+ * depo yerleriyle doldurur. Depo değiştiği için önceki depoya ait seçim artık geçerli değil.
2301
+ */
2302
+ onFromWarehouseChange(whsCode) {
2303
+ this.form.fromWarehouseCode = whsCode;
2304
+ this.form.dummyBoxCode = '';
2305
+ this.loadBinLocations(whsCode);
2306
+ }
2307
+ loadBinLocations(whsCode) {
2308
+ if (!whsCode) {
2309
+ this.binLocations = [];
2310
+ return;
2311
+ }
2312
+ this.isLoadingBinLocations = true;
2313
+ this.warehouseService.getBinLocationsByWarehouse(whsCode).subscribe({
2314
+ next: (bins) => {
2315
+ this.binLocations = bins || [];
2316
+ this.isLoadingBinLocations = false;
2317
+ },
2318
+ error: () => {
2319
+ this.binLocations = [];
2320
+ this.isLoadingBinLocations = false;
2321
+ },
2322
+ });
2323
+ }
2324
+ save() {
2325
+ if (!this.form.erpType) {
2326
+ this.toasterService.warn('ERP Sağlayıcısı zorunludur.');
2327
+ return;
2328
+ }
2329
+ if (!this.form.baseUrl?.trim()) {
2330
+ this.toasterService.warn('Base URL zorunludur.');
2331
+ return;
2332
+ }
2333
+ if (!this.form.apiKey?.trim()) {
2334
+ this.toasterService.warn('API Key zorunludur.');
2335
+ return;
2336
+ }
2337
+ if (!this.form.username?.trim()) {
2338
+ this.toasterService.warn('Kullanıcı Adı zorunludur.');
2339
+ return;
2340
+ }
2341
+ if (!this.passwordSet && !this.form.password?.trim()) {
2342
+ this.toasterService.warn('Şifre zorunludur.');
2343
+ return;
2344
+ }
2345
+ if (!this.form.beeCellUsername?.trim()) {
2346
+ this.toasterService.warn('BeeCell Kullanıcı Adı zorunludur.');
2347
+ return;
2348
+ }
2349
+ if (!this.beeCellPasswordSet && !this.form.beeCellPassword?.trim()) {
2350
+ this.toasterService.warn('BeeCell Şifresi zorunludur.');
2351
+ return;
2352
+ }
2353
+ this.isSaving = true;
2354
+ this.connectorParamsService.saveConnectorParams(this.form).subscribe({
2355
+ next: () => {
2356
+ this.toasterService.success('Parametreler başarıyla kaydedildi.');
2357
+ if (this.form.password) {
2358
+ this.passwordSet = true;
2359
+ this.form.password = '';
2360
+ }
2361
+ if (this.form.beeCellPassword) {
2362
+ this.beeCellPasswordSet = true;
2363
+ this.form.beeCellPassword = '';
2364
+ }
2365
+ // Guard cache'ini güncelle — diğer ekranlar artık erişilebilir
2366
+ this.guard.invalidate();
2367
+ this.isSaving = false;
2368
+ },
2369
+ error: err => {
2370
+ this.toasterService.error(err?.error?.error?.message ?? 'Kayıt sırasında bir hata oluştu.');
2371
+ this.isSaving = false;
2372
+ },
2373
+ });
2374
+ }
2375
+ }
2376
+ ConnectorParamsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsComponent, deps: [{ token: ConnectorParamsService }, { token: i2.ToasterService }, { token: ConnectorParamsGuard }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: WarehouseService }], target: i0.ɵɵFactoryTarget.Component });
2377
+ ConnectorParamsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConnectorParamsComponent, selector: "lib-connector-params", ngImport: i0, template: "<abp-page [title]=\"'Connector Parametreleri'\">\r\n <div class=\"connector-params-container\">\r\n\r\n <!-- Y\u00FCkleniyor -->\r\n <div class=\"text-center py-4\" *ngIf=\"isLoading\">\r\n <div class=\"spinner-border text-primary\" role=\"status\">\r\n <span class=\"visually-hidden\">Y\u00FCkleniyor...</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Form -->\r\n <div class=\"card connector-params-card\" [hidden]=\"isLoading\">\r\n <div class=\"card-body\">\r\n\r\n <!-- ERP Sa\u011Flay\u0131c\u0131s\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"erpTypeSelect\">ERP Sa\u011Flay\u0131c\u0131s\u0131 <span class=\"text-danger\">*</span></label>\r\n <select id=\"erpTypeSelect\" class=\"form-select\" [(ngModel)]=\"form.erpType\" required>\r\n <option *ngFor=\"let opt of erpOptions\" [value]=\"opt.value\">{{ opt.label }}</option>\r\n </select>\r\n </div>\r\n\r\n <!-- Base URL -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"baseUrlInput\">Base URL <span class=\"text-danger\">*</span></label>\r\n <input id=\"baseUrlInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.baseUrl\"\r\n placeholder=\"https://erp-server:38080\" required />\r\n </div>\r\n\r\n <!-- API Key -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"apiKeyInput\">API Key <span class=\"text-danger\">*</span></label>\r\n <input id=\"apiKeyInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.apiKey\"\r\n placeholder=\"API anahtar\u0131\" required />\r\n </div>\r\n\r\n <!-- Kullan\u0131c\u0131 Ad\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"usernameInput\">Kullan\u0131c\u0131 Ad\u0131 <span class=\"text-danger\">*</span></label>\r\n <input id=\"usernameInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.username\"\r\n placeholder=\"Kullan\u0131c\u0131 ad\u0131\" required />\r\n </div>\r\n\r\n <!-- \u015Eifre -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"passwordInput\">\r\n \u015Eifre <span class=\"text-danger\">*</span>\r\n <span class=\"badge bg-success ms-2\" *ngIf=\"passwordSet && !form.password\">Kay\u0131tl\u0131</span>\r\n </label>\r\n <input id=\"passwordInput\" type=\"password\" class=\"form-control\"\r\n [(ngModel)]=\"form.password\"\r\n [placeholder]=\"passwordSet ? 'De\u011Fi\u015Ftirmek i\u00E7in yeni \u015Fifre girin, bo\u015F b\u0131rak\u0131rsan\u0131z mevcut \u015Fifre korunur' : '\u015Eifre'\" />\r\n <small class=\"text-muted\" *ngIf=\"passwordSet\">Mevcut \u015Fifreyi korumak i\u00E7in bo\u015F b\u0131rak\u0131n.</small>\r\n </div>\r\n\r\n <!-- BeeCell Kullan\u0131c\u0131 Ad\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"beeCellUsernameInput\">BeeCell Kullan\u0131c\u0131 Ad\u0131 <span class=\"text-danger\">*</span></label>\r\n <input id=\"beeCellUsernameInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.beeCellUsername\"\r\n placeholder=\"BeeCell kullan\u0131c\u0131 ad\u0131\" required />\r\n <small class=\"text-muted\">BeeCell/Orchestrator API giri\u015Fi i\u00E7in kullan\u0131l\u0131r (ERP kullan\u0131c\u0131s\u0131ndan ayr\u0131d\u0131r).</small>\r\n </div>\r\n\r\n <!-- BeeCell \u015Eifre -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"beeCellPasswordInput\">\r\n BeeCell \u015Eifre <span class=\"text-danger\">*</span>\r\n <span class=\"badge bg-success ms-2\" *ngIf=\"beeCellPasswordSet && !form.beeCellPassword\">Kay\u0131tl\u0131</span>\r\n </label>\r\n <input id=\"beeCellPasswordInput\" type=\"password\" class=\"form-control\"\r\n [(ngModel)]=\"form.beeCellPassword\"\r\n [placeholder]=\"beeCellPasswordSet ? 'De\u011Fi\u015Ftirmek i\u00E7in yeni \u015Fifre girin, bo\u015F b\u0131rak\u0131rsan\u0131z mevcut \u015Fifre korunur' : 'BeeCell \u015Fifresi'\" />\r\n <small class=\"text-muted\" *ngIf=\"beeCellPasswordSet\">Mevcut \u015Fifreyi korumak i\u00E7in bo\u015F b\u0131rak\u0131n.</small>\r\n </div>\r\n\r\n <!-- Kaynak Depo -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"fromWhsSelect\">\r\n Kaynak Depo (Stok Transfer)\r\n </label>\r\n <select id=\"fromWhsSelect\" class=\"form-select\"\r\n [ngModel]=\"form.fromWarehouseCode\"\r\n (ngModelChange)=\"onFromWarehouseChange($event)\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.fromWarehouseCode && !isCurrentFromWhsInList\"\r\n [value]=\"form.fromWarehouseCode\">\r\n {{ form.fromWarehouseCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let whs of warehouses\" [value]=\"whs.WhsCode\">\r\n {{ whs.WhsCode }} \u2013 {{ whs.WhsName }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\">G\u00F6rev Ba\u015Flat'ta olu\u015Fturulan stok naklinin kaynak deposu.</small>\r\n </div>\r\n\r\n <!-- Hedef Depo -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"targetWhsSelect\">\r\n Hedef Depo (Stok Transfer) <span class=\"text-danger\">*</span>\r\n </label>\r\n <select id=\"targetWhsSelect\" class=\"form-select\" [(ngModel)]=\"form.targetWarehouseCode\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.targetWarehouseCode && !isCurrentWhsInList\"\r\n [value]=\"form.targetWarehouseCode\">\r\n {{ form.targetWarehouseCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let whs of warehouses\" [value]=\"whs.WhsCode\">\r\n {{ whs.WhsCode }} \u2013 {{ whs.WhsName }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\">G\u00F6rev Ba\u015Flat'ta olu\u015Fturulan stok naklinin hedef deposu.</small>\r\n </div>\r\n\r\n <!-- Dummy Kasa -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"dummyBoxSelect\">Dummy Kasa Kodu</label>\r\n <select id=\"dummyBoxSelect\" class=\"form-select\"\r\n [(ngModel)]=\"form.dummyBoxCode\"\r\n [disabled]=\"!form.fromWarehouseCode || isLoadingBinLocations\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.dummyBoxCode && !isCurrentDummyBoxInList\"\r\n [value]=\"form.dummyBoxCode\">\r\n {{ form.dummyBoxCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let bin of binLocations\" [value]=\"bin.BinCode\">\r\n {{ bin.BinCode }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\" *ngIf=\"!form.fromWarehouseCode\">\u00D6nce Kaynak Depo se\u00E7in.</small>\r\n <small class=\"text-muted\" *ngIf=\"isLoadingBinLocations\">Depo yerleri y\u00FCkleniyor...</small>\r\n <small class=\"text-muted\" *ngIf=\"form.fromWarehouseCode && !isLoadingBinLocations\">\r\n Kasa Miktar\u0131 G\u00FCncelleme'de fiili say\u0131m fark\u0131n\u0131n muhasebele\u015Ftirildi\u011Fi SAP bin kodu \u2014 se\u00E7ilen kaynak deponun depo yeri.\r\n </small>\r\n </div>\r\n\r\n <!-- Aktif -->\r\n <div class=\"mb-4 form-check\">\r\n <input id=\"isActiveCheck\" type=\"checkbox\" class=\"form-check-input\"\r\n [(ngModel)]=\"form.isActive\" />\r\n <label class=\"form-check-label\" for=\"isActiveCheck\">Aktif</label>\r\n </div>\r\n\r\n <!-- Kaydet Butonu -->\r\n <div class=\"d-flex gap-2\">\r\n <button class=\"btn btn-primary\" (click)=\"save()\" [disabled]=\"isSaving\">\r\n <span *ngIf=\"isSaving\" class=\"spinner-border spinner-border-sm me-1\" role=\"status\"></span>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</abp-page>\r\n", styles: [".connector-params-container{padding:1rem 0}.connector-params-container .connector-params-card{max-width:640px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }], encapsulation: i0.ViewEncapsulation.None });
2378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsComponent, decorators: [{
2379
+ type: Component,
2380
+ args: [{ selector: 'lib-connector-params', encapsulation: ViewEncapsulation.None, template: "<abp-page [title]=\"'Connector Parametreleri'\">\r\n <div class=\"connector-params-container\">\r\n\r\n <!-- Y\u00FCkleniyor -->\r\n <div class=\"text-center py-4\" *ngIf=\"isLoading\">\r\n <div class=\"spinner-border text-primary\" role=\"status\">\r\n <span class=\"visually-hidden\">Y\u00FCkleniyor...</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Form -->\r\n <div class=\"card connector-params-card\" [hidden]=\"isLoading\">\r\n <div class=\"card-body\">\r\n\r\n <!-- ERP Sa\u011Flay\u0131c\u0131s\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"erpTypeSelect\">ERP Sa\u011Flay\u0131c\u0131s\u0131 <span class=\"text-danger\">*</span></label>\r\n <select id=\"erpTypeSelect\" class=\"form-select\" [(ngModel)]=\"form.erpType\" required>\r\n <option *ngFor=\"let opt of erpOptions\" [value]=\"opt.value\">{{ opt.label }}</option>\r\n </select>\r\n </div>\r\n\r\n <!-- Base URL -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"baseUrlInput\">Base URL <span class=\"text-danger\">*</span></label>\r\n <input id=\"baseUrlInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.baseUrl\"\r\n placeholder=\"https://erp-server:38080\" required />\r\n </div>\r\n\r\n <!-- API Key -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"apiKeyInput\">API Key <span class=\"text-danger\">*</span></label>\r\n <input id=\"apiKeyInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.apiKey\"\r\n placeholder=\"API anahtar\u0131\" required />\r\n </div>\r\n\r\n <!-- Kullan\u0131c\u0131 Ad\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"usernameInput\">Kullan\u0131c\u0131 Ad\u0131 <span class=\"text-danger\">*</span></label>\r\n <input id=\"usernameInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.username\"\r\n placeholder=\"Kullan\u0131c\u0131 ad\u0131\" required />\r\n </div>\r\n\r\n <!-- \u015Eifre -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"passwordInput\">\r\n \u015Eifre <span class=\"text-danger\">*</span>\r\n <span class=\"badge bg-success ms-2\" *ngIf=\"passwordSet && !form.password\">Kay\u0131tl\u0131</span>\r\n </label>\r\n <input id=\"passwordInput\" type=\"password\" class=\"form-control\"\r\n [(ngModel)]=\"form.password\"\r\n [placeholder]=\"passwordSet ? 'De\u011Fi\u015Ftirmek i\u00E7in yeni \u015Fifre girin, bo\u015F b\u0131rak\u0131rsan\u0131z mevcut \u015Fifre korunur' : '\u015Eifre'\" />\r\n <small class=\"text-muted\" *ngIf=\"passwordSet\">Mevcut \u015Fifreyi korumak i\u00E7in bo\u015F b\u0131rak\u0131n.</small>\r\n </div>\r\n\r\n <!-- BeeCell Kullan\u0131c\u0131 Ad\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"beeCellUsernameInput\">BeeCell Kullan\u0131c\u0131 Ad\u0131 <span class=\"text-danger\">*</span></label>\r\n <input id=\"beeCellUsernameInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.beeCellUsername\"\r\n placeholder=\"BeeCell kullan\u0131c\u0131 ad\u0131\" required />\r\n <small class=\"text-muted\">BeeCell/Orchestrator API giri\u015Fi i\u00E7in kullan\u0131l\u0131r (ERP kullan\u0131c\u0131s\u0131ndan ayr\u0131d\u0131r).</small>\r\n </div>\r\n\r\n <!-- BeeCell \u015Eifre -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"beeCellPasswordInput\">\r\n BeeCell \u015Eifre <span class=\"text-danger\">*</span>\r\n <span class=\"badge bg-success ms-2\" *ngIf=\"beeCellPasswordSet && !form.beeCellPassword\">Kay\u0131tl\u0131</span>\r\n </label>\r\n <input id=\"beeCellPasswordInput\" type=\"password\" class=\"form-control\"\r\n [(ngModel)]=\"form.beeCellPassword\"\r\n [placeholder]=\"beeCellPasswordSet ? 'De\u011Fi\u015Ftirmek i\u00E7in yeni \u015Fifre girin, bo\u015F b\u0131rak\u0131rsan\u0131z mevcut \u015Fifre korunur' : 'BeeCell \u015Fifresi'\" />\r\n <small class=\"text-muted\" *ngIf=\"beeCellPasswordSet\">Mevcut \u015Fifreyi korumak i\u00E7in bo\u015F b\u0131rak\u0131n.</small>\r\n </div>\r\n\r\n <!-- Kaynak Depo -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"fromWhsSelect\">\r\n Kaynak Depo (Stok Transfer)\r\n </label>\r\n <select id=\"fromWhsSelect\" class=\"form-select\"\r\n [ngModel]=\"form.fromWarehouseCode\"\r\n (ngModelChange)=\"onFromWarehouseChange($event)\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.fromWarehouseCode && !isCurrentFromWhsInList\"\r\n [value]=\"form.fromWarehouseCode\">\r\n {{ form.fromWarehouseCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let whs of warehouses\" [value]=\"whs.WhsCode\">\r\n {{ whs.WhsCode }} \u2013 {{ whs.WhsName }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\">G\u00F6rev Ba\u015Flat'ta olu\u015Fturulan stok naklinin kaynak deposu.</small>\r\n </div>\r\n\r\n <!-- Hedef Depo -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"targetWhsSelect\">\r\n Hedef Depo (Stok Transfer) <span class=\"text-danger\">*</span>\r\n </label>\r\n <select id=\"targetWhsSelect\" class=\"form-select\" [(ngModel)]=\"form.targetWarehouseCode\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.targetWarehouseCode && !isCurrentWhsInList\"\r\n [value]=\"form.targetWarehouseCode\">\r\n {{ form.targetWarehouseCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let whs of warehouses\" [value]=\"whs.WhsCode\">\r\n {{ whs.WhsCode }} \u2013 {{ whs.WhsName }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\">G\u00F6rev Ba\u015Flat'ta olu\u015Fturulan stok naklinin hedef deposu.</small>\r\n </div>\r\n\r\n <!-- Dummy Kasa -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"dummyBoxSelect\">Dummy Kasa Kodu</label>\r\n <select id=\"dummyBoxSelect\" class=\"form-select\"\r\n [(ngModel)]=\"form.dummyBoxCode\"\r\n [disabled]=\"!form.fromWarehouseCode || isLoadingBinLocations\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.dummyBoxCode && !isCurrentDummyBoxInList\"\r\n [value]=\"form.dummyBoxCode\">\r\n {{ form.dummyBoxCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let bin of binLocations\" [value]=\"bin.BinCode\">\r\n {{ bin.BinCode }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\" *ngIf=\"!form.fromWarehouseCode\">\u00D6nce Kaynak Depo se\u00E7in.</small>\r\n <small class=\"text-muted\" *ngIf=\"isLoadingBinLocations\">Depo yerleri y\u00FCkleniyor...</small>\r\n <small class=\"text-muted\" *ngIf=\"form.fromWarehouseCode && !isLoadingBinLocations\">\r\n Kasa Miktar\u0131 G\u00FCncelleme'de fiili say\u0131m fark\u0131n\u0131n muhasebele\u015Ftirildi\u011Fi SAP bin kodu \u2014 se\u00E7ilen kaynak deponun depo yeri.\r\n </small>\r\n </div>\r\n\r\n <!-- Aktif -->\r\n <div class=\"mb-4 form-check\">\r\n <input id=\"isActiveCheck\" type=\"checkbox\" class=\"form-check-input\"\r\n [(ngModel)]=\"form.isActive\" />\r\n <label class=\"form-check-label\" for=\"isActiveCheck\">Aktif</label>\r\n </div>\r\n\r\n <!-- Kaydet Butonu -->\r\n <div class=\"d-flex gap-2\">\r\n <button class=\"btn btn-primary\" (click)=\"save()\" [disabled]=\"isSaving\">\r\n <span *ngIf=\"isSaving\" class=\"spinner-border spinner-border-sm me-1\" role=\"status\"></span>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</abp-page>\r\n", styles: [".connector-params-container{padding:1rem 0}.connector-params-container .connector-params-card{max-width:640px}\n"] }]
2381
+ }], ctorParameters: function () { return [{ type: ConnectorParamsService }, { type: i2.ToasterService }, { type: ConnectorParamsGuard }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: WarehouseService }]; } });
2382
+
2383
+ const routes$1 = [
2384
+ { path: '', component: ConnectorParamsComponent },
2385
+ ];
2386
+ class ConnectorParamsModule {
2387
+ }
2388
+ ConnectorParamsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2389
+ ConnectorParamsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsModule, declarations: [ConnectorParamsComponent], imports: [CoreModule,
2390
+ ThemeSharedModule,
2391
+ FormsModule,
2392
+ PageModule, i1$1.RouterModule] });
2393
+ ConnectorParamsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsModule, imports: [CoreModule,
2394
+ ThemeSharedModule,
2395
+ FormsModule,
2396
+ PageModule,
2397
+ RouterModule.forChild(routes$1)] });
2398
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsModule, decorators: [{
2399
+ type: NgModule,
2400
+ args: [{
2401
+ declarations: [ConnectorParamsComponent],
2402
+ imports: [
2403
+ CoreModule,
2404
+ ThemeSharedModule,
2405
+ FormsModule,
2406
+ PageModule,
2407
+ RouterModule.forChild(routes$1),
2408
+ ],
2409
+ }]
2410
+ }] });
2411
+ function loadConnectorParamsModuleAsChild() {
2412
+ return Promise.resolve(ConnectorParamsModule);
2413
+ }
2414
+
2415
+ const routes = [
2416
+ {
2417
+ path: '',
2418
+ pathMatch: 'full',
2419
+ component: SmartWarehouseComponent,
2420
+ },
2421
+ {
2422
+ path: 'orders',
2423
+ loadChildren: loadOrdersModuleAsChild,
2424
+ canActivate: [ConnectorParamsGuard],
2425
+ },
2426
+ {
2427
+ path: 'shelf-placement',
2428
+ loadChildren: loadShelfPlacementModuleAsChild,
2429
+ canActivate: [ConnectorParamsGuard],
2430
+ },
2431
+ {
2432
+ path: 'shelf-transfer',
2433
+ loadChildren: loadShelfTransferModuleAsChild,
2434
+ canActivate: [ConnectorParamsGuard],
2435
+ },
2436
+ {
2437
+ path: 'order-station',
2438
+ loadChildren: loadOrderStationModuleAsChild,
2439
+ canActivate: [ConnectorParamsGuard],
2440
+ },
2441
+ {
2442
+ path: 'stock-report',
2443
+ loadChildren: loadStockReportModuleAsChild,
2444
+ canActivate: [ConnectorParamsGuard],
2445
+ },
2446
+ {
2447
+ path: 'shortages',
2448
+ loadChildren: loadShortagesModuleAsChild,
2449
+ canActivate: [ConnectorParamsGuard],
2450
+ },
2451
+ {
2452
+ path: 'station',
2453
+ loadChildren: loadStationModuleAsChild,
2454
+ canActivate: [ConnectorParamsGuard],
2455
+ },
2456
+ {
2457
+ path: 'quantity-correction',
2458
+ loadChildren: loadQuantityCorrectionModuleAsChild,
2459
+ canActivate: [ConnectorParamsGuard],
2460
+ },
2461
+ {
2462
+ path: 'connector-params',
2463
+ loadChildren: loadConnectorParamsModuleAsChild,
2464
+ },
2465
+ ];
2466
+ class SmartWarehouseRoutingModule {
2467
+ }
2468
+ SmartWarehouseRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2469
+ SmartWarehouseRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] });
2470
+ SmartWarehouseRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
2471
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseRoutingModule, decorators: [{
2472
+ type: NgModule,
2473
+ args: [{
2474
+ imports: [RouterModule.forChild(routes)],
2475
+ exports: [RouterModule],
2476
+ }]
2477
+ }] });
2478
+
2479
+ // DevExtreme bileşenlerinin (grid filtre satırı, tarih seçiciler, sayı formatları vb.)
2480
+ // varsayılan tarih/sayı formatını Türkçe'ye çevirir — tekil sütun `format`'ları bunun
2481
+ // üzerine gelir, ama açıkça formatlanmamış her yer de bu sayede tr formatında görünür.
2482
+ locale('tr');
2483
+ class SmartWarehouseModule {
2484
+ static forChild() {
2485
+ return {
2486
+ ngModule: SmartWarehouseModule,
2487
+ providers: [],
2488
+ };
2489
+ }
2490
+ static forLazy() {
2491
+ return new LazyModuleFactory(SmartWarehouseModule.forChild());
2492
+ }
2493
+ }
2494
+ SmartWarehouseModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2495
+ SmartWarehouseModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseModule, declarations: [SmartWarehouseComponent], imports: [CoreModule, ThemeSharedModule, SmartWarehouseRoutingModule], exports: [SmartWarehouseComponent] });
2496
+ SmartWarehouseModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseModule, imports: [CoreModule, ThemeSharedModule, SmartWarehouseRoutingModule] });
2497
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseModule, decorators: [{
2498
+ type: NgModule,
2499
+ args: [{
2500
+ declarations: [SmartWarehouseComponent],
2501
+ imports: [CoreModule, ThemeSharedModule, SmartWarehouseRoutingModule],
2502
+ exports: [SmartWarehouseComponent],
2503
+ }]
2504
+ }] });
2505
+
2506
+ /*
2507
+ * Public API Surface of smart-warehouse
2508
+ */
2509
+
2510
+ /**
2511
+ * Generated bundle index. Do not edit.
2512
+ */
2513
+
2514
+ export { ConnectorParamsComponent, ConnectorParamsModule, ConnectorParamsService, OrderService, OrderStationComponent, OrderStationModule, OrderStationService, OrdersComponent, OrdersModule, ShelfPlacementComponent, ShelfPlacementModule, SmartWarehouseComponent, SmartWarehouseModule, SmartWarehouseService, WarehouseService, loadConnectorParamsModuleAsChild, loadOrderStationModuleAsChild, loadOrdersModuleAsChild, loadShelfPlacementModuleAsChild };
2515
+ //# sourceMappingURL=hitsoft-smart-warehouse.mjs.map