refactor: pre release cleanup all over the place

This commit is contained in:
Rainer Killinger
2022-10-21 16:01:44 +00:00
parent c3130a392a
commit acdd93eb99
20 changed files with 215 additions and 139 deletions

View File

@@ -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;
}
/**

View File

@@ -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',
},
};

View File

@@ -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>