mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
toast on day deletion, icon trash 2 replacement
Signed-off-by: tykayn <15d65f2f-0b14-4f70-bf34-e130180ed62b@users.tedomum.net>
This commit is contained in:
parent
41ce51b421
commit
874b9cdf16
@ -31,7 +31,7 @@
|
||||
class="has-no-outline has-no-background has-text-primary has-text-left"
|
||||
(click)="deleteChoiceField(id)"
|
||||
>
|
||||
<img class="icon" aria-hidden="true" src="assets/icons/trash.svg" />
|
||||
<img class="icon" aria-hidden="true" src="assets/icons/trash-2.svg" />
|
||||
{{ 'dates.remove' | translate }} {{ id + 1 }}
|
||||
</button>
|
||||
</div>
|
||||
@ -39,7 +39,7 @@
|
||||
</fieldset>
|
||||
<div class="add_date">
|
||||
<!-- ajouter une date-->
|
||||
<button class="button is-primary is-fullwidth" (click)="addChoice()">
|
||||
<button class="button is-primary is-fullwidth is-thin" (click)="addChoice()">
|
||||
{{ 'dates.add' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -10,6 +10,8 @@ import { DateChoice } from '../../../../../../core/models/dateChoice.model';
|
||||
import { PollService } from '../../../../../../core/services/poll.service';
|
||||
import { DateUtilitiesService } from '../../../../../../core/services/date.utilities.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-day-list',
|
||||
templateUrl: './day-list.component.html',
|
||||
@ -30,6 +32,7 @@ export class DayListComponent {
|
||||
public dialog: MatDialog,
|
||||
private toastService: ToastService,
|
||||
private pollService: PollService,
|
||||
private translate: TranslateService,
|
||||
private dateUtilitiesService: DateUtilitiesService,
|
||||
private cd: ChangeDetectorRef,
|
||||
@Inject(DOCUMENT) private document: any,
|
||||
@ -166,6 +169,11 @@ export class DayListComponent {
|
||||
this.dateChoices.splice(index, 1);
|
||||
this.cd.detectChanges();
|
||||
this.focusOnChoice(index - 1 < 0 ? 0 : index - 1);
|
||||
|
||||
this.translate.get('success.deleted_day').subscribe((resp) => {
|
||||
console.log('resp', resp);
|
||||
this.toastService.display(`${resp}`);
|
||||
});
|
||||
}
|
||||
|
||||
isWeekendDay(date_input: string) {
|
||||
|
@ -22,7 +22,7 @@
|
||||
</span>
|
||||
</button>
|
||||
<button class="button delete-date is-block" (click)="StorageService.choicesText.splice(ii, 1)">
|
||||
<img class="icon" src="assets/icons/trash.svg" />
|
||||
<img class="icon" src="assets/icons/trash-2.svg" />
|
||||
{{ 'choices.delete' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -183,6 +183,8 @@
|
||||
"link": "Public link to share",
|
||||
"label": "Check your poll",
|
||||
"action": "See my poll",
|
||||
"deleted_option": "Option removed",
|
||||
"deleted_day": "Date removed",
|
||||
"admins": "Admin side",
|
||||
"users": "Respondent side",
|
||||
"links_mail": "Receive links by email",
|
||||
|
@ -89,7 +89,7 @@
|
||||
"add": "Ajouter date",
|
||||
"element": "Date",
|
||||
"format_helper": "JJ/MM/AAAA",
|
||||
"remove": "Supprimer la date",
|
||||
"remove": "Supprimer date",
|
||||
"add_time": "Ajouter une plage horaire",
|
||||
"empty": "Vider",
|
||||
"count_dates": "choix de dates",
|
||||
@ -190,6 +190,8 @@
|
||||
"network_error": "erreur de réseau",
|
||||
"go_back": "Revenir en arrière",
|
||||
"copy": "Copier",
|
||||
"deleted_option": "Option supprimée",
|
||||
"deleted_day": "Date supprimée",
|
||||
"copy_message": "Texte copié :"
|
||||
},
|
||||
"visibility": {
|
||||
|
Loading…
Reference in New Issue
Block a user