On peut maintenant passer à "null" une date qui avait déjà une valeur. Ceci s'applique uniquement aux dates possiblement null

pull/18/head
Clement FERRERE 2 years ago
parent 9903742ce1
commit fb9dea14ed
  1. 4
      src/app/components/collaborateur/collaborateur-edit/collaborateur-edit.component.ts
  2. 5
      src/app/components/periode-essai/periode-essai-edit/periode-essai-edit.component.ts
  3. 4
      src/app/components/referencement/referencement-edit/referencement-edit.component.ts

@ -103,8 +103,8 @@ export class CollaborateurEditComponent implements OnInit {
this.collaborateur.childrenNumber = this.registerForm.value.childrenNumber this.collaborateur.childrenNumber = this.registerForm.value.childrenNumber
this.collaborateur.status = this.registerForm.value.status this.collaborateur.status = this.registerForm.value.status
if (this.registerForm.value.resignationDate != undefined) { if (this.registerForm.value.resignationDate == undefined) {
this.collaborateur.resignationDate = this.registerForm.value.resignationDate this.collaborateur.resignationDate = new Date();
} }
console.log(this.collaborateur) console.log(this.collaborateur)

@ -85,10 +85,13 @@ export class PeriodeEssaiEditComponent implements OnInit {
this.periodeEssai.comment = this.registerForm.value.comment this.periodeEssai.comment = this.registerForm.value.comment
this.periodeEssai.collaborateurId = this.registerForm.value.collaborateurId this.periodeEssai.collaborateurId = this.registerForm.value.collaborateurId
this.periodeEssai.issue = this.registerForm.value.issue this.periodeEssai.issue = this.registerForm.value.issue
this.periodeEssai.plannedEndingDate = this.registerForm.value.plannedEndingDate
this.periodeEssai.realEndingDate = this.registerForm.value.realEndingDate this.periodeEssai.realEndingDate = this.registerForm.value.realEndingDate
this.periodeEssai.startingDate = this.registerForm.value.startingDate this.periodeEssai.startingDate = this.registerForm.value.startingDate
if (this.registerForm.value.plannedEndingDate == undefined) {
this.periodeEssai.plannedEndingDate = new Date();
}
if (this.periodeEssai){ if (this.periodeEssai){
this.periodeEssaiService.updatePeriodeEssai(this.periodeEssai) this.periodeEssaiService.updatePeriodeEssai(this.periodeEssai)
.subscribe(() => { .subscribe(() => {

@ -71,8 +71,8 @@ export class ReferencementEditComponent implements OnInit {
this.referencement.referrerId = this.registerForm.value.referrerId this.referencement.referrerId = this.registerForm.value.referrerId
this.referencement.startingDate = this.registerForm.value.startingDate this.referencement.startingDate = this.registerForm.value.startingDate
if (this.registerForm.value.endingDate != undefined) { if (this.registerForm.value.endingDate == undefined) {
this.referencement.endingDate = this.registerForm.value.endingDate this.referencement.endingDate = new Date()
} }
console.log(this.referencement) console.log(this.referencement)

Loading…
Cancel
Save