diff --git a/plugins/contact-resources/src/components/CreateEmployee.svelte b/plugins/contact-resources/src/components/CreateEmployee.svelte index ec906813e7..53deb38eef 100644 --- a/plugins/contact-resources/src/components/CreateEmployee.svelte +++ b/plugins/contact-resources/src/components/CreateEmployee.svelte @@ -72,7 +72,7 @@ await client.createDoc(contact.class.Person, contact.space.Contacts, person, id) await client.createMixin(id, contact.class.Person, contact.space.Contacts, contact.mixin.Employee, { - active: false + active: true }) const mail = email.trim().toLowerCase() diff --git a/plugins/contact-resources/src/components/EditPerson.svelte b/plugins/contact-resources/src/components/EditPerson.svelte index 285cb63187..0595f753ed 100644 --- a/plugins/contact-resources/src/components/EditPerson.svelte +++ b/plugins/contact-resources/src/components/EditPerson.svelte @@ -39,7 +39,7 @@ function isEditable (owner: boolean, object: Person): boolean { if (owner) return true if (!h.hasMixin(object, contact.mixin.Employee)) return true - return hasAccountRole(account, AccountRole.Maintainer) && !h.as(object, contact.mixin.Employee).active + return hasAccountRole(account, AccountRole.Maintainer) } $: editable = !readonly && isEditable(owner, object) diff --git a/tests/sanity/tests/contacts.spec.ts b/tests/sanity/tests/contacts.spec.ts index f358b119ad..1cfeaad96e 100644 --- a/tests/sanity/tests/contacts.spec.ts +++ b/tests/sanity/tests/contacts.spec.ts @@ -83,8 +83,7 @@ test.describe('contact tests', () => { await contractPage.fillEmailInput(mail) await contractPage.clickCreateButton() await contractPage.waitForFormAntiCardDetached() - // employee already inactive - // await contractPage.kickEmployee(first, last) + await contractPage.kickEmployee(first, last) // In non refactored code, the last assert just checks if the employee does exist, not if it has inactive status await contractPage.expectKickEmployeeShowsInactiveStatus(first, last) })