checkpoint

This commit is contained in:
rizky 2024-10-08 05:38:02 -07:00
parent a883a03b28
commit 4ca0e8db3a
4 changed files with 11 additions and 4 deletions

View File

@ -276,10 +276,10 @@ export const formInit = (fm: FMLocal, props: FMProps) => {
toast.error(
<div className="c-flex c-text-red-600 c-items-center">
<AlertTriangle className="c-h-4 c-w-4 c-mr-1" />
Save Failed
{translate("Save Failed")}
{count > 0 &&
`, please correct
${count} errors`}
`, ${translate("please correct")}
${count} ${translate("errors")}`}
.
</div>,
{

View File

@ -12,6 +12,7 @@ export const toast = {
toasting: [] as any[],
dismiss: () => {
if (!timer.timeout) {
console.log(toast.toasting);
if (toast.toasting.length > 0) {
for (const t of toast.toasting) {
sonner.dismiss(t.id);

View File

@ -10,5 +10,8 @@ export const langEn = {
"Remove this file ?": "Remove this file ?",
"Upload Multiple Files":"Upload Multiple Files",
"Back To List": "Back To List",
"is required": "is required"
"is required": "is required",
"Save Failed": "Save Failed",
"please correct": "please correct",
"errors": "errors"
};

View File

@ -13,4 +13,7 @@ export const langId: Record<LangKeyword, string> = {
"Upload Multiple Files": "Unggah Beberapa File",
"Back To List": "Kembali ke List",
"is required": "harus diisi",
"Save Failed": "Gagal Menyimpan",
"please correct": "mohon benahi",
"errors": "kesalahan berikut"
};