UBER-665: Rename EmployeeAccount->PersonAccount (#3550)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-08-05 01:06:21 +07:00
committed by GitHub
parent 9acc1b86a0
commit 161d26ebeb
181 changed files with 1215 additions and 1159 deletions
@@ -13,7 +13,7 @@
// limitations under the License.
-->
<script lang="ts">
import { EmployeeAccount } from '@hcengineering/contact'
import { PersonAccount } from '@hcengineering/contact'
import { Class, Doc, DocumentQuery, getCurrentAccount, Ref } from '@hcengineering/core'
import { IntlString } from '@hcengineering/platform'
import { createQuery, getClient } from '@hcengineering/presentation'
@@ -39,8 +39,8 @@
let search = ''
const dispatch = createEventDispatcher()
const currentUser = getCurrentAccount() as EmployeeAccount
const assigned = { assignee: currentUser.employee }
const currentUser = getCurrentAccount() as PersonAccount
const assigned = { assignee: currentUser.person }
const created = { createdBy: currentUser._id }
let subscribed = { _id: { $in: [] as Ref<Task>[] } }
let mode: string | undefined = undefined
@@ -85,7 +85,7 @@
showPopup(
UsersPopup,
{
_class: contact.class.Employee,
_class: contact.mixin.Employee,
selected: employeeValue?._id,
docQuery: {
active: true
@@ -110,7 +110,7 @@
shouldShowName={shouldShowLabel}
onEmployeeEdit={handleAssigneeEditorOpened}
tooltipLabels={{
personLabel: employeeValue ? getEmbeddedLabel(getName(employeeValue)) : undefined,
personLabel: employeeValue ? getEmbeddedLabel(getName(client.getHierarchy(), employeeValue)) : undefined,
placeholderLabel: placeholderLabel ?? presenter.label
}}
/>
@@ -52,7 +52,7 @@
if (attrClass === core.class.RefTo) {
return (attribute.type as RefTo<Doc>).to
}
return contact.class.Employee
return contact.mixin.Employee
}
const taskKeys = ['status', 'assignee', 'doneState']