|
82 | 82 |
|
83 | 83 | <lookup-colored *ngIf="col.type === 'lookup-colored' && col.filter" [cutLongText]="true"
|
84 | 84 | [small]="true" [colorProperty]="'color'"
|
85 |
| - [propertiesToShow]="[getLookupProperty(col.property, col.lookup.values)]" |
| 85 | + [propertiesToShow]="col.lookup.propToShow" |
86 | 86 | [array]="col.lookup.values"
|
87 | 87 | [placeholder]="col.lookup.placeholder ? col.lookup.placeholder : 'None'"
|
88 | 88 | [allowEmptyValue]="true" [model]="getLookupFilterValue(col)[0]"
|
89 |
| - (modelChange)="handleLookupFilterChange(col.lookup.objectWithId ? col.lookup.objectWithId : col.lookup.entity, [$event])"> |
| 89 | + (modelChange)="handleLookupFilterChange(col.lookup.objectWithId ? col.lookup.objectWithId : col.property, [$event])"> |
90 | 90 | </lookup-colored>
|
91 | 91 |
|
92 | 92 | <tristate-checkbox *ngIf="col.type === 'checkbox' && col.filter"
|
|
98 | 98 | [array]="col.lookup.filterValues ? col.lookup.filterValues : col.lookup.values"
|
99 | 99 | [placeholder]="col.lookup.placeholder ? col.lookup.placeholder : 'None'"
|
100 | 100 | [allowEmptyValue]="true" [model]="getLookupFilterValue(col)[0]"
|
101 |
| - [emptyForFilter]="col.nullFilter" |
102 |
| - (modelChange)="handleLookupFilterChange(col.lookup.objectWithId ? col.lookup.objectWithId : col.lookup.entity, [$event])"> |
| 101 | + [emptyForFilter]="col.nullFilter" [addAction]="col.lookup.addAction" |
| 102 | + (modelChange)="handleLookupFilterChange(col.lookup.objectWithId ? col.lookup.objectWithId : col.property, [$event])"> |
103 | 103 | </lookup-autocomplete>
|
104 | 104 |
|
105 | 105 | <div *ngIf="(col.type === 'percent' || col.type === 'number') && col.filter"
|
|
171 | 171 | *ngIf="col.creation && col.type === 'lookup-autocomplete'" [small]="true"
|
172 | 172 | [placeholder]="col?.name" [allowEmptyValue]="!col.creation.required"
|
173 | 173 | [propertiesToShow]="col.lookup.propToShow" [array]="col.lookup.values"
|
174 |
| - [model]="getFilterLookupModel(col.property)" |
| 174 | + [model]="getFilterLookupModel(col.property)" [addAction]="col.lookup.addAction" |
175 | 175 | (modelChange)="setNewValueFromLookup(col.property, $event)"></lookup-autocomplete>
|
176 | 176 |
|
177 | 177 | <lookup-colored *ngIf="col.creation && col.type === 'lookup-colored'" [cutLongText]="true"
|
178 | 178 | [small]="true" placeholder="col?.name" [allowEmptyValue]="!col.creation.required"
|
179 |
| - [propertiesToShow]="[getLookupProperty(col.property, col.lookup.values)]" |
| 179 | + [propertiesToShow]="col.lookup.propToShow" |
180 | 180 | [array]="col.lookup.values" [model]="getFilterLookupModel(col.property)"
|
181 | 181 | (modelChange)="setNewValueFromLookup(col.property, $event)" [colorProperty]="'color'">
|
182 | 182 | </lookup-colored>
|
|
221 | 221 | <lookup-autocomplete *ngIf="col.type === 'lookup-autocomplete'" [cutLongText]="true"
|
222 | 222 | [small]="true" [allowEmptyValue]="col.lookup.allowEmpty"
|
223 | 223 | [propertiesToShow]="col.lookup.propToShow" [array]="col.lookup.values"
|
224 |
| - [model]="transformationsService.getPropertyValue(bulkChangeEntity, col.lookup.entity)" |
225 |
| - placeholder="Not Assigned" |
226 |
| - (modelChange)="setPropertyValue(bulkChangeEntity, col.lookup.entity, $event, false, false)"> |
| 224 | + [model]="transformationsService.getPropertyValue(bulkChangeEntity, col.property)" |
| 225 | + placeholder="Not Assigned" [addAction]="col.lookup.addAction" |
| 226 | + (modelChange)="setPropertyValue(bulkChangeEntity, col.property, $event, false, false)"> |
227 | 227 | </lookup-autocomplete>
|
228 | 228 |
|
229 | 229 | <lookup-colored *ngIf="col.type === 'lookup-colored'" [cutLongText]="true" [small]="true"
|
230 | 230 | [colorProperty]="'color'"
|
231 |
| - [propertiesToShow]="[getLookupProperty(col.property, col.lookup.values)]" |
| 231 | + [propertiesToShow]="col.lookup.propToShow" |
232 | 232 | [array]="col.lookup.values" placeholder="Not Assigned"
|
233 | 233 | [allowEmptyValue]="col.lookup.allowEmpty"
|
234 |
| - [model]="transformationsService.getPropertyValue(bulkChangeEntity, col.lookup.entity)" |
235 |
| - (modelChange)="setPropertyValue(bulkChangeEntity, col.lookup.entity, $event, false, false)"> |
| 234 | + [model]="transformationsService.getPropertyValue(bulkChangeEntity, col.property)" |
| 235 | + (modelChange)="setPropertyValue(bulkChangeEntity, col.property, $event, false, false)"> |
236 | 236 | </lookup-colored>
|
237 | 237 |
|
238 | 238 | <input *ngIf="col.type === 'checkbox'" [name]="col.property" type="checkbox" trim="blur"
|
|
243 | 243 | *ngIf="col.type === 'multiselect'" placeholder="{{col?.name}}"
|
244 | 244 | [propertiesToShow]="col.lookup.propToShow" [array]="col.lookup.values"
|
245 | 245 | [model]="transformationsService.getPropertyValue(bulkChangeEntity, col.property)"
|
246 |
| - (modelChange)="setPropertyValue(bulkChangeEntity, col.lookup.entity, $event, false, false)"> |
| 246 | + (modelChange)="setPropertyValue(bulkChangeEntity, col.property, $event, false, false)"> |
247 | 247 | </lookup-autocomplete-multiselect>
|
248 | 248 |
|
249 | 249 | <input *ngIf="col.type === 'time'" class="form-control input-sm ft-duration-input"
|
|
288 | 288 | [small]="true" [allowEmptyValue]="col.lookup.allowEmpty"
|
289 | 289 | [allowCreation]="col.lookup.allowCreation"
|
290 | 290 | [propertiesToShow]="col.lookup.propToShow" [array]="col.lookup.values"
|
291 |
| - [model]="transformationsService.getPropertyValue(entity, col.lookup.entity)" |
| 291 | + [model]="transformationsService.getPropertyValue(entity, col.property)" |
292 | 292 | [disabled]="!col.editable || entity.constantRow || notEditableByProperty(entity, col)"
|
293 |
| - placeholder="Not Assigned" |
294 |
| - (modelChange)="setPropertyValue(entity, col.lookup.entity, $event)" |
| 293 | + placeholder="Not Assigned" [addAction]="col.lookup.addAction" |
| 294 | + (modelChange)="setPropertyValue(entity, col.property, $event)" |
| 295 | + (actionClick)="handleLookupAction($event, col, entity)" |
295 | 296 | (searchText)="handleLookupCreation($event, col, entity)">
|
296 | 297 | </lookup-autocomplete>
|
297 | 298 |
|
298 | 299 | <lookup-colored *ngIf="col.type === 'lookup-colored'" [cutLongText]="true" [small]="true"
|
299 | 300 | [colorProperty]="'color'"
|
300 |
| - [propertiesToShow]="[getLookupProperty(col.property, col.lookup.values)]" |
| 301 | + [propertiesToShow]="col.lookup.propToShow" |
301 | 302 | [array]="col.lookup.values"
|
302 | 303 | [disabled]="!col.editable || entity.constantRow || notEditableByProperty(entity, col)"
|
303 | 304 | placeholder="Not Assigned" [allowEmptyValue]="col.lookup.allowEmpty"
|
304 |
| - [model]="transformationsService.getPropertyValue(entity, col.lookup.entity)" |
305 |
| - (modelChange)="setPropertyValue(entity, col.lookup.entity, $event)"></lookup-colored> |
| 305 | + [model]="transformationsService.getPropertyValue(entity, col.property)" |
| 306 | + (modelChange)="setPropertyValue(entity, col.property, $event)"></lookup-colored> |
306 | 307 |
|
307 | 308 | <large-text-container *ngIf="col.type === 'long-text'"
|
308 | 309 | [text]="transformationsService.getPropertyValue(entity, col.property)">Loading...
|
|
339 | 340 | placeholder="{{col?.name}}" [propertiesToShow]="col.lookup.propToShow"
|
340 | 341 | [array]="col.lookup.values"
|
341 | 342 | [model]="transformationsService.getPropertyValue(entity, col.property)"
|
342 |
| - (modelChange)="setPropertyValue(entity, col.lookup.entity, $event)"> |
| 343 | + (modelChange)="setPropertyValue(entity, col.property, $event)"> |
343 | 344 | </lookup-autocomplete-multiselect>
|
344 | 345 |
|
345 | 346 | <div *ngIf="col.type === 'date' && col.format && (!col.editable || entity.constantRow || notEditableByProperty(entity, col))" class="nowrap">
|
|
0 commit comments