fix(SPG-710) ganti warning cancel jadi bahasa indonesia
parent
58cf3f7ab0
commit
19386c336e
|
@ -25,7 +25,7 @@ export class RolesGuard extends JWTGuard {
|
|||
if (isNotAllow) {
|
||||
throw new ForbiddenException({
|
||||
statusCode: 10003,
|
||||
message: `Forbidden Access, you don't have access to this module!`,
|
||||
message: `Akses Terlarang, anda tidak punya akses ke module ini!`,
|
||||
error: 'ACCESS_FORBIDDEN',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ export class PrivilegeService {
|
|||
if (!moduleKey) {
|
||||
throw new ForbiddenException({
|
||||
statusCode: 10005,
|
||||
message: `Forbidden Access, access Module is Require!`,
|
||||
message: `Akses Terlarang, anda tidak punya akses ke module ini!`,
|
||||
error: 'MODULE_KEY_NOT_FOUND',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -43,9 +43,9 @@ export class CheckDuplicateHelper {
|
|||
if (data_exists > 0) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Entity with ${columnCheck.column} : ${
|
||||
message: `Gagal! Data dengan ${columnCheck.column} : ${
|
||||
this.entity[columnCheck.column]
|
||||
} already exist`,
|
||||
} telah ada`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ export abstract class BaseBatchDeleteManager<Entity> extends BaseManager {
|
|||
if (!entity) {
|
||||
throw new NotFoundException({
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
message: `Failed! Entity with id ${id} not found`,
|
||||
message: `Gagal! data dengan id ${id} tidak ditemukan`,
|
||||
error: 'Entity Not Found',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ export abstract class BaseBatchUpdateStatusManager<Entity> extends BaseManager {
|
|||
if (!entity) {
|
||||
throw new NotFoundException({
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
message: `Failed! Entity with id ${id} not found`,
|
||||
message: `Gagal! data dengan id ${id} tidak ditemukan`,
|
||||
error: 'Entity Not Found',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ export abstract class BaseChangePosition<Entity> extends BaseManager {
|
|||
if (!this.data?.end || this.data.start == this.data?.end) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: 'Please drag to another position',
|
||||
message: 'Gagal! tolong pindahkan ke posisi lain',
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ export abstract class BaseChangePosition<Entity> extends BaseManager {
|
|||
if (!this.startData) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Entity with id : ${this.data.start} not found`,
|
||||
message: `Gagal! data dengan id : ${this.data.start} tidak ditemukan`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ export abstract class BaseChangePosition<Entity> extends BaseManager {
|
|||
if (!this.endData) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Entity with id : ${this.data.end} not found`,
|
||||
message: `Gagal! data dengan id : ${this.data.end} tidak ditemukan`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export abstract class BaseDeleteManager<Entity> extends BaseManager {
|
|||
if (!this.data)
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Data with id ${this.dataId} not found`,
|
||||
message: `Gagal! Data denga id ${this.dataId} tidak ditemukan`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ export abstract class BaseUpdateManager<Entity> extends BaseManager {
|
|||
if (!this.oldData) {
|
||||
throw new NotFoundException({
|
||||
statusCode: HttpStatus.NOT_FOUND,
|
||||
message: `Failed! Entity with id ${this.dataId} not found`,
|
||||
message: `Gagal! Data denga id ${this.dataId} tidak ditemukan`,
|
||||
error: 'Entity Not Found',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ export class LoginManager extends BaseCustomManager<UserEntity> {
|
|||
throwError() {
|
||||
throw new UnauthorizedException({
|
||||
statusCode: HttpStatus.UNAUTHORIZED,
|
||||
message: `Failed! You have entered an invalid username or password`,
|
||||
message: `Gagal! username atau password tidak sesuai`,
|
||||
error: 'Unauthorized',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ export class ActiveItemManager extends BaseUpdateStatusManager<ItemEntity> {
|
|||
{
|
||||
relation: 'tenant',
|
||||
singleQuery: ['status', '!=', STATUS.ACTIVE],
|
||||
message: `Failed! Tenant of item must be active first`,
|
||||
message: `Gagal! Belum ada item yang aktif`,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ export class BatchActiveItemManager extends BaseBatchUpdateStatusManager<ItemEnt
|
|||
{
|
||||
relation: 'tenant',
|
||||
singleQuery: ['status', '!=', STATUS.ACTIVE],
|
||||
message: `Failed! Tenant of item must be active first`,
|
||||
message: `Gagal! Belum ada item yang aktif`,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ export class BatchConfirmItemManager extends BaseBatchUpdateStatusManager<ItemEn
|
|||
{
|
||||
relation: 'tenant',
|
||||
singleQuery: ['status', '!=', STATUS.ACTIVE],
|
||||
message: `Failed! Tenant of item must be active first`,
|
||||
message: `Gagal! Belum ada item yang aktif`,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ export class ConfirmItemManager extends BaseUpdateStatusManager<ItemEntity> {
|
|||
{
|
||||
relation: 'tenant',
|
||||
singleQuery: ['status', '!=', STATUS.ACTIVE],
|
||||
message: `Failed! Tenant of item must be active first`,
|
||||
message: `Gagal! Belum ada item yang aktif`,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ export async function validateRelation(dataService, id) {
|
|||
if (haveRelation) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! this data already connected to bunding item`,
|
||||
message: `Gagal! data telah digunakan untuk bundling`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ export async function ValidateSeasonPeriodHelper(dataService, data) {
|
|||
if (datas.length > 0) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! there is another season period in same range date`,
|
||||
message: `Gagal! terdapat data periode dengan rentang tanggal yang sama`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ export class UpdateSeasonPeriodPriceManager extends BaseCustomManager<SeasonPeri
|
|||
if (!existSeason) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! There is no season type ${this.data.season_period.name}`,
|
||||
message: `Gagagl! Tidak terdapat data denga tipe season ${this.data.season_period.name}`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ export class BatchCancelReconciliationManager extends BaseBatchUpdateStatusManag
|
|||
if ([STATUS.SETTLED, STATUS.WAITING].includes(transaction.status)) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! cant cancel transaction not settled`,
|
||||
message: `Gagal! tidak bisa batalkan, karena status transaksi tidak settled`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ export class BatchCancelReconciliationManager extends BaseBatchUpdateStatusManag
|
|||
if (data.is_recap_transaction) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! cant cancel recap data`,
|
||||
message: `Gagagl! tidak dapat batalkan data rekap`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -30,13 +30,13 @@ export class CancelReconciliationManager extends BaseUpdateStatusManager<Transac
|
|||
if ([STATUS.SETTLED, STATUS.WAITING].includes(transaction.status)) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! cant cancel transaction not settled`,
|
||||
message: `Gagal! tidak bisa batalkan, karena status transaksi tidak settled`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
} else if (this.data.is_recap_transaction) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! cant cancel recap data`,
|
||||
message: `Gagagl! tidak dapat batalkan data rekap`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -25,13 +25,13 @@ export class BatchConfirmRefundManager extends BaseBatchUpdateStatusManager<Refu
|
|||
) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! only transaction with status ${STATUS.SETTLED} can be refund`,
|
||||
message: `Gagal! hanya data dengan status ${STATUS.SETTLED} dapat dikembalikan`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
} else if (![STATUS.DRAFT, STATUS.PENDING].includes(data.status)) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! only data with status ${STATUS.DRAFT} and ${STATUS.PENDING} can be confirmed`,
|
||||
message: `Gagal! hanya data dengan status ${STATUS.DRAFT} and ${STATUS.PENDING} dapat di${this.dataStatus}`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export class ConfirmRefundManager extends BaseUpdateStatusManager<RefundEntity>
|
|||
if (![STATUS.DRAFT, STATUS.PENDING].includes(this.oldData.status)) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! only data with status ${STATUS.DRAFT} and ${STATUS.PENDING} can be confirmed`,
|
||||
message: `Gagal! hanya data dengan status ${STATUS.DRAFT} dan ${STATUS.PENDING} dapat di${this.dataStatus}`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ export class ConfirmRefundManager extends BaseUpdateStatusManager<RefundEntity>
|
|||
) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! only transaction with status ${STATUS.SETTLED} can be refund`,
|
||||
message: `Gagal! hanya pemesanan dengan status ${STATUS.SETTLED} dapat di${this.dataStatus}`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ export class CreateRefundManager extends BaseCreateManager<RefundEntity> {
|
|||
if (exist) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! refund transaction with invoice ${this.data.transaction.invoice_code} already exist`,
|
||||
message: `Gagal! pengembalian pemesanan dengan nomor invoice ${this.data.transaction.invoice_code} telah dibuat`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ export class CreateRefundManager extends BaseCreateManager<RefundEntity> {
|
|||
if (!transaction) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! only transaction with status ${STATUS.SETTLED} can be refund`,
|
||||
message: `Gagal! hanya pemesanan dengan status ${STATUS.SETTLED} dapat dikembalikan`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ export class UpdateRefundManager extends BaseUpdateManager<RefundEntity> {
|
|||
if (!transaction) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! only transaction with status ${STATUS.SETTLED} can be refund`,
|
||||
message: `Gagal! hanya pemesanan dengan status ${STATUS.SETTLED} yang dapat dikembalikan`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ function returnError(throwError, e, taxes) {
|
|||
if (throwError) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! Formula error`,
|
||||
message: `Gagal! Formula error`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -9,7 +9,7 @@ export async function validateUsedInFormula(formulaDataService, name) {
|
|||
if (allWords.find((item) => item.toLowerCase() == name))
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! tax ${name} already used in ${formula.type} formula`,
|
||||
message: `Gagal! pajak dengan nama ${name} telah dogunakan pada formula ${formula.type}`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
});
|
||||
|
|
|
@ -40,7 +40,7 @@ export class BatchConfirmDataTransactionManager extends BaseBatchUpdateStatusMan
|
|||
) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Gagal! hanya pemesanan dengan status ${STATUS.PENDING}, ${STATUS.REJECTED}, ${STATUS.EXPIRED} dapat dikonfirmasi`,
|
||||
message: `Gagal! hanya pemesanan dengan status ${STATUS.PENDING}, ${STATUS.REJECTED}, ${STATUS.EXPIRED} dapat di${this.dataStatus}`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ export class BatchConfirmTransactionManager extends BaseBatchUpdateStatusManager
|
|||
if (data.status != STATUS.DRAFT) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! only data booking with status ${STATUS.ACTIVE} can be confirm`,
|
||||
message: `Gagal! hanya data booking dengan status ${STATUS.DRAFT} yang dapat di${this.dataStatus}`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ export class BatchConfirmTransactionManager extends BaseBatchUpdateStatusManager
|
|||
} catch (error) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! this transaction already created, please check your email to continue payment`,
|
||||
message: `Gagal! transaksi telah terbuat, silahkan periksa email untuk melanjutkan pembayaran`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export class CancelTransactionManager extends BaseUpdateStatusManager<Transactio
|
|||
if (![STATUS.EXPIRED, STATUS.PENDING].includes(this.data.status)) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! only data booking with status ${STATUS.ACTIVE} can be confirm`,
|
||||
message: `Gagal! hanya tranksaksi dengan status ${STATUS.PENDING} dan ${STATUS.EXPIRED} yang dapat di${this.dataStatus}`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ export class ConfirmTransactionManager extends BaseUpdateStatusManager<Transacti
|
|||
if (this.oldData.status != STATUS.DRAFT) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! only data booking with status ${STATUS.ACTIVE} can be confirm`,
|
||||
message: `Gagal! hanya data booking dengan status ${STATUS.DRAFT} yang dapat di${this.dataStatus}`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ export class ConfirmTransactionManager extends BaseUpdateStatusManager<Transacti
|
|||
} catch (error) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! this transaction already created, please check your email to continue payment`,
|
||||
message: `Gagal! transaksi telah terbuat, silahkan periksa email untuk melanjutkan pembayaran`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ export class BatchDeleteTenantManager extends BaseBatchDeleteManager<UserEntity>
|
|||
statuses: [STATUS.ACTIVE],
|
||||
});
|
||||
},
|
||||
message: 'Failed! There is active item',
|
||||
message: 'Gagal! terdapat item yang aktif',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ export class BatchInactiveTenantManager extends BaseBatchUpdateStatusManager<Use
|
|||
statuses: [STATUS.ACTIVE],
|
||||
});
|
||||
},
|
||||
message: 'Failed! There is active item',
|
||||
message: 'Gagal! terdapat item yang aktif',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ export class DeleteTenantManager extends BaseDeleteManager<UserEntity> {
|
|||
statuses: [STATUS.ACTIVE],
|
||||
});
|
||||
},
|
||||
message: 'Failed! There is active item',
|
||||
message: 'Gagal! terdapat item yang aktif',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ export class InactiveTenantManager extends BaseUpdateStatusManager<UserEntity> {
|
|||
statuses: [STATUS.ACTIVE],
|
||||
});
|
||||
},
|
||||
message: 'Failed! There is active item',
|
||||
message: 'Gagal! terdapat item yang aktif',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ export async function validateItemGate(dataService, data, id?) {
|
|||
if (existCode) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! Gate with code ${data.code} already exist`,
|
||||
message: `Gagal! Gate dengan kode ${data.code} telah ada`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ export async function validateItemGate(dataService, data, id?) {
|
|||
if (existType) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! Gate type ${data.type} with item ${data.item.name} already exist`,
|
||||
message: `Gagal! Gate tipe ${data.type} dengan item ${data.item.name} telah ada`,
|
||||
error: 'Unprocessable Entity',
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue