fix: messages appToaster.

This commit is contained in:
elforjani3
2021-01-25 18:47:24 +02:00
parent 3d080244e6
commit 9fa329bef5
32 changed files with 175 additions and 187 deletions

View File

@@ -189,8 +189,8 @@ function MakeJournalEntriesForm({
message: formatMessage(
{
id: isNewMode
? 'the_journal_has_been_successfully_created'
: 'the_journal_has_been_successfully_edited',
? 'the_journal_has_been_created_successfully'
: 'the_journal_has_been_edited_successfully',
},
{ number: values.journal_number },
),

View File

@@ -95,7 +95,7 @@ function ManualJournalsTable({
requestDeleteManualJournal(deleteManualJournal.id).then(() => {
AppToaster.show({
message: formatMessage(
{ id: 'the_journal_has_been_successfully_deleted' },
{ id: 'the_journal_has_been_deleted_successfully' },
{ number: deleteManualJournal.journal_number },
),
intent: Intent.SUCCESS,
@@ -123,7 +123,7 @@ function ManualJournalsTable({
setBulkDelete(false);
AppToaster.show({
message: formatMessage(
{ id: 'the_journals_has_been_successfully_deleted' },
{ id: 'the_journals_has_been_deleted_successfully' },
{ count: selectedRowsCount },
),
intent: Intent.SUCCESS,

View File

@@ -178,8 +178,8 @@ function CustomerForm({
AppToaster.show({
message: formatMessage({
id: customer
? 'the_item_customer_has_been_successfully_edited'
: 'the_customer_has_been_successfully_created',
? 'the_item_customer_has_been_edited_successfully'
: 'the_customer_has_been_created_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -108,7 +108,7 @@ function CustomersList({
setDeleteCustomer(false);
AppToaster.show({
message: formatMessage({
id: 'the_customer_has_been_successfully_deleted',
id: 'the_customer_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -172,7 +172,7 @@ function CustomersList({
setBulkDelete(false);
AppToaster.show({
message: formatMessage({
id: 'the_customers_has_been_successfully_deleted',
id: 'the_customers_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -78,8 +78,8 @@ function AccountFormDialogContent({
message: formatMessage(
{
id: isNewMode
? 'service_has_been_successful_created'
: 'service_has_been_successful_edited',
? 'service_has_been_created_successfully'
: 'service_has_been_edited_successfully',
},
{
name: toastAccountName,

View File

@@ -85,7 +85,7 @@ function CurencyFormDialogContent({
closeDialog(dialogName);
AppToaster.show({
message: formatMessage({
id: 'the_currency_has_been_successfully_edited',
id: 'the_currency_has_been_edited_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -101,7 +101,7 @@ function CurencyFormDialogContent({
closeDialog(dialogName);
AppToaster.show({
message: formatMessage({
id: 'the_currency_has_been_successfully_created',
id: 'the_currency_has_been_created_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -112,7 +112,7 @@ function ExchangeRateFormDialogContent({
closeDialog(dialogName);
AppToaster.show({
message: formatMessage({
id: 'the_exchange_rate_has_been_successfully_edited',
id: 'the_exchange_rate_has_been_edited_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -128,7 +128,7 @@ function ExchangeRateFormDialogContent({
closeDialog(dialogName);
AppToaster.show({
message: formatMessage({
id: 'the_exchange_rate_has_been_successfully_created',
id: 'the_exchange_rate_has_been_created_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -89,7 +89,7 @@ function InventoryAdjustmentFormDialogContent({
AppToaster.show({
message: formatMessage({
id: 'the_make_adjustment_has_been_successfully_created',
id: 'the_make_adjustment_has_been_created_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -103,8 +103,8 @@ function ItemCategoryFormDialogContent({
AppToaster.show({
message: formatMessage({
id: isNewMode
? 'the_item_category_has_been_successfully_created'
: 'the_item_category_has_been_successfully_edited',
? 'the_item_category_has_been_created_successfully'
: 'the_item_category_has_been_edited_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -75,7 +75,7 @@ function ExchangeRatesList({
setDeleteExchangeRate(false);
AppToaster.show({
message: formatMessage({
id: 'the_exchange_rates_has_been_successfully_deleted',
id: 'the_exchange_rates_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -152,8 +152,8 @@ function ExpenseForm({
message: formatMessage(
{
id: isNewMode
? 'the_expense_has_been_successfully_created'
: 'the_expense_has_been_successfully_edited',
? 'the_expense_has_been_created_successfully'
: 'the_expense_has_been_edited_successfully',
},
{ number: values.payment_account_id },
),

View File

@@ -83,7 +83,7 @@ function ExpensesList({
requestDeleteExpense(deleteExpense.id).then(() => {
AppToaster.show({
message: formatMessage(
{ id: 'the_expense_has_been_successfully_deleted' },
{ id: 'the_expense_has_been_deleted_successfully' },
{ number: deleteExpense.payment_account_id },
),
intent: Intent.SUCCESS,
@@ -110,7 +110,7 @@ function ExpensesList({
.then(() => {
AppToaster.show({
message: formatMessage(
{ id: 'the_expenses_have_been_successfully_deleted' },
{ id: 'the_expenses_have_been_deleted_successfully' },
{ count: selectedRowsCount },
),
intent: Intent.SUCCESS,

View File

@@ -69,7 +69,7 @@ function InventoryAdjustmentList({
setDeleteInventoryAdjustment(false);
AppToaster.show({
message: formatMessage({
id: 'the_adjustment_has_been_successfully_deleted',
id: 'the_adjustment_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -131,7 +131,7 @@ function ItemsList({
.then(() => {
AppToaster.show({
message: formatMessage({
id: 'the_item_has_been_successfully_deleted',
id: 'the_item_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -187,7 +187,7 @@ function ItemsList({
setBulkDelete(false);
AppToaster.show({
message: formatMessage({
id: 'the_items_has_been_successfully_deleted',
id: 'the_items_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -219,7 +219,7 @@ function ItemsList({
setInactiveItem(false);
AppToaster.show({
message: formatMessage({
id: 'the_item_has_been_successfully_inactivated',
id: 'the_item_has_been_inactivated_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -247,7 +247,7 @@ function ItemsList({
setActivateItem(false);
AppToaster.show({
message: formatMessage({
id: 'the_item_has_been_successfully_activated',
id: 'the_item_has_been_activated_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -57,7 +57,7 @@ function CurrenciesList({
setDeleteCurrencyState(false);
AppToaster.show({
message: formatMessage({
id: 'the_currency_has_been_successfully_deleted',
id: 'the_currency_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -57,7 +57,7 @@ function GeneralPreferences({
.then((response) => {
AppToaster.show({
message: formatMessage({
id: 'the_options_has_been_successfully_created',
id: 'the_options_has_been_created_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -53,7 +53,7 @@ function UsersListPreferences({
setInactiveUserState(false);
AppToaster.show({
message: formatMessage({
id: 'the_user_has_been_successfully_inactivated',
id: 'the_user_has_been_inactivated_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -86,7 +86,7 @@ function UsersListPreferences({
setDeleteUserState(false);
AppToaster.show({
message: formatMessage({
id: 'the_user_has_been_successfully_deleted',
id: 'the_user_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -151,8 +151,8 @@ function BillForm({
message: formatMessage(
{
id: isNewMode
? 'the_bill_has_been_successfully_created' :
'the_bill_has_been_successfully_edited',
? 'the_bill_has_been_created_successfully' :
'the_bill_has_been_edited_successfully',
},
{ number: values.bill_number },
),

View File

@@ -83,7 +83,7 @@ function BillsList({
requestDeleteBill(deleteBill.id).then(() => {
AppToaster.show({
message: formatMessage({
id: 'the_bill_has_been_successfully_deleted',
id: 'the_bill_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -108,7 +108,7 @@ function BillsList({
setOpenBill(false);
AppToaster.show({
message: formatMessage({
id: 'the_bill_has_been_successfully_opened',
id: 'the_bill_has_been_opened_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -150,8 +150,8 @@ function PaymentMadeForm({
AppToaster.show({
message: formatMessage({
id: paymentMadeId
? 'the_payment_made_has_been_successfully_edited'
: 'the_payment_made_has_been_successfully_created',
? 'the_payment_made_has_been_edited_successfully'
: 'the_payment_made_has_been_created_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -78,7 +78,7 @@ function PaymentMadeList({
requestDeletePaymentMade(deletePaymentMade.id).then(() => {
AppToaster.show({
message: formatMessage({
id: 'the_payment_made_has_been_successfully_deleted',
id: 'the_payment_made_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -195,8 +195,8 @@ const EstimateForm = ({
message: formatMessage(
{
id: isNewMode
? 'the_estimate_has_been_successfully_edited'
: 'the_estimate_has_been_successfully_created',
? 'the_estimate_has_been_edited_successfully'
: 'the_estimate_has_been_created_successfully',
},
{ number: values.estimate_number },
),

View File

@@ -86,7 +86,7 @@ function EstimatesList({
requestDeleteEstimate(deleteEstimate.id).then(() => {
AppToaster.show({
message: formatMessage({
id: 'the_estimate_has_been_successfully_deleted',
id: 'the_estimate_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -111,7 +111,7 @@ function EstimatesList({
setDeliverEstimate(false);
AppToaster.show({
message: formatMessage({
id: 'the_estimate_has_been_successfully_delivered',
id: 'the_estimate_has_been_delivered_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -139,7 +139,7 @@ function EstimatesList({
setApproveEstimate(false);
AppToaster.show({
message: formatMessage({
id: 'the_estimate_has_been_successfully_approved',
id: 'the_estimate_has_been_approved_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -167,7 +167,7 @@ function EstimatesList({
setRejectEstimate(false);
AppToaster.show({
message: formatMessage({
id: 'the_estimate_has_been_successfully_rejected',
id: 'the_estimate_has_been_rejected_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -179,8 +179,8 @@ function InvoiceForm({
message: formatMessage(
{
id: isNewMode
? 'the_invocie_has_been_successfully_created'
: 'the_invoice_has_been_successfully_edited',
? 'the_invoice_has_been_created_successfully'
: 'the_invoice_has_been_edited_successfully',
},
{ number: values.invoice_no },
),

View File

@@ -100,7 +100,7 @@ function InvoicesList({
setDeleteInvoice(false);
AppToaster.show({
message: formatMessage({
id: 'the_invoice_has_been_successfully_deleted',
id: 'the_invoice_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -128,7 +128,7 @@ function InvoicesList({
setDeliverInvoice(false);
AppToaster.show({
message: formatMessage({
id: 'the_invoice_has_been_successfully_delivered',
id: 'the_invoice_has_been_delivered_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -78,7 +78,7 @@ function PaymentReceiveList({
requestDeletePaymentReceive(deletePaymentReceive.id).then(() => {
AppToaster.show({
message: formatMessage({
id: 'the_payment_receive_has_been_successfully_deleted',
id: 'the_payment_receive_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -194,8 +194,8 @@ function ReceiptForm({
message: formatMessage(
{
id: isNewMode
? 'the_receipt_has_been_successfully_created'
: 'the_receipt_has_been_successfully_edited',
? 'the_receipt_has_been_created_successfully'
: 'the_receipt_has_been_edited_successfully',
},
{ number: values.receipt_number },
),

View File

@@ -75,7 +75,7 @@ function ReceiptsList({
requestDeleteReceipt(deleteReceipt.id).then(() => {
AppToaster.show({
message: formatMessage({
id: 'the_receipt_has_been_successfully_deleted',
id: 'the_receipt_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});
@@ -100,7 +100,7 @@ function ReceiptsList({
setCloseReceipt(false);
AppToaster.show({
message: formatMessage({
id: 'the_receipt_has_been_successfully_closed',
id: 'the_receipt_has_been_closed_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -114,8 +114,8 @@ function VendorForm({
AppToaster.show({
message: formatMessage({
id: isNewMode
? 'the_vendor_has_been_successfully_created'
: 'the_item_vendor_has_been_successfully_edited',
? 'the_vendor_has_been_created_successfully'
: 'the_item_vendor_has_been_edited_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -100,7 +100,7 @@ function VendorsList({
setDeleteVendor(false);
AppToaster.show({
message: formatMessage({
id: 'the_vendor_has_been_successfully_deleted',
id: 'the_vendor_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});

View File

@@ -77,7 +77,7 @@ function ViewFormPage({
setStateDeleteView(null);
AppToaster.show({
message: formatMessage({
id: 'the_custom_view_has_been_successfully_deleted',
id: 'the_custom_view_has_been_deleted_successfully',
}),
intent: Intent.SUCCESS,
});