gunsmith-common 2.2.8 → 2.2.10
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/shared/controls/package-selector/package-selector.component.mjs +11 -5
- package/esm2020/shared/types/package-variation.mjs +2 -1
- package/fesm2015/gunsmith-common.mjs +10 -4
- package/fesm2015/gunsmith-common.mjs.map +1 -1
- package/fesm2020/gunsmith-common.mjs +10 -3
- package/fesm2020/gunsmith-common.mjs.map +1 -1
- package/gunsmith-common-2.2.10.tgz +0 -0
- package/package.json +1 -1
- package/shared/controls/package-selector/package-selector.component.d.ts +4 -2
- package/gunsmith-common-2.2.8.tgz +0 -0
|
@@ -428,6 +428,7 @@ class PackageOptionalItem {
|
|
|
428
428
|
class PackageVariation {
|
|
429
429
|
constructor() {
|
|
430
430
|
this.options = [];
|
|
431
|
+
this.gunsmithOnly = false;
|
|
431
432
|
}
|
|
432
433
|
}
|
|
433
434
|
|
|
@@ -1976,8 +1977,7 @@ class PackageSelectorComponent {
|
|
|
1976
1977
|
this.createForm();
|
|
1977
1978
|
}
|
|
1978
1979
|
ngOnChanges(changes) {
|
|
1979
|
-
if ((changes
|
|
1980
|
-
(changes.projectType?.currentValue === ProjectType.Firearm && this.firearmId)) {
|
|
1980
|
+
if (this.canGetPackages(changes)) {
|
|
1981
1981
|
this.getPackages();
|
|
1982
1982
|
this.packageForm.reset();
|
|
1983
1983
|
}
|
|
@@ -1986,6 +1986,11 @@ class PackageSelectorComponent {
|
|
|
1986
1986
|
this.packageForm.reset();
|
|
1987
1987
|
}
|
|
1988
1988
|
}
|
|
1989
|
+
canGetPackages(changes) {
|
|
1990
|
+
return (changes.firearmId && changes.firearmId.currentValue && this.projectType === ProjectType.Firearm && (this.workOrderType == WorkOrderType.Standard || this.workOrderType == WorkOrderType.NewInBox)) ||
|
|
1991
|
+
(changes.projectType && changes.projectType.currentValue === ProjectType.Firearm && this.firearmId && (this.workOrderType == WorkOrderType.Standard || this.workOrderType == WorkOrderType.NewInBox)) ||
|
|
1992
|
+
(changes.workOrderType && (changes.workOrderType.currentValue === WorkOrderType.Standard || changes.workOrderType.currentValue === WorkOrderType.NewInBox) && this.firearmId && this.projectType === ProjectType.Firearm);
|
|
1993
|
+
}
|
|
1989
1994
|
ngAfterViewInit() {
|
|
1990
1995
|
const outerControl = this.inj.get(NgControl).control;
|
|
1991
1996
|
const prevMarkAsTouched = outerControl.markAsTouched;
|
|
@@ -2101,7 +2106,7 @@ class PackageSelectorComponent {
|
|
|
2101
2106
|
}
|
|
2102
2107
|
}
|
|
2103
2108
|
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 });
|
|
2104
|
-
PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PackageSelectorComponent, selector: "cgw-package-selector", inputs: { firearmId: "firearmId", projectType: "projectType", gunsmithOnly: "gunsmithOnly" }, providers: [
|
|
2109
|
+
PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PackageSelectorComponent, selector: "cgw-package-selector", inputs: { firearmId: "firearmId", projectType: "projectType", workOrderType: "workOrderType", gunsmithOnly: "gunsmithOnly" }, providers: [
|
|
2105
2110
|
{
|
|
2106
2111
|
provide: NG_VALUE_ACCESSOR,
|
|
2107
2112
|
multi: true,
|
|
@@ -2131,6 +2136,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2131
2136
|
type: Input
|
|
2132
2137
|
}], projectType: [{
|
|
2133
2138
|
type: Input
|
|
2139
|
+
}], workOrderType: [{
|
|
2140
|
+
type: Input
|
|
2134
2141
|
}], gunsmithOnly: [{
|
|
2135
2142
|
type: Input
|
|
2136
2143
|
}] } });
|