feat: add thai text to notification
This commit is contained in:
parent
17b92b4012
commit
f583448e5f
4 changed files with 22 additions and 22 deletions
|
|
@ -231,8 +231,8 @@ export class QuotationPayment extends Controller {
|
||||||
if (quotation.quotationStatus !== res.quotationStatus)
|
if (quotation.quotationStatus !== res.quotationStatus)
|
||||||
await tx.notification.create({
|
await tx.notification.create({
|
||||||
data: {
|
data: {
|
||||||
title: "Quotation Status Updated",
|
title: "สถานะใบเสนอราคาเปลี่ยนแปลง / Quotation Status Updated",
|
||||||
detail: res.code + " " + res.quotationStatus,
|
detail: "รหัส / code : " + res.code + " " + res.quotationStatus,
|
||||||
receiverId: res.createdByUserId,
|
receiverId: res.createdByUserId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -642,8 +642,8 @@ export class QuotationController extends Controller {
|
||||||
|
|
||||||
await prisma.notification.create({
|
await prisma.notification.create({
|
||||||
data: {
|
data: {
|
||||||
title: "New Quotation",
|
title: "ใบเสนอราคาใหม่ / New Quotation",
|
||||||
detail: "New quotation: " + ret.code,
|
detail: "รหัส / code : " + ret.code,
|
||||||
registeredBranchId: ret.registeredBranchId,
|
registeredBranchId: ret.registeredBranchId,
|
||||||
groupReceiver: { create: [{ name: "accountant" }, { name: "head_of_accountant" }] },
|
groupReceiver: { create: [{ name: "accountant" }, { name: "head_of_accountant" }] },
|
||||||
},
|
},
|
||||||
|
|
@ -1176,8 +1176,8 @@ export class QuotationActionController extends Controller {
|
||||||
.then(async (ret) => {
|
.then(async (ret) => {
|
||||||
await prisma.notification.create({
|
await prisma.notification.create({
|
||||||
data: {
|
data: {
|
||||||
title: "New Request",
|
title: "รายการคำขอใหม่ / New Request",
|
||||||
detail: "New request: " + ret.requestData.map((v) => v.code).join(", "),
|
detail: "รหัส / code : " + ret.requestData.map((v) => v.code).join(", "),
|
||||||
registeredBranchId: ret.registeredBranchId,
|
registeredBranchId: ret.registeredBranchId,
|
||||||
groupReceiver: { create: { name: "document_checker" } },
|
groupReceiver: { create: { name: "document_checker" } },
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -280,8 +280,8 @@ export class RequestDataActionController extends Controller {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await tx.notification.createMany({
|
await tx.notification.createMany({
|
||||||
data: res.map((v) => ({
|
data: res.map((v) => ({
|
||||||
title: "Quotation Status Updated",
|
title: "สถานะใบเสนอราคาเปลี่ยนแปลง / Quotation Status Updated",
|
||||||
detail: v.code + " Canceled",
|
detail: "รหัส / code : " + v.code + " Canceled",
|
||||||
receiverId: v.createdByUserId,
|
receiverId: v.createdByUserId,
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
|
|
@ -428,8 +428,8 @@ export class RequestDataActionController extends Controller {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await tx.notification.createMany({
|
await tx.notification.createMany({
|
||||||
data: res.map((v) => ({
|
data: res.map((v) => ({
|
||||||
title: "Quotation Status Updated",
|
title: "สถานะใบเสนอราคาเปลี่ยนแปลง / Quotation Status Updated",
|
||||||
detail: v.code + " Canceled",
|
detail: "รหัส / code : " + v.code + " Canceled",
|
||||||
receiverId: v.createdByUserId,
|
receiverId: v.createdByUserId,
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
|
|
@ -519,8 +519,8 @@ export class RequestDataActionController extends Controller {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await tx.notification.createMany({
|
await tx.notification.createMany({
|
||||||
data: res.map((v) => ({
|
data: res.map((v) => ({
|
||||||
title: "Quotation Status Updated",
|
title: "สถานะใบเสนอราคาเปลี่ยนแปลง / Quotation Status Updated",
|
||||||
detail: v.code + " Completed",
|
detail: "รหัส / code : " + v.code + " Completed",
|
||||||
receiverId: v.createdByUserId,
|
receiverId: v.createdByUserId,
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
|
|
@ -856,8 +856,8 @@ export class RequestListController extends Controller {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await tx.notification.createMany({
|
await tx.notification.createMany({
|
||||||
data: res.map((v) => ({
|
data: res.map((v) => ({
|
||||||
title: "Quotation Status Updated",
|
title: "สถานะใบเสนอราคาเปลี่ยนแปลง / Quotation Status Updated",
|
||||||
detail: v.code + " Canceled",
|
detail: "รหัส / code : " + v.code + " Canceled",
|
||||||
receiverId: v.createdByUserId,
|
receiverId: v.createdByUserId,
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
|
|
@ -948,8 +948,8 @@ export class RequestListController extends Controller {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await tx.notification.createMany({
|
await tx.notification.createMany({
|
||||||
data: res.map((v) => ({
|
data: res.map((v) => ({
|
||||||
title: "Quotation Status Updated",
|
title: "สถานะใบเสนอราคาเปลี่ยนแปลง / Quotation Status Updated",
|
||||||
detail: v.code + " Completed",
|
detail: "รหัส / code : " + v.code + " Completed",
|
||||||
receiverId: v.createdByUserId,
|
receiverId: v.createdByUserId,
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -520,8 +520,8 @@ export class TaskController extends Controller {
|
||||||
if (body.taskOrderStatus && record.taskOrderStatus !== body.taskOrderStatus) {
|
if (body.taskOrderStatus && record.taskOrderStatus !== body.taskOrderStatus) {
|
||||||
await prisma.notification.create({
|
await prisma.notification.create({
|
||||||
data: {
|
data: {
|
||||||
title: "Task Submitted",
|
title: "มีการส่งงาน / Task Submitted",
|
||||||
detail: "Task submitted in order: " + record.code,
|
detail: "รหัสใบสั่งงาน / Order : " + record.code,
|
||||||
receiverId: record.createdByUserId,
|
receiverId: record.createdByUserId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -666,8 +666,8 @@ export class TaskActionController extends Controller {
|
||||||
}),
|
}),
|
||||||
prisma.notification.create({
|
prisma.notification.create({
|
||||||
data: {
|
data: {
|
||||||
title: "Task Submitted",
|
title: "มีการส่งงาน / Task Submitted",
|
||||||
detail: "Task submitted in order: " + record.code,
|
detail: "รหัสใบสั่งงาน / Order : " + record.code,
|
||||||
receiverId: record.createdByUserId,
|
receiverId: record.createdByUserId,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
@ -824,8 +824,8 @@ export class TaskActionController extends Controller {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await tx.notification.createMany({
|
await tx.notification.createMany({
|
||||||
data: res.map((v) => ({
|
data: res.map((v) => ({
|
||||||
title: "Quotation Status Updated",
|
title: "สถานะใบเสนอราคาเปลี่ยนแปลง / Quotation Status Updated",
|
||||||
detail: v.code + " Completed",
|
detail: "รหัส / code : " + v.code + " Completed",
|
||||||
receiverId: v.createdByUserId,
|
receiverId: v.createdByUserId,
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue