Skip to content
Snippets Groups Projects
Commit 4c0b3b06 authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

rename acknowledge

parent 80db63d2
No related branches found
No related tags found
1 merge request!983feat(dashboard) : create dashboard !
Pipeline #124226 passed
......@@ -2,39 +2,19 @@ export interface IOrientation {
type?: string;
accompanimentType?: string;
need: string[];
personOriented: {
name: string;
surname: string;
email?: string;
phone?: string;
};
address?: {
numero: string;
street: string;
postcode: string;
commune: string;
inseeCode: string;
};
personOriented: { name: string; surname: string; email?: string; phone?: string };
address?: { numero: string; street: string; postcode: string; commune: string; inseeCode: string };
structureChoice: string[];
socialWorker?: string;
dateSlot?: {
day: string;
hours: string;
};
dateSlot?: { day: string; hours: string };
language?: 'Français' | 'Anglais' | 'Arabe' | null;
pmr?: boolean;
comments?: string;
orientator: string;
structureOrientator:
| string
| {
structureName: string;
structureMail: string;
structurePhone: string;
};
structureOrientator: string | { structureName: string; structureMail: string; structurePhone: string };
status: 'new' | 'waiting' | 'appointmentBooked' | 'appointmentDatePassed' | 'completed' | 'uncompleted' | 'expired';
action: 'acknowledged' | 'defineAppointment' | 'waitAppointment' | 'waitVisit' | 'closeRDV';
action: 'acknowledge' | 'defineAppointment' | 'waitAppointment' | 'waitVisit' | 'closeRDV';
modifiedBy?: string;
appointmentDate?: string;
processingComment?: string;
......
......@@ -76,10 +76,7 @@ export class OrientationDetailsComponent implements OnInit {
public acknowledgeNewOrientation(): void {
if (this.orientation.status === 'new') {
this.patchOrientation({
status: 'acknowledged',
modifiedBy: this.userProfile._id,
});
this.patchOrientation({ status: 'waiting', modifiedBy: this.userProfile._id });
}
}
......
export const Status = {
new: {
label: 'Nouveau',
color: 'dark-blue',
icon: 'new',
},
waiting: {
label: 'En attente',
color: 'blue',
icon: 'eye',
},
appointmentBooked: {
label: 'RDV pris',
color: 'light-green',
icon: 'calendarGreen',
},
appointmentDatePassed: {
label: 'RDV passé',
color: 'grey',
icon: 'rdvDone',
},
completed: {
label: 'Terminé',
color: 'light-green',
icon: 'tick',
},
uncompleted: {
label: 'Non réalisé',
color: 'red',
icon: 'redCross',
},
expired: {
label: 'Expiré',
color: 'grey',
icon: 'greyCross',
},
new: { label: 'Nouveau', color: 'dark-blue', icon: 'new' },
waiting: { label: 'En attente', color: 'blue', icon: 'eye' },
appointmentBooked: { label: 'RDV pris', color: 'light-green', icon: 'calendarGreen' },
appointmentDatePassed: { label: 'RDV passé', color: 'grey', icon: 'rdvDone' },
completed: { label: 'Terminé', color: 'light-green', icon: 'tick' },
uncompleted: { label: 'Non réalisé', color: 'red', icon: 'redCross' },
expired: { label: 'Expiré', color: 'grey', icon: 'greyCross' },
} as const;
export type StatusKey = keyof typeof Status;
export const Action = {
acknowledged: {
label: 'Accuser réception',
color: 'dark-blue',
icon: 'new',
},
defineAppointment: {
label: 'Définir le RDV',
color: 'blue',
icon: 'calendar',
},
waitAppointment: {
label: 'Attendre le RDV',
color: 'grey',
icon: 'pedestrian',
},
waitVisit: {
label: 'Attendre la visite',
color: 'grey',
icon: 'pedestrian',
},
closeRDV: {
label: 'Clôturer le RDV',
color: 'grey',
icon: 'rdvDone',
},
acknowledge: { label: 'Accuser réception', color: 'dark-blue', icon: 'new' },
defineAppointment: { label: 'Définir le RDV', color: 'blue', icon: 'calendar' },
waitAppointment: { label: 'Attendre le RDV', color: 'grey', icon: 'pedestrian' },
waitVisit: { label: 'Attendre la visite', color: 'grey', icon: 'pedestrian' },
closeRDV: { label: 'Clôturer le RDV', color: 'grey', icon: 'rdvDone' },
} as const;
export type ActionsKey = keyof typeof Action;
export const Type = {
appointment: {
label: 'Rendez-vous',
color: 'grey',
icon: 'rdvDone',
initialAction: 'defineRdv',
},
structuresList: {
label: 'Visite',
color: 'grey',
icon: 'pedestrian',
initialAction: 'visit',
},
onlineMediation: {
label: 'Appel',
color: 'grey',
icon: 'call',
initialAction: 'rdvTaken',
},
appointment: { label: 'Rendez-vous', color: 'grey', icon: 'rdvDone', initialAction: 'defineRdv' },
structuresList: { label: 'Visite', color: 'grey', icon: 'pedestrian', initialAction: 'visit' },
onlineMediation: { label: 'Appel', color: 'grey', icon: 'call', initialAction: 'rdvTaken' },
} as const;
export type TypeKey = keyof typeof Type;
......@@ -21,7 +21,6 @@
"
(click)="navigateToDetails($event, orientation._id)"
(keyup.enter)="navigateToDetails($event, orientation._id)"
(onclick)="orientationSeen()"
>
<div>
<div class="name">{{ orientation.personOriented.name }} {{ orientation.personOriented.surname | uppercase }}</div>
......
......@@ -16,15 +16,8 @@ export class OrientationsTableComponent {
@Input() orientations: any[];
@Input() from: string;
public orientationSeen(): void {
// TODO : changer le status de l'orientation => A traiter (acknowledged)
console.log('coucou');
}
public navigateToDetails(event: Event, orientationId: string): void {
event.preventDefault();
this.router.navigate(['/profil/details-orientation', orientationId], {
queryParams: { from: this.from },
});
this.router.navigate(['/profil/details-orientation', orientationId], { queryParams: { from: this.from } });
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment