mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
Adding basic date filling
This commit is contained in:
parent
4bb851640b
commit
9031b60178
@ -21,6 +21,10 @@ import { AnswersComponent } from './pages/answers/answers.component';
|
||||
import { EndConfirmationComponent } from './pages/end-confirmation/end-confirmation.component';
|
||||
import { CreateOrRetrieveComponent } from './page/create-or-retrieve/create-or-retrieve.component';
|
||||
|
||||
import { registerLocaleData } from '@angular/common';
|
||||
import localeFr from '@angular/common/locales/fr';
|
||||
|
||||
registerLocaleData(localeFr, 'fr');
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
|
@ -2,9 +2,7 @@
|
||||
* une option de date dans les sondages spéciaux
|
||||
*/
|
||||
export interface DateOption {
|
||||
text: string;
|
||||
start?: string;
|
||||
end?: string;
|
||||
literal: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,7 @@
|
||||
<div i18n>
|
||||
Config spécialement pour les dates
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<select
|
||||
name="multi_hours"
|
||||
@ -10,15 +11,18 @@
|
||||
<option value="true">possiblement différents</option>
|
||||
<option value="false">identiques</option>
|
||||
</select>
|
||||
|
||||
<label for="multi_hours">
|
||||
<span i18n>
|
||||
Je souhaite mettre des créneaux horaires
|
||||
</span>
|
||||
|
||||
<span i18n>
|
||||
pour chaque journée
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
(click)="addDate()"
|
||||
@ -31,15 +35,24 @@
|
||||
<span i18n>
|
||||
choix de Dates
|
||||
</span>
|
||||
|
||||
<div
|
||||
*ngFor="let choice of config.dateList"
|
||||
*ngFor="let choice of config.dateList; index as id"
|
||||
class="date-choice"
|
||||
>
|
||||
{{choice.text}}
|
||||
<input
|
||||
type="text"
|
||||
name="dateChoices[]"
|
||||
[(ngModel)]="choice.literal"
|
||||
>
|
||||
|
||||
<button (click)="config.dateList.splice(id, 1)">X</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a
|
||||
[routerLink]="'/step/end'"
|
||||
class="btn btn-block"
|
||||
>C'est parfait!
|
||||
>
|
||||
C'est parfait!
|
||||
</a>
|
||||
|
@ -8,7 +8,6 @@ import {BaseComponent} from '../base-page/base.component';
|
||||
styleUrls: ['./dates.component.scss']
|
||||
})
|
||||
export class DatesComponent extends BaseComponent implements OnInit {
|
||||
|
||||
constructor(public config: ConfigService) {
|
||||
super(config);
|
||||
}
|
||||
@ -17,6 +16,6 @@ export class DatesComponent extends BaseComponent implements OnInit {
|
||||
}
|
||||
|
||||
addDate() {
|
||||
console.log('TODO');
|
||||
this.config.dateList.push({ literal: '' });
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user