Skip to content

Commit

Permalink
update config create
Browse files Browse the repository at this point in the history
  • Loading branch information
tharlestsa committed Oct 26, 2024
1 parent f109c54 commit 8c3d98c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/client/src/app/modules/campaign/create/create.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
<div class="form-group">
<label for="satellite" class="label">{{'campaign_create_edit_tab_config_field_satellite' | translate}}</label>
<nb-select id="satellite" formControlName="satellite" placeholder="{{'campaign_create_edit_tab_config_field_satellite_placeholder' | translate}}"
fullWidth filled>
fullWidth filled (selectedChange)="onSatelliteChange($event)">
<nb-option *ngFor="let satellite of satellites" value="{{satellite.id}}">
{{satellite.name}}</nb-option>
</nb-select>
Expand All @@ -148,10 +148,11 @@
<div class="col-sm-12 col-md-5 col-xl-5">
<div class="form-group">
<label for="_colors" class="label">{{'campaign_create_edit_tab_config_field_colors' | translate}}</label>
<nb-select id="_colors" formControlName="_colors" placeholder="{{'campaign_create_edit_tab_config_field_colors_placeholder' | translate}}" fullWidth filled>
<nb-option *ngFor="let colorComp of colorsComposition" value="{{colorComp.id}}">
{{colorComp.name}}</nb-option>
</nb-select>
<nb-select id="_colors" formControlName="_colors" placeholder="{{'campaign_create_edit_tab_config_field_colors_placeholder' | translate}}" fullWidth
filled>
<nb-option *ngFor="let colorComp of colorsComposition" value="{{colorComp.id}}">
{{colorComp.name}}</nb-option>
</nb-select>
</div>
</div>
<div class="col-sm-12 col-md-2 col-xl-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,4 +709,8 @@ export class CreateComponent implements OnInit {
this.selectedThumb = thumb;
this.isSingleView = true;
}
onSatelliteChange(satelliteId: number) {
this.colorsComposition = this.satellitesColors.filter(color => color.id == satelliteId)
.map(color => ({name: color.value.toUpperCase(), id: color.value}));
}
}

0 comments on commit 8c3d98c

Please sign in to comment.