mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
refactor: pre release cleanup all over the place
This commit is contained in:
@@ -46,6 +46,11 @@ export class AddEventActionChipComponent implements OnDestroy {
|
||||
*/
|
||||
associatedDateSeries: Promise<SCDateSeries[]>;
|
||||
|
||||
/**
|
||||
* Color
|
||||
*/
|
||||
color: string;
|
||||
|
||||
/**
|
||||
* Disabled
|
||||
*/
|
||||
@@ -56,6 +61,9 @@ export class AddEventActionChipComponent implements OnDestroy {
|
||||
*/
|
||||
icon: string;
|
||||
|
||||
/**
|
||||
* Current state of icon fill
|
||||
*/
|
||||
iconFill: boolean;
|
||||
|
||||
/**
|
||||
@@ -98,11 +106,12 @@ export class AddEventActionChipComponent implements OnDestroy {
|
||||
*/
|
||||
applyState(state: AddEventStates) {
|
||||
this.state = state;
|
||||
const {label, icon, disabled, fill} = this.states[state];
|
||||
const {label, icon, disabled, fill, color} = this.states[state];
|
||||
this.label = label;
|
||||
this.icon = icon;
|
||||
this.iconFill = fill;
|
||||
this.disabled = disabled;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,23 +28,27 @@ export const AddEventStatesMap = {
|
||||
fill: true,
|
||||
label: 'data.chips.add_events.ADDED_ALL',
|
||||
disabled: false,
|
||||
color: 'success',
|
||||
},
|
||||
[AddEventStates.ADDED_SOME]: {
|
||||
icon: SCIcon`event`,
|
||||
fill: true,
|
||||
label: 'data.chips.add_events.ADDED_SOME',
|
||||
disabled: false,
|
||||
color: 'success',
|
||||
},
|
||||
[AddEventStates.REMOVED_ALL]: {
|
||||
icon: SCIcon`calendar_today`,
|
||||
fill: false,
|
||||
label: 'data.chips.add_events.REMOVED_ALL',
|
||||
disabled: false,
|
||||
color: 'primary',
|
||||
},
|
||||
[AddEventStates.UNAVAILABLE]: {
|
||||
icon: SCIcon`event_busy`,
|
||||
fill: false,
|
||||
label: 'data.chips.add_events.UNAVAILABLE',
|
||||
disabled: true,
|
||||
color: 'dark',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
@chipTransition
|
||||
[disabled]="disabled"
|
||||
(click)="$event.stopPropagation(); editModal.present()"
|
||||
[color]="color"
|
||||
[outline]="true"
|
||||
>
|
||||
<ion-icon [name]="icon" [fill]="iconFill"></ion-icon>
|
||||
<ion-label>{{ label | translate }}</ion-label>
|
||||
|
||||
Reference in New Issue
Block a user