EQMS-1463 hot fix (#8093)

This commit is contained in:
Denis Bykhov 2025-02-26 06:55:43 +05:00 committed by GitHub
parent c7cd7e2afa
commit af22062112
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View File

@ -72,7 +72,7 @@
await client.createDoc(contact.class.Person, contact.space.Contacts, person, id) await client.createDoc(contact.class.Person, contact.space.Contacts, person, id)
await client.createMixin(id, contact.class.Person, contact.space.Contacts, contact.mixin.Employee, { await client.createMixin(id, contact.class.Person, contact.space.Contacts, contact.mixin.Employee, {
active: false active: true
}) })
const mail = email.trim().toLowerCase() const mail = email.trim().toLowerCase()

View File

@ -39,7 +39,7 @@
function isEditable (owner: boolean, object: Person): boolean { function isEditable (owner: boolean, object: Person): boolean {
if (owner) return true if (owner) return true
if (!h.hasMixin(object, contact.mixin.Employee)) 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) $: editable = !readonly && isEditable(owner, object)

View File

@ -83,8 +83,7 @@ test.describe('contact tests', () => {
await contractPage.fillEmailInput(mail) await contractPage.fillEmailInput(mail)
await contractPage.clickCreateButton() await contractPage.clickCreateButton()
await contractPage.waitForFormAntiCardDetached() 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 // 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) await contractPage.expectKickEmployeeShowsInactiveStatus(first, last)
}) })