forked from tykayn/funky-framadate-front
Merge branch 'ng-init' of https://framagit.org/framasoft/framadate/funky-framadate-front into ng-init
This commit is contained in:
commit
912a9340f3
3
.gitignore
vendored
3
.gitignore
vendored
@ -45,3 +45,6 @@ testem.log
|
|||||||
# System Files
|
# System Files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
|
# Editor-specific configuration
|
||||||
|
.vscode/
|
||||||
|
@ -22,6 +22,10 @@ import { EndConfirmationComponent } from './pages/end-confirmation/end-confirmat
|
|||||||
import { CreateOrRetrieveComponent } from './pages/create-or-retrieve/create-or-retrieve.component';
|
import { CreateOrRetrieveComponent } from './pages/create-or-retrieve/create-or-retrieve.component';
|
||||||
import { CalendarComponent } from './calendar/calendar.component';
|
import { CalendarComponent } from './calendar/calendar.component';
|
||||||
|
|
||||||
|
import { registerLocaleData } from '@angular/common';
|
||||||
|
import localeFr from '@angular/common/locales/fr';
|
||||||
|
|
||||||
|
registerLocaleData(localeFr, 'fr');
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
* une option de date dans les sondages spéciaux
|
* une option de date dans les sondages spéciaux
|
||||||
*/
|
*/
|
||||||
export interface DateOption {
|
export interface DateOption {
|
||||||
text: string;
|
literal: string;
|
||||||
start?: string;
|
|
||||||
end?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<div i18n>
|
<div i18n>
|
||||||
Config spécialement pour les dates
|
Config spécialement pour les dates
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<select
|
<select
|
||||||
name="multi_hours"
|
name="multi_hours"
|
||||||
@ -10,15 +11,18 @@
|
|||||||
<option value="true">possiblement différents</option>
|
<option value="true">possiblement différents</option>
|
||||||
<option value="false">identiques</option>
|
<option value="false">identiques</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label for="multi_hours">
|
<label for="multi_hours">
|
||||||
<span i18n>
|
<span i18n>
|
||||||
Je souhaite mettre des créneaux horaires
|
Je souhaite mettre des créneaux horaires
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span i18n>
|
<span i18n>
|
||||||
pour chaque journée
|
pour chaque journée
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
(click)="addDate()"
|
(click)="addDate()"
|
||||||
@ -31,15 +35,24 @@
|
|||||||
<span i18n>
|
<span i18n>
|
||||||
choix de Dates
|
choix de Dates
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
*ngFor="let choice of config.dateList"
|
*ngFor="let choice of config.dateList; index as id"
|
||||||
class="date-choice"
|
class="date-choice"
|
||||||
>
|
>
|
||||||
{{choice.text}}
|
<input
|
||||||
|
type="text"
|
||||||
|
name="dateChoices[]"
|
||||||
|
[(ngModel)]="choice.literal"
|
||||||
|
>
|
||||||
|
|
||||||
|
<button (click)="config.dateList.splice(id, 1)">X</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
[routerLink]="'/step/end'"
|
[routerLink]="'/step/end'"
|
||||||
class="btn btn-block"
|
class="btn btn-block"
|
||||||
>C'est parfait!
|
>
|
||||||
|
C'est parfait!
|
||||||
</a>
|
</a>
|
||||||
|
@ -8,7 +8,6 @@ import {BaseComponent} from '../base-page/base.component';
|
|||||||
styleUrls: ['./dates.component.scss']
|
styleUrls: ['./dates.component.scss']
|
||||||
})
|
})
|
||||||
export class DatesComponent extends BaseComponent implements OnInit {
|
export class DatesComponent extends BaseComponent implements OnInit {
|
||||||
|
|
||||||
constructor(public config: ConfigService) {
|
constructor(public config: ConfigService) {
|
||||||
super(config);
|
super(config);
|
||||||
}
|
}
|
||||||
@ -17,6 +16,6 @@ export class DatesComponent extends BaseComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addDate() {
|
addDate() {
|
||||||
console.log('TODO');
|
this.config.dateList.push({ literal: '' });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user