gunsmith-common 2.2.2 → 2.2.4

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.
@@ -194,6 +194,7 @@ var WorkOrderStatus;
194
194
  WorkOrderStatus[WorkOrderStatus["InShop"] = 0] = "InShop";
195
195
  WorkOrderStatus[WorkOrderStatus["OnBench"] = 1] = "OnBench";
196
196
  WorkOrderStatus[WorkOrderStatus["OutOfShop"] = 2] = "OutOfShop";
197
+ WorkOrderStatus[WorkOrderStatus["MillingInProgress"] = 13] = "MillingInProgress";
197
198
  WorkOrderStatus[WorkOrderStatus["WaitingOnCustomer"] = 3] = "WaitingOnCustomer";
198
199
  WorkOrderStatus[WorkOrderStatus["CustomerNotified"] = 4] = "CustomerNotified";
199
200
  WorkOrderStatus[WorkOrderStatus["ShippingPostponed"] = 10] = "ShippingPostponed";
@@ -342,12 +343,6 @@ class MillingType {
342
343
  }
343
344
  }
344
345
 
345
- class CosmeticMilling {
346
- constructor() {
347
- this.active = true;
348
- }
349
- }
350
-
351
346
  class MillingItem {
352
347
  }
353
348
 
@@ -457,6 +452,9 @@ class WorkOrderInventoryItem {
457
452
  class RefinishCode {
458
453
  }
459
454
 
455
+ class WorkOrderListItem {
456
+ }
457
+
460
458
  function adjustHoliday(finishDate, holidays) {
461
459
  while (holidays.map(h => new Date(h.holiday)).findIndex(h => DateTime.fromJSDate(h) === DateTime.fromJSDate(finishDate)) !== -1) {
462
460
  do {
@@ -764,6 +762,16 @@ class WorkOrderService {
764
762
  return this.http.get(`${this.url}/${id}/actions/${actionId}`);
765
763
  }
766
764
  readWorkOrders(statuses = null, id = null, customerName = null, customerEmail = null, serialNumber = null, orderTypes = null, projectTypes = null, users = null, specialOrder = null) {
765
+ return this.http.get(this.url, {
766
+ params: this.createWorkOrderParams(statuses, id, customerName, customerEmail, serialNumber, orderTypes, projectTypes, users, specialOrder)
767
+ });
768
+ }
769
+ readExportWorkOrders(statuses = null, id = null, customerName = null, customerEmail = null, serialNumber = null, orderTypes = null, projectTypes = null, users = null, specialOrder = null) {
770
+ return this.http.get(`${this.url}/export`, {
771
+ params: this.createWorkOrderParams(statuses, id, customerName, customerEmail, serialNumber, orderTypes, projectTypes, users, specialOrder)
772
+ });
773
+ }
774
+ createWorkOrderParams(statuses = null, id = null, customerName = null, customerEmail = null, serialNumber = null, orderTypes = null, projectTypes = null, users = null, specialOrder = null) {
767
775
  const params = {};
768
776
  if (statuses) {
769
777
  params['statuses'] = statuses.map(status => status.toString());
@@ -792,9 +800,7 @@ class WorkOrderService {
792
800
  if (specialOrder) {
793
801
  params['specialOrder'] = specialOrder.toString();
794
802
  }
795
- return this.http.get(this.url, {
796
- params: params
797
- });
803
+ return params;
798
804
  }
799
805
  readWorkOrder(workOrderId) {
800
806
  return this.http.get(`${this.url}/${workOrderId}`);
@@ -1271,6 +1277,15 @@ class MillingTypeService {
1271
1277
  params: params
1272
1278
  });
1273
1279
  }
1280
+ readCosmeticMillings(includeInactive = false) {
1281
+ const params = {};
1282
+ if (includeInactive) {
1283
+ params['includeInactive'] = includeInactive.toString();
1284
+ }
1285
+ return this.http.get(`${this.url}/cosmetics`, {
1286
+ params: params
1287
+ });
1288
+ }
1274
1289
  readMillingType(id) {
1275
1290
  return this.http.get(`${this.url}/${id}`);
1276
1291
  }
@@ -1296,44 +1311,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1296
1311
  args: ['env']
1297
1312
  }] }]; } });
1298
1313
 
1299
- class CosmeticMillingService {
1300
- constructor(http, env) {
1301
- this.http = http;
1302
- this.env = env;
1303
- this.url = this.env.baseUrl + 'api/cosmetic-millings';
1304
- }
1305
- readCosmeticMillings(includeInactive = false) {
1306
- return this.http.get(this.url, {
1307
- params: {
1308
- includeInactive: includeInactive.toString()
1309
- }
1310
- });
1311
- }
1312
- readCosmeticMilling(id) {
1313
- return this.http.get(`${this.url}/${id}`);
1314
- }
1315
- createCosmeticMilling(cosmeticMilling) {
1316
- return this.http.post(this.url, cosmeticMilling);
1317
- }
1318
- updateCosmeticMilling(id, cosmeticMilling) {
1319
- return this.http.put(`${this.url}/${id}`, cosmeticMilling);
1320
- }
1321
- deleteCosmeticMilling(id) {
1322
- return this.http.delete(`${this.url}/${id}`);
1323
- }
1324
- }
1325
- CosmeticMillingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CosmeticMillingService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
1326
- CosmeticMillingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CosmeticMillingService, providedIn: 'root' });
1327
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CosmeticMillingService, decorators: [{
1328
- type: Injectable,
1329
- args: [{
1330
- providedIn: 'root'
1331
- }]
1332
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1333
- type: Inject,
1334
- args: ['env']
1335
- }] }]; } });
1336
-
1337
1314
  class CoatingService {
1338
1315
  constructor(http, env) {
1339
1316
  this.http = http;
@@ -1862,7 +1839,8 @@ class PackageSelectorComponent {
1862
1839
  this.createForm();
1863
1840
  }
1864
1841
  ngOnChanges(changes) {
1865
- if (changes.firearmId.currentValue) {
1842
+ if ((changes.firearmId?.currentValue && this.projectType === ProjectType.Firearm) ||
1843
+ (changes.projectType?.currentValue === ProjectType.Firearm && this.firearmId)) {
1866
1844
  this.getPackages();
1867
1845
  this.packageForm.reset();
1868
1846
  }
@@ -1977,7 +1955,7 @@ class PackageSelectorComponent {
1977
1955
  }
1978
1956
  }
1979
1957
  PackageSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, deps: [{ token: PackageService }, { token: i2.FormBuilder }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1980
- PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PackageSelectorComponent, selector: "cgw-package-selector", inputs: { firearmId: "firearmId" }, providers: [
1958
+ PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PackageSelectorComponent, selector: "cgw-package-selector", inputs: { firearmId: "firearmId", projectType: "projectType" }, providers: [
1981
1959
  {
1982
1960
  provide: NG_VALUE_ACCESSOR,
1983
1961
  multi: true,
@@ -2005,6 +1983,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2005
1983
  ], template: "<div [formGroup]=\"packageForm\">\r\n <div class=\"row mb-2\">\r\n <div class=\"col\">\r\n <label for=\"waitlist-gun-package\">Package - <span class=\"fst-italic fs-7\">Select a model to list available packages</span></label>\r\n <kendo-dropdownlist [data]=\"packages\"\r\n [defaultItem]=\"{name: 'No Package', id: null}\"\r\n id=\"waitlist-gun-package\"\r\n formControlName=\"package\"\r\n textField=\"name\"\r\n valueField=\"id\"\r\n size=\"small\"></kendo-dropdownlist>\r\n </div>\r\n </div>\r\n <div formArrayName=\"variations\" *ngFor=\"let variationControl of variations.controls; let i = index\">\r\n <div class=\"row mb-2\">\r\n <div class=\"col\">\r\n <label [for]=\"'waitlist-gun-package-variation-' + i\">{{packageVariations[i]?.name}}</label>\r\n <kendo-dropdownlist [data]=\"packageVariations[i]?.options\"\r\n [id]=\"'waitlist-gun-package-variation-' + i\"\r\n textField=\"optionName\"\r\n [formControl]=\"variationControl\"\r\n valueField=\"id\"\r\n size=\"small\"></kendo-dropdownlist>\r\n </div>\r\n </div>\r\n <div *ngIf=\"variationControl.invalid && (variationControl.dirty || variationControl.touched)\" class=\"error-container text-danger\">\r\n <div *ngIf=\"variationControl.errors.required\">\r\n {{packageVariations[i]?.name}} is required.\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mb-2\" *ngIf=\"packageOptionalItems?.length\">\r\n <div class=\"col\">\r\n <label for=\"waitlist-gun-package-addons\">Add-ons (Additional charges will apply)</label>\r\n <kendo-multiselect id=\"waitlist-gun-package-addons\"\r\n [data]=\"packageOptionalItems\"\r\n formControlName=\"optionalItems\"\r\n textField=\"name\"\r\n valueField=\"inventoryItemId\"\r\n size=\"small\"></kendo-multiselect>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""] }]
2006
1984
  }], ctorParameters: function () { return [{ type: PackageService }, { type: i2.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { firearmId: [{
2007
1985
  type: Input
1986
+ }], projectType: [{
1987
+ type: Input
2008
1988
  }] } });
2009
1989
 
2010
1990
  class SharedModule {
@@ -2162,5 +2142,5 @@ var NotificationType;
2162
2142
  * Generated bundle index. Do not edit.
2163
2143
  */
2164
2144
 
2165
- export { BundleItem, ChangeOrderStatus, Coating, CoatingService, CoatingValue, Configuration, ConfigurationService, CosmeticMilling, CosmeticMillingService, Customer, CustomerService, Dealer, DealerContact, DealerCoupon, DealerService, DisableControlDirective, EnumPipe, FileNamePipe, FileUploadService, FilterOptions, Firearm, FirearmSeries, FirearmSeriesOptic, FirearmSeriesService, FirearmService, FrameMaterial, FrameMaterialPipe, GunCaliber, GunPart, GunPartOption, GunPartService, InventoryItem, InventoryService, JFile, Material, MaterialService, MillingDetail, MillingItem, MillingType, MillingTypeService, MountType, NewLinePipe, NotificationBarComponent, NotificationModule, NotificationService, NotificationType, Optic, OpticService, OpticStatus, Package, PackageItem, PackageOptionalItem, PackageSelectorComponent, PackageService, PackageTotal, PackageVariation, PackageVariationOption, PhonePipe, Product, ProductService, ProjectType, PurchaseOrder, PurchaseOrderRefinishItem, PurchaseOrderService, PurchaseOrderStatus, RearSightPosition, RefinishCode, RefinishCodeService, RefinishDetail, ReportMillingItem, ReportRefinishItem, SharedModule, ShieldRMSOptions, SightType, State, StateService, StatusHistoryService, Total, TotalItem, TotalsService, UserService, Vendor, VendorContact, VendorService, WaitlistAction, WaitlistCustomerService, WaitlistGun, WaitlistGunPackageDetail, WaitlistHistory, WaitlistItem, WaitlistProjectService, WaitlistService, WaitlistStatus, WorkChangeOrder, WorkHoliday, WorkHolidayService, WorkOrder, WorkOrderAction, WorkOrderHistory, WorkOrderInventoryItem, WorkOrderPackageDetail, WorkOrderRefinishItem, WorkOrderService, WorkOrderStatus, WorkOrderType, calculateFinishDate, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
2145
+ export { BundleItem, ChangeOrderStatus, Coating, CoatingService, CoatingValue, Configuration, ConfigurationService, Customer, CustomerService, Dealer, DealerContact, DealerCoupon, DealerService, DisableControlDirective, EnumPipe, FileNamePipe, FileUploadService, FilterOptions, Firearm, FirearmSeries, FirearmSeriesOptic, FirearmSeriesService, FirearmService, FrameMaterial, FrameMaterialPipe, GunCaliber, GunPart, GunPartOption, GunPartService, InventoryItem, InventoryService, JFile, Material, MaterialService, MillingDetail, MillingItem, MillingType, MillingTypeService, MountType, NewLinePipe, NotificationBarComponent, NotificationModule, NotificationService, NotificationType, Optic, OpticService, OpticStatus, Package, PackageItem, PackageOptionalItem, PackageSelectorComponent, PackageService, PackageTotal, PackageVariation, PackageVariationOption, PhonePipe, Product, ProductService, ProjectType, PurchaseOrder, PurchaseOrderRefinishItem, PurchaseOrderService, PurchaseOrderStatus, RearSightPosition, RefinishCode, RefinishCodeService, RefinishDetail, ReportMillingItem, ReportRefinishItem, SharedModule, ShieldRMSOptions, SightType, State, StateService, StatusHistoryService, Total, TotalItem, TotalsService, UserService, Vendor, VendorContact, VendorService, WaitlistAction, WaitlistCustomerService, WaitlistGun, WaitlistGunPackageDetail, WaitlistHistory, WaitlistItem, WaitlistProjectService, WaitlistService, WaitlistStatus, WorkChangeOrder, WorkHoliday, WorkHolidayService, WorkOrder, WorkOrderAction, WorkOrderHistory, WorkOrderInventoryItem, WorkOrderListItem, WorkOrderPackageDetail, WorkOrderRefinishItem, WorkOrderService, WorkOrderStatus, WorkOrderType, calculateFinishDate, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
2166
2146
  //# sourceMappingURL=gunsmith-common.mjs.map