gunsmith-common 2.1.31 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/notification/notification-bar/notification-bar.component.mjs +3 -3
- package/esm2020/public_api.mjs +2 -1
- package/esm2020/shared/controls/package-selector/package-selector.component.mjs +168 -0
- package/esm2020/shared/services/index.mjs +3 -1
- package/esm2020/shared/services/inventory.service.mjs +4 -1
- package/esm2020/shared/services/package.service.mjs +47 -0
- package/esm2020/shared/services/refinish-code.service.mjs +35 -0
- package/esm2020/shared/services/waitlist.service.mjs +4 -1
- package/esm2020/shared/services/work-order.service.mjs +35 -1
- package/esm2020/shared/shared.module.mjs +28 -7
- package/esm2020/shared/types/index.mjs +11 -1
- package/esm2020/shared/types/package-item.mjs +3 -0
- package/esm2020/shared/types/package-optional-item.mjs +3 -0
- package/esm2020/shared/types/package-total.mjs +3 -0
- package/esm2020/shared/types/package-variation-option.mjs +3 -0
- package/esm2020/shared/types/package-variation.mjs +6 -0
- package/esm2020/shared/types/package.mjs +10 -0
- package/esm2020/shared/types/refinish-code.mjs +3 -0
- package/esm2020/shared/types/waitlist-gun-package-detail.mjs +7 -0
- package/esm2020/shared/types/waitlist-gun.mjs +1 -1
- package/esm2020/shared/types/work-order-inventory-item.mjs +3 -0
- package/esm2020/shared/types/work-order-package-detail.mjs +7 -0
- package/esm2020/shared/types/work-order.mjs +1 -1
- package/fesm2015/gunsmith-common.mjs +361 -14
- package/fesm2015/gunsmith-common.mjs.map +1 -1
- package/fesm2020/gunsmith-common.mjs +356 -14
- package/fesm2020/gunsmith-common.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/shared/controls/package-selector/package-selector.component.d.ts +38 -0
- package/shared/services/index.d.ts +2 -0
- package/shared/services/inventory.service.d.ts +1 -0
- package/shared/services/package.service.d.ts +16 -0
- package/shared/services/refinish-code.service.d.ts +16 -0
- package/shared/services/waitlist.service.d.ts +2 -1
- package/shared/services/work-order.service.d.ts +10 -1
- package/shared/shared.module.d.ts +5 -1
- package/shared/types/index.d.ts +10 -0
- package/shared/types/package-item.d.ts +9 -0
- package/shared/types/package-optional-item.d.ts +6 -0
- package/shared/types/package-total.d.ts +5 -0
- package/shared/types/package-variation-option.d.ts +10 -0
- package/shared/types/package-variation.d.ts +8 -0
- package/shared/types/package.d.ts +14 -0
- package/shared/types/refinish-code.d.ts +8 -0
- package/shared/types/waitlist-gun-package-detail.d.ts +10 -0
- package/shared/types/waitlist-gun.d.ts +2 -0
- package/shared/types/work-order-inventory-item.d.ts +7 -0
- package/shared/types/work-order-package-detail.d.ts +10 -0
- package/shared/types/work-order.d.ts +2 -0
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './shared/types';
|
|
|
3
3
|
export * from './shared/services';
|
|
4
4
|
export * from './shared/pipes';
|
|
5
5
|
export * from './shared/directives';
|
|
6
|
+
export * from './shared/controls/package-selector/package-selector.component';
|
|
6
7
|
export * from './shared/shared.module';
|
|
7
8
|
export * from './notification/notification.module';
|
|
8
9
|
export * from './notification';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AfterViewInit, Injector, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, FormArray, FormBuilder, FormGroup, ValidationErrors, Validator } from '@angular/forms';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
import { PackageService } from '../../services';
|
|
5
|
+
import { Package, PackageVariation, PackageOptionalItem, WaitlistGunPackageDetail, WorkOrderPackageDetail } from '../../types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class PackageSelectorComponent implements ControlValueAccessor, Validator, OnChanges, OnDestroy, AfterViewInit {
|
|
8
|
+
private packageService;
|
|
9
|
+
private fb;
|
|
10
|
+
private inj;
|
|
11
|
+
firearmId: number;
|
|
12
|
+
packages: Package[];
|
|
13
|
+
packageVariations: PackageVariation[];
|
|
14
|
+
packageOptionalItems: PackageOptionalItem[];
|
|
15
|
+
packageDetail: WaitlistGunPackageDetail | WorkOrderPackageDetail;
|
|
16
|
+
packageForm: FormGroup;
|
|
17
|
+
onChangeSubs: Subscription[];
|
|
18
|
+
onTouched: () => void;
|
|
19
|
+
touched: boolean;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
constructor(packageService: PackageService, fb: FormBuilder, inj: Injector);
|
|
22
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
23
|
+
ngAfterViewInit(): void;
|
|
24
|
+
ngOnDestroy(): void;
|
|
25
|
+
getPackages(): void;
|
|
26
|
+
createForm(): void;
|
|
27
|
+
get variations(): FormArray;
|
|
28
|
+
setPackageOptions(packagez: Package): void;
|
|
29
|
+
setValue(packageDetail: WaitlistGunPackageDetail | WorkOrderPackageDetail): void;
|
|
30
|
+
validate(control: AbstractControl): ValidationErrors;
|
|
31
|
+
addControlErrors(allErrors: any, controlName: string): any;
|
|
32
|
+
writeValue(packageDetail: WaitlistGunPackageDetail | WorkOrderPackageDetail): void;
|
|
33
|
+
registerOnChange(onChange: any): void;
|
|
34
|
+
registerOnTouched(onTouched: any): void;
|
|
35
|
+
setDisabledState(isDisabled: boolean): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PackageSelectorComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PackageSelectorComponent, "cgw-package-selector", never, { "firearmId": "firearmId"; }, {}, never, never>;
|
|
38
|
+
}
|
|
@@ -9,6 +9,7 @@ export declare class InventoryService {
|
|
|
9
9
|
constructor(http: HttpClient, env: any);
|
|
10
10
|
readInventoryItems(includeInactive?: boolean, search?: string): Observable<InventoryItem[]>;
|
|
11
11
|
updateInventoryItem(id: number, item: InventoryItem): Observable<InventoryItem>;
|
|
12
|
+
createInventoryItem(item: InventoryItem): Observable<InventoryItem>;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<InventoryService, never>;
|
|
13
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<InventoryService>;
|
|
14
15
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Package } from '../types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class PackageService {
|
|
6
|
+
private http;
|
|
7
|
+
private env;
|
|
8
|
+
private url;
|
|
9
|
+
constructor(http: HttpClient, env: any);
|
|
10
|
+
readPackages(includeInactive?: boolean, sku?: string, name?: string): Observable<Package[]>;
|
|
11
|
+
readPackage(id: number): Observable<Package>;
|
|
12
|
+
readPackagesByFirearm(firearmId: number): Observable<Package[]>;
|
|
13
|
+
savePackage(packagez: Package): Observable<Package>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PackageService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PackageService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpClient } from "@angular/common/http";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { RefinishCode } from "../types";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class RefinishCodeService {
|
|
6
|
+
private http;
|
|
7
|
+
private env;
|
|
8
|
+
private url;
|
|
9
|
+
constructor(http: HttpClient, env: any);
|
|
10
|
+
readRefinishCodes(): Observable<RefinishCode[]>;
|
|
11
|
+
createRefinishCodes(refinishCodes: RefinishCode[]): Observable<RefinishCode[]>;
|
|
12
|
+
updateRefinishCodes(ids: number[], refinishCodes: RefinishCode[]): Observable<RefinishCode[]>;
|
|
13
|
+
deleteRefinishCodes(ids: number[]): Observable<any>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RefinishCodeService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RefinishCodeService>;
|
|
16
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { ProjectType, WaitlistGun, WaitlistItem, WaitlistStatus, WorkOrderType } from '../types';
|
|
3
|
+
import { PackageTotal, ProjectType, WaitlistGun, WaitlistItem, WaitlistStatus, WorkOrderType } from '../types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class WaitlistService {
|
|
6
6
|
private http;
|
|
@@ -19,6 +19,7 @@ export declare class WaitlistService {
|
|
|
19
19
|
createProject(waitlistId: number, project: WaitlistGun): Observable<WaitlistGun>;
|
|
20
20
|
updateProject(waitlistId: number, projectId: number, project: WaitlistGun): Observable<WaitlistGun>;
|
|
21
21
|
deleteProject(waitlistId: number, projectId: number): Observable<void>;
|
|
22
|
+
readPackageDetailTotals(): Observable<PackageTotal[]>;
|
|
22
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<WaitlistService, never>;
|
|
23
24
|
static ɵprov: i0.ɵɵInjectableDeclaration<WaitlistService>;
|
|
24
25
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { WorkOrderStatus } from '../types/work-order-status';
|
|
4
|
-
import { WorkOrder, WorkOrderType, WorkChangeOrder, ReportMillingItem, ProjectType, ReportRefinishItem, WorkOrderRefinishItem, MillingItem } from '../types';
|
|
4
|
+
import { WorkOrder, WorkOrderType, WorkChangeOrder, ReportMillingItem, ProjectType, ReportRefinishItem, WorkOrderRefinishItem, MillingItem, PackageTotal, WorkOrderInventoryItem } from '../types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class WorkOrderService {
|
|
7
7
|
private http;
|
|
@@ -23,6 +23,7 @@ export declare class WorkOrderService {
|
|
|
23
23
|
confirmChangeOrder(token: string): Observable<void>;
|
|
24
24
|
cancelChangeOrder(token: string): Observable<any>;
|
|
25
25
|
createChecklists(workOrderId: number, refinishItemIds: number[]): Observable<Blob>;
|
|
26
|
+
createShopChecklist(workOrderId: number): Observable<Blob>;
|
|
26
27
|
readRefinishItems(workOrderId: number): Observable<WorkOrderRefinishItem[]>;
|
|
27
28
|
readRefinishItemCollection(workOrderId: number, itemIds: number[]): Observable<WorkOrderRefinishItem[]>;
|
|
28
29
|
readRefinishItem(workOrderId: number, refinishItemId: number): Observable<WorkOrderRefinishItem>;
|
|
@@ -37,6 +38,14 @@ export declare class WorkOrderService {
|
|
|
37
38
|
deleteMillingItem(workOrderId: number, millingItemId: number): Observable<any>;
|
|
38
39
|
readReportMillingItems(): Observable<ReportMillingItem[]>;
|
|
39
40
|
readReportRefinishItems(): Observable<ReportRefinishItem[]>;
|
|
41
|
+
readPackageDetailTotals(startDate: Date, endDate: Date, statuses: WorkOrderStatus[]): Observable<PackageTotal[]>;
|
|
42
|
+
readInventoryItems(workOrderId: number): Observable<WorkOrderInventoryItem[]>;
|
|
43
|
+
readInventoryItem(workOrderId: number, inventoryItemId: number): Observable<WorkOrderInventoryItem>;
|
|
44
|
+
createInventoryItem(workOrderId: number, inventoryItem: WorkOrderInventoryItem): Observable<WorkOrderInventoryItem>;
|
|
45
|
+
updateInventoryItem(workOrderId: number, inventoryItemId: number, inventoryItem: WorkOrderInventoryItem): Observable<WorkOrderInventoryItem>;
|
|
46
|
+
deleteInventoryItem(workOrderId: number, inventoryItemId: number): Observable<any>;
|
|
47
|
+
readInventoryItemCollection(workOrderId: number, itemIds: number[]): Observable<WorkOrderInventoryItem[]>;
|
|
48
|
+
createInventoryItems(workOrderId: number, inventoryItems: WorkOrderInventoryItem[]): Observable<WorkOrderInventoryItem[]>;
|
|
40
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<WorkOrderService, never>;
|
|
41
50
|
static ɵprov: i0.ɵɵInjectableDeclaration<WorkOrderService>;
|
|
42
51
|
}
|
|
@@ -5,8 +5,12 @@ import * as i3 from "./pipes/enum.pipe";
|
|
|
5
5
|
import * as i4 from "./directives/disable-control.directive";
|
|
6
6
|
import * as i5 from "./pipes/new-line.pipe";
|
|
7
7
|
import * as i6 from "./pipes/frame-material.pipe";
|
|
8
|
+
import * as i7 from "./controls/package-selector/package-selector.component";
|
|
9
|
+
import * as i8 from "@angular/common";
|
|
10
|
+
import * as i9 from "@progress/kendo-angular-dropdowns";
|
|
11
|
+
import * as i10 from "@angular/forms";
|
|
8
12
|
export declare class SharedModule {
|
|
9
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, [typeof i1.PhonePipe, typeof i2.FileNamePipe, typeof i3.EnumPipe, typeof i4.DisableControlDirective, typeof i5.NewLinePipe, typeof i6.FrameMaterialPipe],
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, [typeof i1.PhonePipe, typeof i2.FileNamePipe, typeof i3.EnumPipe, typeof i4.DisableControlDirective, typeof i5.NewLinePipe, typeof i6.FrameMaterialPipe, typeof i7.PackageSelectorComponent], [typeof i8.CommonModule, typeof i9.DropDownsModule, typeof i10.FormsModule, typeof i10.ReactiveFormsModule], [typeof i1.PhonePipe, typeof i2.FileNamePipe, typeof i3.EnumPipe, typeof i5.NewLinePipe, typeof i4.DisableControlDirective, typeof i6.FrameMaterialPipe, typeof i7.PackageSelectorComponent]>;
|
|
11
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<SharedModule>;
|
|
12
16
|
}
|
package/shared/types/index.d.ts
CHANGED
|
@@ -55,3 +55,13 @@ export * from './inventory-item';
|
|
|
55
55
|
export * from './j-file';
|
|
56
56
|
export * from './gun-part-option';
|
|
57
57
|
export * from './shield-rms-options';
|
|
58
|
+
export * from './package-item';
|
|
59
|
+
export * from './package';
|
|
60
|
+
export * from './package-optional-item';
|
|
61
|
+
export * from './package-variation';
|
|
62
|
+
export * from './package-variation-option';
|
|
63
|
+
export * from './waitlist-gun-package-detail';
|
|
64
|
+
export * from './work-order-package-detail';
|
|
65
|
+
export * from './package-total';
|
|
66
|
+
export * from './work-order-inventory-item';
|
|
67
|
+
export * from './refinish-code';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PackageItem, PackageOptionalItem, PackageVariation } from ".";
|
|
2
|
+
import { Firearm } from "./firearm";
|
|
3
|
+
export declare class Package {
|
|
4
|
+
id: number;
|
|
5
|
+
code: string;
|
|
6
|
+
sku: string;
|
|
7
|
+
name: string;
|
|
8
|
+
active: boolean;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
firearms: Firearm[];
|
|
11
|
+
items: PackageItem[];
|
|
12
|
+
optionalItems: PackageOptionalItem[];
|
|
13
|
+
variations: PackageVariation[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Package } from "./package";
|
|
2
|
+
import { PackageOptionalItem } from "./package-optional-item";
|
|
3
|
+
import { PackageVariationOption } from "./package-variation-option";
|
|
4
|
+
export declare class WaitlistGunPackageDetail {
|
|
5
|
+
id: number;
|
|
6
|
+
package: Package;
|
|
7
|
+
optionalItems: PackageOptionalItem[];
|
|
8
|
+
variations: PackageVariationOption[];
|
|
9
|
+
timestamp: string;
|
|
10
|
+
}
|
|
@@ -3,6 +3,7 @@ import { GunCaliber } from "./gun-caliber";
|
|
|
3
3
|
import { MillingDetail } from './milling-detail';
|
|
4
4
|
import { ProjectType } from './project-type';
|
|
5
5
|
import { RefinishDetail } from './refinish-detail';
|
|
6
|
+
import { WaitlistGunPackageDetail } from './waitlist-gun-package-detail';
|
|
6
7
|
export declare class WaitlistGun {
|
|
7
8
|
id: number;
|
|
8
9
|
firearm: Firearm;
|
|
@@ -16,6 +17,7 @@ export declare class WaitlistGun {
|
|
|
16
17
|
refinish: boolean;
|
|
17
18
|
milling: boolean;
|
|
18
19
|
specialOrder: boolean;
|
|
20
|
+
packageDetail: WaitlistGunPackageDetail;
|
|
19
21
|
refinishDetails: RefinishDetail[];
|
|
20
22
|
millingDetail: MillingDetail;
|
|
21
23
|
timestamp: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Package } from "./package";
|
|
2
|
+
import { PackageOptionalItem } from "./package-optional-item";
|
|
3
|
+
import { PackageVariationOption } from "./package-variation-option";
|
|
4
|
+
export declare class WorkOrderPackageDetail {
|
|
5
|
+
id: number;
|
|
6
|
+
package: Package;
|
|
7
|
+
optionalItems: PackageOptionalItem[];
|
|
8
|
+
variations: PackageVariationOption[];
|
|
9
|
+
timestamp: string;
|
|
10
|
+
}
|
|
@@ -5,6 +5,7 @@ import { Customer } from "./customer";
|
|
|
5
5
|
import { Firearm } from './firearm';
|
|
6
6
|
import { GunCaliber } from './gun-caliber';
|
|
7
7
|
import { ProjectType } from './project-type';
|
|
8
|
+
import { WorkOrderPackageDetail } from "./work-order-package-detail";
|
|
8
9
|
export declare class WorkOrder {
|
|
9
10
|
constructor();
|
|
10
11
|
id: number;
|
|
@@ -25,6 +26,7 @@ export declare class WorkOrder {
|
|
|
25
26
|
shipmentInfo: string;
|
|
26
27
|
projectType: ProjectType;
|
|
27
28
|
status: WorkOrderStatus;
|
|
29
|
+
packageDetail: WorkOrderPackageDetail;
|
|
28
30
|
histories: WorkOrderHistory[];
|
|
29
31
|
notes: string;
|
|
30
32
|
timestamp: string;
|