Merge remote-tracking branch 'origin/feature/breadcrumb/fix_localize'

This commit is contained in:
Ahmed Bouhuolia
2020-05-20 07:06:15 +02:00
78 changed files with 833 additions and 538 deletions

View File

@@ -63,8 +63,8 @@ function MakeJournalEntriesForm({
}, [changePageTitle, changePageSubtitle, manualJournal]);
const validationSchema = Yup.object().shape({
journal_number: Yup.string().required(),
date: Yup.date().required(),
journal_number: Yup.string().required().label(formatMessage({id:'journal_number_'})),
date: Yup.date().required().label(formatMessage({id:'date'})),
reference: Yup.string(),
description: Yup.string(),
entries: Yup.array().of(
@@ -147,7 +147,7 @@ function MakeJournalEntriesForm({
// Validate the total credit should be eqials total debit.
if (totalCredit !== totalDebit) {
AppToaster.show({
message: 'credit_and_debit_not_equal',
message: formatMessage({id:'credit_and_debit_not_equal'}),
});
setSubmitting(false);
return;

View File

@@ -26,11 +26,11 @@ function MakeJournalEntriesPage({
const handleFormSubmit = useCallback((payload) => {
payload.redirect &&
history.push('/dashboard/accounting/manual-journals');
history.push('/manual-journals');
}, [history]);
const handleCancel = useCallback(() => {
history.push('/dashboard/accounting/manual-journals');
history.push('/manual-journals');
}, [history]);
return (

View File

@@ -54,7 +54,7 @@ function ManualJournalActionsBar({
});
const onClickNewManualJournal = useCallback(() => {
history.push('/dashboard/accounting/make-journal-entry');
history.push('/make-journal-entry');
}, [history]);
const filterDropdown = FilterDropdown({

View File

@@ -122,7 +122,7 @@ function ManualJournalsTable({
const handleEditJournal = useCallback(
(journal) => {
history.push(`/dashboard/accounting/manual-journals/${journal.id}/edit`);
history.push(`/manual-journals/${journal.id}/edit`);
},
[history]
);
@@ -182,8 +182,8 @@ function ManualJournalsTable({
<Route
exact={true}
path={[
'/dashboard/accounting/manual-journals/:custom_view_id/custom_view',
'/dashboard/accounting/manual-journals',
'/manual-journals/:custom_view_id/custom_view',
'/manual-journals',
]}>
<ManualJournalsViewTabs />

View File

@@ -41,7 +41,7 @@ function ManualJournalsViewTabs({
const handleClickNewView = () => {
setTopbarEditView(null);
history.push('/dashboard/custom_views/manual_journals/new');
history.push('/custom_views/manual_journals/new');
};
const handleViewLinkClick = () => {
setTopbarEditView(customViewId);
@@ -63,7 +63,7 @@ function ManualJournalsViewTabs({
}, [customViewId]);
const tabs = manualJournalsViews.map((view) => {
const baseUrl = '/dashboard/accounting/manual-journals';
const baseUrl = '/manual-journals';
const link = (
<Link
to={`${baseUrl}/${view.id}/custom_view`}