mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
feat: show in-place in date series modal, resolves #385
feat: show start date for date series modal ranges, resolves #386 refactor: reformat date series modal to be more readable fix: add message for malformed date series, resolves #388
This commit is contained in:
committed by
Rainer Killinger
parent
3e99d7fa8f
commit
22e70ae92b
@@ -30,14 +30,14 @@ describe('ical', function () {
|
|||||||
|
|
||||||
cy.get('ion-app > ion-modal').within(() => {
|
cy.get('ion-app > ion-modal').within(() => {
|
||||||
cy.get('ion-footer > ion-toolbar > ion-button').should('have.attr', 'disabled');
|
cy.get('ion-footer > ion-toolbar > ion-button').should('have.attr', 'disabled');
|
||||||
cy.contains('ion-item', /eine Stunde um 19. Jan. 2059, \d+:00/).click();
|
cy.contains('ion-item', /19\.\s+Januar\s+2059,\s+\d{2}:00\s+-\s+\d{2}:00/).click();
|
||||||
cy.get('ion-footer > ion-toolbar > ion-button').should('not.have.attr', 'disabled');
|
cy.get('ion-footer > ion-toolbar > ion-button').should('not.have.attr', 'disabled');
|
||||||
cy.get('ion-footer > ion-toolbar > ion-button').click();
|
cy.get('ion-footer > ion-toolbar > ion-button').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.get('add-event-review-modal').within(() => {
|
cy.get('add-event-review-modal').within(() => {
|
||||||
cy.get('ion-item-group').should('contain', 'UNIcert (Test)');
|
cy.get('ion-item-group').should('contain', 'UNIcert (Test)');
|
||||||
cy.contains('ion-item-group', /19. Jan. 2059, \d+:00/);
|
cy.contains('ion-item-group', /19\.\s+Jan\.\s+2059,\s+\d{2}:00/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
~ Copyright (C) 2022 StApps
|
~ Copyright (C) 2023 StApps
|
||||||
~ This program is free software: you can redistribute it and/or modify it
|
~ This program is free software: you can redistribute it and/or modify it
|
||||||
~ under the terms of the GNU General Public License as published by the Free
|
~ under the terms of the GNU General Public License as published by the Free
|
||||||
~ Software Foundation, version 3.
|
~ Software Foundation, version 3.
|
||||||
@@ -38,20 +38,39 @@
|
|||||||
*ngFor="let date of frequency.children"
|
*ngFor="let date of frequency.children"
|
||||||
(click)="modified.emit(); date.selected = !date.selected; frequency.notifyChildChanged()"
|
(click)="modified.emit(); date.selected = !date.selected; frequency.notifyChildChanged()"
|
||||||
>
|
>
|
||||||
<ion-label *ngIf="date.item.dates.length > 1; else single_event" class="ion-text-wrap">
|
<ion-label>
|
||||||
{{ date.item.duration | amDuration: 'hours' }}
|
<ng-container *ngIf="date.item.dates.length > 1; else single_event">
|
||||||
{{ 'data.chips.add_events.popover.AT' | translate }}
|
<ion-text>
|
||||||
{{ date.item.dates[0] | amDateFormat: 'HH:mm ddd' }}
|
{{ date.item.dates[0] | amDateFormat: 'dddd, LT' }} -
|
||||||
{{ 'data.chips.add_events.popover.UNTIL' | translate }}
|
{{ date.item.dates[0] | amAdd: date.item.duration | amDateFormat: 'LT' }}
|
||||||
{{ date.item.dates[date.item.dates.length - 1] | amDateFormat: 'll' }}
|
</ion-text>
|
||||||
|
<br />
|
||||||
|
<ion-text>
|
||||||
|
{{ date.item.dates[0] | amDateFormat: 'LL' }} -
|
||||||
|
{{ date.item.dates[date.item.dates.length - 1] | amDateFormat: 'LL' }}
|
||||||
|
</ion-text>
|
||||||
|
</ng-container>
|
||||||
|
<ng-template #single_event>
|
||||||
|
<ion-text *ngIf="date.item.dates[0] as time; else noDates">
|
||||||
|
{{ time | amDateFormat: 'LL, LT' }} -
|
||||||
|
{{ time | amAdd: date.item.duration | amDateFormat: 'LT' }}
|
||||||
|
</ion-text>
|
||||||
|
<ng-template #noDates>
|
||||||
|
<ion-text color="danger">{{ 'data.chips.add_events.popover.DATA_ERROR' | translate }}</ion-text>
|
||||||
|
<br />
|
||||||
|
<ion-text *ngFor="let id of date.item.identifiers | keyvalue">
|
||||||
|
{{ id.key }}: {{ id.value }}
|
||||||
|
</ion-text>
|
||||||
|
</ng-template>
|
||||||
|
</ng-template>
|
||||||
|
<ng-container class="ion-align-items-center" *ngIf="date.item.inPlace">
|
||||||
|
<br />
|
||||||
|
<ion-text color="medium" class="place">
|
||||||
|
<ion-icon name="pin_drop"></ion-icon>
|
||||||
|
<span> {{ 'inPlace.name' | thingTranslate: date.item }}</span>
|
||||||
|
</ion-text>
|
||||||
|
</ng-container>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ng-template #single_event>
|
|
||||||
<ion-label class="ion-text-wrap">
|
|
||||||
{{ date.item.duration | amDuration: 'hours' }}
|
|
||||||
{{ 'data.chips.add_events.popover.AT' | translate }}
|
|
||||||
{{ date.item.dates[date.item.dates.length - 1] | amDateFormat: 'll, HH:mm' }}
|
|
||||||
</ion-label>
|
|
||||||
</ng-template>
|
|
||||||
<ion-checkbox slot="end" [checked]="date.selected"> </ion-checkbox>
|
<ion-checkbox slot="end" [checked]="date.selected"> </ion-checkbox>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* Copyright (C) 2022 StApps
|
* Copyright (C) 2023 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
@@ -42,3 +42,8 @@ ion-item-divider.ios > ion-checkbox {
|
|||||||
ion-list.md {
|
ion-list.md {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.place {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|||||||
@@ -153,7 +153,8 @@
|
|||||||
"ALL": "Alle Termine",
|
"ALL": "Alle Termine",
|
||||||
"AT": "um",
|
"AT": "um",
|
||||||
"UNTIL": "bis",
|
"UNTIL": "bis",
|
||||||
"SINGLE": "Einzel"
|
"SINGLE": "Einzel",
|
||||||
|
"DATA_ERROR": "Fehlerhafte Daten"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -153,7 +153,8 @@
|
|||||||
"ALL": "All Events",
|
"ALL": "All Events",
|
||||||
"AT": "at",
|
"AT": "at",
|
||||||
"UNTIL": "until",
|
"UNTIL": "until",
|
||||||
"SINGLE": "single"
|
"SINGLE": "single",
|
||||||
|
"DATA_ERROR": "Invalid data"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user