Hey Guys ! In my App I have one tab that shows jobs that the the client and admin can create them but I don’t want the employee see the button …
when the client create a job I don’t want it to show on the list of jobs in the tab until the admin approve the job … so I thought I have to add “status” and par default “false” whenever a client create a job
So guys how can I do it ??
async addJob() {
await this.presentLoading();
this.job.userId = this.authService.getAuth().currentUser.uid;
if (this.jobID) {
try {
await this.jobService.updateJob(this.jobID, this.job);
await this.loading.dismiss();
this.router.navigateByUrl("/app/tabs/traveaux");
} catch (error) {
this.presentToast('Erreur en essayant de sauvegarder');
this.loading.dismiss();
}
} else {
this.job.createdDt = new Date().getTime();
try {
await this.jobService.addJob(this.job);
await this.loading.dismiss();
this.router.navigateByUrl("/app/tabs/traveaux");
} catch (error) {
this.presentToast('Erreur en essayant de sauvegarder');
this.loading.dismiss();
}
}
}