@huntsman-cancer-institute/cod 17.0.9 → 17.1.0
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/components/attribute-edit.component.d.ts +6 -6
- package/esm2022/components/attribute-edit.component.mjs +26 -14
- package/esm2022/services/attribute.service.mjs +11 -10
- package/fesm2022/huntsman-cancer-institute-cod.mjs +31 -18
- package/fesm2022/huntsman-cancer-institute-cod.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -823,7 +823,7 @@ class AttributeService {
|
|
|
823
823
|
//Shouldn't be a need to change dirty or notify attributes
|
|
824
824
|
}
|
|
825
825
|
saveGridRowAttributeValues(idGroupAttribute, groupAttributeRowId) {
|
|
826
|
-
let rowValues = this.updatedAttributeValues.filter((av) => av.groupAttributeRowId === groupAttributeRowId);
|
|
826
|
+
let rowValues = this.updatedAttributeValues.filter((av) => av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute);
|
|
827
827
|
for (let j = 0; j < rowValues.length; j++) {
|
|
828
828
|
//set the idAttributeValueSet if necessary
|
|
829
829
|
if (!rowValues[j].idAttributeValueSet) {
|
|
@@ -837,7 +837,7 @@ class AttributeService {
|
|
|
837
837
|
//For multi values that were sliced (de-selected) we're going to find them and null out the value, instead of removing.
|
|
838
838
|
//That means they actaully need to be added to the rowValues
|
|
839
839
|
//Removed multi values within an existing row
|
|
840
|
-
let removedValues = this.slicedAttributeValues.filter((av) => av.groupAttributeRowId === groupAttributeRowId);
|
|
840
|
+
let removedValues = this.slicedAttributeValues.filter((av) => av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute);
|
|
841
841
|
for (let i = 0; i < removedValues.length; i++) {
|
|
842
842
|
removedValues[i].valueAttributeChoice = undefined;
|
|
843
843
|
removedValues[i].valueIdDictionary = undefined;
|
|
@@ -865,8 +865,8 @@ class AttributeService {
|
|
|
865
865
|
avs.attributeValues.push(attributeValueGridRow.attributeValues[i]);
|
|
866
866
|
}
|
|
867
867
|
//Remove the updated and sliced values for the grid row, now (these are the old ones with the negative rowid)
|
|
868
|
-
this.slicedAttributeValues = this.slicedAttributeValues.filter((av) => av.groupAttributeRowId !== groupAttributeRowId);
|
|
869
|
-
this.updatedAttributeValues = this.updatedAttributeValues.filter((av) => av.groupAttributeRowId !== groupAttributeRowId);
|
|
868
|
+
this.slicedAttributeValues = this.slicedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));
|
|
869
|
+
this.updatedAttributeValues = this.updatedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));
|
|
870
870
|
this.attributeValueSetSubject.next(avs);
|
|
871
871
|
this.gridRowSaved.next(attributeValueGridRow);
|
|
872
872
|
this.loadingSubject.next(false);
|
|
@@ -881,20 +881,20 @@ class AttributeService {
|
|
|
881
881
|
//Add the grid row to the original attribute values
|
|
882
882
|
let avs = this.attributeValueSetSubject.getValue();
|
|
883
883
|
//Remove all old values for row
|
|
884
|
-
let index = avs.attributeValues.findIndex((av) => av.groupAttributeRowId === groupAttributeRowId);
|
|
884
|
+
let index = avs.attributeValues.findIndex((av) => (av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute));
|
|
885
885
|
while (index > 0) {
|
|
886
886
|
//Remove value
|
|
887
887
|
avs.attributeValues.splice(index, 1);
|
|
888
888
|
//Find the next one
|
|
889
|
-
index = avs.attributeValues.findIndex((av) => av.groupAttributeRowId === groupAttributeRowId);
|
|
889
|
+
index = avs.attributeValues.findIndex((av) => (av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute));
|
|
890
890
|
}
|
|
891
891
|
//Add all the current values
|
|
892
892
|
for (let i = 0; i < attributeValueGridRow.attributeValues.length; i++) {
|
|
893
893
|
avs.attributeValues.push(attributeValueGridRow.attributeValues[i]);
|
|
894
894
|
}
|
|
895
895
|
//Remove the sliced and updated values for the grid row
|
|
896
|
-
this.slicedAttributeValues = this.slicedAttributeValues.filter((av) => av.groupAttributeRowId !== groupAttributeRowId);
|
|
897
|
-
this.updatedAttributeValues = this.updatedAttributeValues.filter((av) => av.groupAttributeRowId !== groupAttributeRowId);
|
|
896
|
+
this.slicedAttributeValues = this.slicedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));
|
|
897
|
+
this.updatedAttributeValues = this.updatedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));
|
|
898
898
|
this.attributeValueSetSubject.next(avs);
|
|
899
899
|
this.gridRowSaved.next(attributeValueGridRow);
|
|
900
900
|
this.loadingSubject.next(false);
|
|
@@ -921,7 +921,8 @@ class AttributeService {
|
|
|
921
921
|
this.http.request('delete', url, { body: avgr, params: queryParams }).subscribe(() => {
|
|
922
922
|
//Remove the grid row from the original attribute values
|
|
923
923
|
let avs = this.attributeValueSetSubject.getValue();
|
|
924
|
-
|
|
924
|
+
//Filter to only attributes to KEEP - (i.e. not the same grid or not the row being deleted)
|
|
925
|
+
avs.attributeValues = avs.attributeValues.filter((av) => (av.idGroupAttribute !== idGroupAttribute || av.groupAttributeRowId !== groupAttributeRowId));
|
|
925
926
|
this.attributeValueSetSubject.next(avs);
|
|
926
927
|
this.gridRowDeleted.next(avgr);
|
|
927
928
|
this.loadingSubject.next(false);
|
|
@@ -1872,8 +1873,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
1872
1873
|
}] } });
|
|
1873
1874
|
|
|
1874
1875
|
/**
|
|
1875
|
-
* This component is specifically designed to exist in a modal for editing.
|
|
1876
|
-
* because components such as the grid need extra configuration for editing.
|
|
1876
|
+
* This component is specifically designed to exist in a modal for editing.
|
|
1877
|
+
* This is different from the flex attribute because components such as the grid need extra configuration for editing.
|
|
1877
1878
|
*/
|
|
1878
1879
|
class AttributeEditComponent extends AttributeBase {
|
|
1879
1880
|
//dictionaryEndpoint = this.attributeService.dictionaryEndpoint;
|
|
@@ -1911,14 +1912,19 @@ class AttributeEditComponent extends AttributeBase {
|
|
|
1911
1912
|
{{attribute.displayName}}
|
|
1912
1913
|
</div>
|
|
1913
1914
|
<div class="d-flex col-md-6">
|
|
1914
|
-
|
|
1915
|
+
|
|
1916
|
+
<textarea
|
|
1917
|
+
#inputRef
|
|
1915
1918
|
type="text"
|
|
1916
1919
|
spellcheck="spellcheck"
|
|
1917
1920
|
lang="en"
|
|
1918
1921
|
[ngModel]="attributeValues[0].valueLongText.textData"
|
|
1919
1922
|
(ngModelChange)="valueTextChange($event)"
|
|
1920
1923
|
[disabled]="!editInline || attribute.isCalculated === 'Y'"
|
|
1921
|
-
|
|
1924
|
+
style="width: 500px; height: 125px; resize: none;"
|
|
1925
|
+
>
|
|
1926
|
+
</textarea>
|
|
1927
|
+
|
|
1922
1928
|
</div>
|
|
1923
1929
|
</div>
|
|
1924
1930
|
</ng-container>
|
|
@@ -2063,7 +2069,8 @@ class AttributeEditComponent extends AttributeBase {
|
|
|
2063
2069
|
{{attribute.displayName}}
|
|
2064
2070
|
</div>
|
|
2065
2071
|
<div class="d-flex col-md-6">
|
|
2066
|
-
|
|
2072
|
+
<select
|
|
2073
|
+
[ngModel]="(attributeValues[0].valueAttributeChoice)?attributeValues[0].valueAttributeChoice.idAttributeChoice:undefined"
|
|
2067
2074
|
(ngModelChange)="valueChoiceChange($event)"
|
|
2068
2075
|
class="edit-renderer">
|
|
2069
2076
|
<option [ngValue]="undefined"></option>
|
|
@@ -2208,7 +2215,7 @@ class AttributeEditComponent extends AttributeBase {
|
|
|
2208
2215
|
}
|
|
2209
2216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AttributeEditComponent, decorators: [{
|
|
2210
2217
|
type: Component,
|
|
2211
|
-
args: [{ selector:
|
|
2218
|
+
args: [{ selector: 'hci-attribute-edit', template: `
|
|
2212
2219
|
<!-- String -->
|
|
2213
2220
|
<ng-container *ngIf="attribute.codeAttributeDataType === 'S'">
|
|
2214
2221
|
<div #attributeRef
|
|
@@ -2235,14 +2242,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
2235
2242
|
{{attribute.displayName}}
|
|
2236
2243
|
</div>
|
|
2237
2244
|
<div class="d-flex col-md-6">
|
|
2238
|
-
|
|
2245
|
+
|
|
2246
|
+
<textarea
|
|
2247
|
+
#inputRef
|
|
2239
2248
|
type="text"
|
|
2240
2249
|
spellcheck="spellcheck"
|
|
2241
2250
|
lang="en"
|
|
2242
2251
|
[ngModel]="attributeValues[0].valueLongText.textData"
|
|
2243
2252
|
(ngModelChange)="valueTextChange($event)"
|
|
2244
2253
|
[disabled]="!editInline || attribute.isCalculated === 'Y'"
|
|
2245
|
-
|
|
2254
|
+
style="width: 500px; height: 125px; resize: none;"
|
|
2255
|
+
>
|
|
2256
|
+
</textarea>
|
|
2257
|
+
|
|
2246
2258
|
</div>
|
|
2247
2259
|
</div>
|
|
2248
2260
|
</ng-container>
|
|
@@ -2387,7 +2399,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
2387
2399
|
{{attribute.displayName}}
|
|
2388
2400
|
</div>
|
|
2389
2401
|
<div class="d-flex col-md-6">
|
|
2390
|
-
|
|
2402
|
+
<select
|
|
2403
|
+
[ngModel]="(attributeValues[0].valueAttributeChoice)?attributeValues[0].valueAttributeChoice.idAttributeChoice:undefined"
|
|
2391
2404
|
(ngModelChange)="valueChoiceChange($event)"
|
|
2392
2405
|
class="edit-renderer">
|
|
2393
2406
|
<option [ngValue]="undefined"></option>
|