mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
TSK-1017 В activity изменить текст с "создал(а) тег" на "добавил(а) тег" (#3081)
* Change activity label Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com> * TSK-1098: All issues related fixes (#3079) Signed-off-by: Andrey Sobolev <haiodo@gmail.com> Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com> --------- Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com> Signed-off-by: Andrey Sobolev <haiodo@gmail.com> Co-authored-by: Andrey Sobolev <haiodo@users.noreply.github.com>
This commit is contained in:
parent
db90c6e88c
commit
da2a7ec9c6
@ -4,6 +4,7 @@
|
||||
"Edit": "Edit",
|
||||
"Edited": "edited",
|
||||
"DocCreated": "created {_class}",
|
||||
"DocAdded": "added {_class}",
|
||||
"DocDeleted": "deleted {_class}",
|
||||
"Activity": "Activity",
|
||||
"Changed": "changed",
|
||||
|
@ -4,6 +4,7 @@
|
||||
"Edit": "Редактировать",
|
||||
"Edited": "отредактировал(а)",
|
||||
"DocCreated": "создал(а) {_class}",
|
||||
"DocAdded": "добавил(а) {_class}",
|
||||
"DocDeleted": "удалил(а) {_class}",
|
||||
"Activity": "Активность",
|
||||
"Changed": "изменил(а)",
|
||||
|
@ -20,6 +20,7 @@ import { mergeIds } from '@hcengineering/platform'
|
||||
export default mergeIds(activityId, activity, {
|
||||
string: {
|
||||
DocCreated: '' as IntlString,
|
||||
DocAdded: '' as IntlString,
|
||||
DocDeleted: '' as IntlString,
|
||||
CollectionUpdated: '' as IntlString,
|
||||
All: '' as IntlString
|
||||
|
@ -109,7 +109,7 @@ export async function updateViewlet (
|
||||
let iconComponent: AnyComponent | undefined
|
||||
|
||||
if (viewlet === undefined) {
|
||||
;({ viewlet, model } = await checkInlineViewlets(dtx, viewlet, client, model))
|
||||
;({ viewlet, model } = await checkInlineViewlets(dtx, viewlet, client, model, dtx.isOwnTx))
|
||||
if (model !== undefined) {
|
||||
// Check for State attribute
|
||||
for (const a of model) {
|
||||
@ -133,14 +133,15 @@ async function checkInlineViewlets (
|
||||
dtx: DisplayTx,
|
||||
viewlet: TxDisplayViewlet,
|
||||
client: TxOperations,
|
||||
model: AttributeModel[]
|
||||
model: AttributeModel[],
|
||||
isOwn: boolean
|
||||
): Promise<{ viewlet: TxDisplayViewlet, model: AttributeModel[] }> {
|
||||
if (dtx.collectionAttribute !== undefined && (dtx.txDocIds?.size ?? 0) > 1) {
|
||||
// Check if we have a class presenter we could have a pseudo viewlet based on class presenter.
|
||||
viewlet = await createPseudoViewlet(client, dtx, activity.string.CollectionUpdated, 'inline')
|
||||
} else if (dtx.tx._class === core.class.TxCreateDoc) {
|
||||
// Check if we have a class presenter we could have a pseudo viewlet based on class presenter.
|
||||
viewlet = await createPseudoViewlet(client, dtx, activity.string.DocCreated)
|
||||
viewlet = await createPseudoViewlet(client, dtx, isOwn ? activity.string.DocCreated : activity.string.DocAdded)
|
||||
} else if (dtx.tx._class === core.class.TxRemoveDoc) {
|
||||
viewlet = await createPseudoViewlet(client, dtx, activity.string.DocDeleted)
|
||||
} else if (dtx.tx._class === core.class.TxUpdateDoc || dtx.tx._class === core.class.TxMixin) {
|
||||
|
Loading…
Reference in New Issue
Block a user