From c6fc35cfaabf13f7fb510b445817c895f2c990eb Mon Sep 17 00:00:00 2001
From: Vyacheslav Tumanov <me@slavatumanov.me>
Date: Tue, 4 Apr 2023 13:39:35 +0500
Subject: [PATCH] TSK-1013: add position field to Employee (#2874)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
---
 models/contact/src/index.ts         | 3 +++
 plugins/contact-assets/lang/en.json | 5 +++--
 plugins/contact-assets/lang/ru.json | 5 +++--
 plugins/contact/src/index.ts        | 4 +++-
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/models/contact/src/index.ts b/models/contact/src/index.ts
index 5dbb7ba47f..5a51ad86f8 100644
--- a/models/contact/src/index.ts
+++ b/models/contact/src/index.ts
@@ -162,6 +162,9 @@ export class TEmployee extends TPerson implements Employee {
 
   @Prop(TypeString(), contact.string.DisplayName)
     displayName?: string | null
+
+  @Prop(TypeString(), contact.string.Position)
+    position?: string | null
 }
 
 @Model(contact.class.EmployeeAccount, core.class.Account)
diff --git a/plugins/contact-assets/lang/en.json b/plugins/contact-assets/lang/en.json
index db5d135c2d..8589005218 100644
--- a/plugins/contact-assets/lang/en.json
+++ b/plugins/contact-assets/lang/en.json
@@ -88,6 +88,7 @@
     "CategoryProjectLead": "Project lead",
     "CategoryCurrentUser": "Current user",    
     "CategoryOther": "Other",
-    "NumberMembers": "{count, plural, =0 {no members} =1 {1 member} other {# members}}"
+    "NumberMembers": "{count, plural, =0 {no members} =1 {1 member} other {# members}}",
+    "Position": "Position"
   }
-}
\ No newline at end of file
+}
diff --git a/plugins/contact-assets/lang/ru.json b/plugins/contact-assets/lang/ru.json
index 32c0e160c8..cb203c43ed 100644
--- a/plugins/contact-assets/lang/ru.json
+++ b/plugins/contact-assets/lang/ru.json
@@ -88,6 +88,7 @@
     "CategoryPreviousAssigned": "Ранее назначенные",
     "CategoryProjectLead": "Руководитель проекта",
     "CategoryProjectMembers": "Участники проекта",
-    "CategoryOther": "Прочие"
+    "CategoryOther": "Прочие",
+    "Position": "Должность"
   }
-}
\ No newline at end of file
+}
diff --git a/plugins/contact/src/index.ts b/plugins/contact/src/index.ts
index fcf5cf2d2f..024734edba 100644
--- a/plugins/contact/src/index.ts
+++ b/plugins/contact/src/index.ts
@@ -131,6 +131,7 @@ export interface Employee extends Person {
   mergedTo?: Ref<Employee>
   statuses?: number
   displayName?: string | null
+  position?: string | null
 }
 
 /**
@@ -244,7 +245,8 @@ export const contactPlugin = plugin(contactId, {
     UseColor: '' as IntlString,
     PersonFirstNamePlaceholder: '' as IntlString,
     PersonLastNamePlaceholder: '' as IntlString,
-    DisplayName: '' as IntlString
+    DisplayName: '' as IntlString,
+    Position: '' as IntlString
   },
   viewlet: {
     TableMember: '' as Ref<Viewlet>,