mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-01 04:35:46 +00:00
EQMS-1463 hot fix (#8093)
This commit is contained in:
parent
c7cd7e2afa
commit
af22062112
@ -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()
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
@ -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)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user