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
@@ -15,7 +15,7 @@
//
-->
<script lang="ts">
import { EmployeeAccount } from '@hcengineering/contact'
import { Employee, PersonAccount } from '@hcengineering/contact'
import { Data, generateId, getCurrentAccount, Ref } from '@hcengineering/core'
import { CollaboratorDocument, Document, DocumentVersionState } from '@hcengineering/document'
import { Card, getClient } from '@hcengineering/presentation'
@@ -29,7 +29,7 @@
}
const id = generateId()
const currentUser = getCurrentAccount() as EmployeeAccount
const currentUser = getCurrentAccount() as PersonAccount
const object: Data<Document> = {
name: '',
@@ -40,7 +40,7 @@
version: 0,
latest: 0.1,
approvers: [],
authors: [currentUser.employee],
authors: [currentUser.person as Ref<Employee>],
reviewers: [],
requests: 0
}
@@ -16,7 +16,7 @@
-->
<script lang="ts">
import { Attachments } from '@hcengineering/attachment-resources'
import { EmployeeAccount } from '@hcengineering/contact'
import { Employee, PersonAccount } from '@hcengineering/contact'
import core, { Class, Doc, generateId, getCurrentAccount, Ref, WithLookup } from '@hcengineering/core'
import {
CollaboratorDocument,
@@ -85,7 +85,7 @@
}
}
const currentUser = getCurrentAccount() as EmployeeAccount
const currentUser = getCurrentAccount() as PersonAccount
onDestroy(async () => {
notificationClient.then((client) => client.read(_id))
@@ -93,7 +93,7 @@
let requests: DocumentRequest[] = []
$: myRequests = requests.filter((it) => it.assignee === currentUser.employee)
$: myRequests = requests.filter((it) => it.assignee === currentUser.person)
$: approveRequest = myRequests.find((it) => it.kind === DocumentRequestKind.Approve)
$: allApproveRequest = requests.find((it) => it.kind === DocumentRequestKind.Approve)
@@ -229,7 +229,7 @@
)
}
$: readonly = !documentObject?.authors.includes(currentUser.employee)
$: readonly = !documentObject?.authors.includes(currentUser.person as Ref<Employee>)
let autoSelect = true
@@ -1,9 +1,9 @@
<script lang="ts">
import { EmployeeAccount } from '@hcengineering/contact'
import { getCurrentAccount } from '@hcengineering/core'
import { Employee, PersonAccount } from '@hcengineering/contact'
import { Ref, getCurrentAccount } from '@hcengineering/core'
import Documents from './Documents.svelte'
const currentUser = getCurrentAccount() as EmployeeAccount
const currentUser = (getCurrentAccount() as PersonAccount).person as Ref<Employee>
</script>
<Documents query={{ authors: currentUser.employee }} />
<Documents query={{ authors: currentUser }} />