mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
feat(warehouse): add credit & edit & delete warehouse.
This commit is contained in:
77
src/containers/Alerts/Warehouses/WarehouseDeleteAlert.js
Normal file
77
src/containers/Alerts/Warehouses/WarehouseDeleteAlert.js
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import intl from 'react-intl-universal';
|
||||||
|
import { FormattedMessage as T, FormattedHTMLMessage } from 'components';
|
||||||
|
import { Intent, Alert } from '@blueprintjs/core';
|
||||||
|
import { AppToaster } from 'components';
|
||||||
|
import { useDeleteWarehouse } from 'hooks/query';
|
||||||
|
|
||||||
|
import withAlertStoreConnect from 'containers/Alert/withAlertStoreConnect';
|
||||||
|
import withAlertActions from 'containers/Alert/withAlertActions';
|
||||||
|
|
||||||
|
import { compose } from 'utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Warehouse delete alert
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function WarehouseDeleteAlert({
|
||||||
|
name,
|
||||||
|
|
||||||
|
// #withAlertStoreConnect
|
||||||
|
isOpen,
|
||||||
|
payload: { warehouseId },
|
||||||
|
|
||||||
|
// #withAlertActions
|
||||||
|
closeAlert,
|
||||||
|
}) {
|
||||||
|
const { mutateAsync: deleteWarehouseMutate, isLoading } =
|
||||||
|
useDeleteWarehouse();
|
||||||
|
|
||||||
|
// handle cancel delete warehouse alert.
|
||||||
|
const handleCancelDeleteAlert = () => {
|
||||||
|
closeAlert(name);
|
||||||
|
};
|
||||||
|
|
||||||
|
// handleConfirm delete invoice
|
||||||
|
const handleConfirmWarehouseDelete = () => {
|
||||||
|
deleteWarehouseMutate(warehouseId)
|
||||||
|
.then(() => {
|
||||||
|
AppToaster.show({
|
||||||
|
message: intl.get('warehouse.alert.delete_message'),
|
||||||
|
intent: Intent.SUCCESS,
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(
|
||||||
|
({
|
||||||
|
response: {
|
||||||
|
data: { errors },
|
||||||
|
},
|
||||||
|
}) => {},
|
||||||
|
)
|
||||||
|
.finally(() => {
|
||||||
|
closeAlert(name);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Alert
|
||||||
|
cancelButtonText={<T id={'cancel'} />}
|
||||||
|
confirmButtonText={<T id={'delete'} />}
|
||||||
|
icon="trash"
|
||||||
|
intent={Intent.DANGER}
|
||||||
|
isOpen={isOpen}
|
||||||
|
onCancel={handleCancelDeleteAlert}
|
||||||
|
onConfirm={handleConfirmWarehouseDelete}
|
||||||
|
loading={isLoading}
|
||||||
|
>
|
||||||
|
<p>
|
||||||
|
<FormattedHTMLMessage id={'warehouse.once_delete_this_warehouse'} />
|
||||||
|
</p>
|
||||||
|
</Alert>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default compose(
|
||||||
|
withAlertStoreConnect(),
|
||||||
|
withAlertActions,
|
||||||
|
)(WarehouseDeleteAlert);
|
||||||
@@ -19,7 +19,8 @@ import CurrenciesAlerts from '../Preferences/Currencies/CurrenciesAlerts';
|
|||||||
import RolesAlerts from '../Preferences/Users/Roles/RolesAlerts';
|
import RolesAlerts from '../Preferences/Users/Roles/RolesAlerts';
|
||||||
import CreditNotesAlerts from '../Sales/CreditNotes/CreditNotesAlerts';
|
import CreditNotesAlerts from '../Sales/CreditNotes/CreditNotesAlerts';
|
||||||
import VendorCreditNotesAlerts from '../Purchases/CreditNotes/VendorCreditNotesAlerts';
|
import VendorCreditNotesAlerts from '../Purchases/CreditNotes/VendorCreditNotesAlerts';
|
||||||
import TransactionsLockingAlerts from '../TransactionsLocking/TransactionsLockingAlerts'
|
import TransactionsLockingAlerts from '../TransactionsLocking/TransactionsLockingAlerts';
|
||||||
|
import WarehousesAlerts from '../Preferences/Warehouses/WarehousesAlerts';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
...AccountsAlerts,
|
...AccountsAlerts,
|
||||||
@@ -43,5 +44,6 @@ export default [
|
|||||||
...RolesAlerts,
|
...RolesAlerts,
|
||||||
...CreditNotesAlerts,
|
...CreditNotesAlerts,
|
||||||
...VendorCreditNotesAlerts,
|
...VendorCreditNotesAlerts,
|
||||||
...TransactionsLockingAlerts
|
...TransactionsLockingAlerts,
|
||||||
|
...WarehousesAlerts,
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,20 +1,26 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Formik } from 'formik';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
|
import { Formik } from 'formik';
|
||||||
|
import { Intent } from '@blueprintjs/core';
|
||||||
|
|
||||||
|
import { AppToaster } from 'components';
|
||||||
import { CreateWarehouseFormSchema } from './WarehouseForm.schema';
|
import { CreateWarehouseFormSchema } from './WarehouseForm.schema';
|
||||||
import { useWarehouseFormContext } from './WarehouseFormProvider';
|
import { useWarehouseFormContext } from './WarehouseFormProvider';
|
||||||
import WarehouseFormContent from './WarehouseFormContent';
|
import WarehouseFormContent from './WarehouseFormContent';
|
||||||
|
|
||||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||||
import { compose } from 'utils';
|
import { compose, transformToForm } from 'utils';
|
||||||
|
|
||||||
const defaultInitialValues = {
|
const defaultInitialValues = {
|
||||||
warehouse_name: '',
|
name: '',
|
||||||
warehouse_address_1: '',
|
code: '',
|
||||||
warehouse_address_2: '',
|
address: '',
|
||||||
warehouse_address_city: '',
|
city: '',
|
||||||
warehouse_address_country: '',
|
country: '',
|
||||||
phone_number: '',
|
phone_number: '',
|
||||||
|
website: '',
|
||||||
|
email: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,13 +31,50 @@ function WarehouseForm({
|
|||||||
// #withDialogActions
|
// #withDialogActions
|
||||||
closeDialog,
|
closeDialog,
|
||||||
}) {
|
}) {
|
||||||
|
const {
|
||||||
|
dialogName,
|
||||||
|
warehouse,
|
||||||
|
warehouseId,
|
||||||
|
createWarehouseMutate,
|
||||||
|
editWarehouseMutate,
|
||||||
|
} = useWarehouseFormContext();
|
||||||
|
|
||||||
// Initial form values.
|
// Initial form values.
|
||||||
const initialValues = {
|
const initialValues = {
|
||||||
...defaultInitialValues,
|
...defaultInitialValues,
|
||||||
|
...transformToForm(warehouse, defaultInitialValues),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handles the form submit.
|
// Handles the form submit.
|
||||||
const handleFormSubmit = (values, { setSubmitting, setErrors }) => {};
|
const handleFormSubmit = (values, { setSubmitting, setErrors }) => {
|
||||||
|
const form = { ...values };
|
||||||
|
|
||||||
|
// Handle request response success.
|
||||||
|
const onSuccess = (response) => {
|
||||||
|
AppToaster.show({
|
||||||
|
message: intl.get('warehouse.dialog.success_message'),
|
||||||
|
intent: Intent.SUCCESS,
|
||||||
|
});
|
||||||
|
closeDialog(dialogName);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Handle request response errors.
|
||||||
|
const onError = ({
|
||||||
|
response: {
|
||||||
|
data: { errors },
|
||||||
|
},
|
||||||
|
}) => {
|
||||||
|
if (errors) {
|
||||||
|
}
|
||||||
|
setSubmitting(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (warehouseId) {
|
||||||
|
editWarehouseMutate([warehouseId, form]).then(onSuccess).catch(onError);
|
||||||
|
} else {
|
||||||
|
createWarehouseMutate(form).then(onSuccess).catch(onError);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Formik
|
<Formik
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import * as Yup from 'yup';
|
import * as Yup from 'yup';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
import { DATATYPES_LENGTH } from 'common/dataTypes';
|
||||||
|
|
||||||
const Schema = Yup.object().shape({
|
const Schema = Yup.object().shape({
|
||||||
warehouse_name: Yup.string().required().label(intl.get('warehouse_name')),
|
name: Yup.string().required().label(intl.get('warehouse_name')),
|
||||||
warehouse_address_1: Yup.string().trim(),
|
code: Yup.string().trim().min(0).max(DATATYPES_LENGTH.STRING),
|
||||||
|
address: Yup.string().trim(),
|
||||||
warehouse_address_2: Yup.string().trim(),
|
warehouse_address_2: Yup.string().trim(),
|
||||||
warehouse_address_city: Yup.string().trim(),
|
city: Yup.string().trim(),
|
||||||
warehouse_address_country: Yup.string().trim(),
|
country: Yup.string().trim(),
|
||||||
phone_number: Yup.number(),
|
phone_number: Yup.number(),
|
||||||
|
website: Yup.string().url().nullable(),
|
||||||
|
email: Yup.string().email().nullable(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const CreateWarehouseFormSchema = Schema;
|
export const CreateWarehouseFormSchema = Schema;
|
||||||
|
|||||||
@@ -10,9 +10,10 @@ import WarehouseForm from './WarehouseForm';
|
|||||||
export default function WarehouseFormDialogContent({
|
export default function WarehouseFormDialogContent({
|
||||||
// #ownProps
|
// #ownProps
|
||||||
dialogName,
|
dialogName,
|
||||||
|
warehouseId,
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<WarehouseFormProvider dialogName={dialogName}>
|
<WarehouseFormProvider warehouseId={warehouseId} dialogName={dialogName}>
|
||||||
<WarehouseForm />
|
<WarehouseForm />
|
||||||
</WarehouseFormProvider>
|
</WarehouseFormProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -22,28 +22,44 @@ export default function WarehouseFormFields() {
|
|||||||
return (
|
return (
|
||||||
<div className={Classes.DIALOG_BODY}>
|
<div className={Classes.DIALOG_BODY}>
|
||||||
{/*------------ Warehouse Name -----------*/}
|
{/*------------ Warehouse Name -----------*/}
|
||||||
<FastField name={'warehouse_name'}>
|
<FastField name={'name'}>
|
||||||
{({ form, field, meta: { error, touched } }) => (
|
{({ form, field, meta: { error, touched } }) => (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
label={<T id={'warehouse.dialog.label.warehouse_name'} />}
|
label={<T id={'warehouse.dialog.label.warehouse_name'} />}
|
||||||
labelInfo={<FieldRequiredHint />}
|
labelInfo={<FieldRequiredHint />}
|
||||||
intent={inputIntent({ error, touched })}
|
intent={inputIntent({ error, touched })}
|
||||||
inline={true}
|
inline={true}
|
||||||
helperText={<ErrorMessage name="warehouse_name" />}
|
helperText={<ErrorMessage name="name" />}
|
||||||
className={'form-group--warehouse_name'}
|
className={'form-group--warehouse_name'}
|
||||||
>
|
>
|
||||||
<InputGroup intent={inputIntent({ error, touched })} {...field} />
|
<InputGroup intent={inputIntent({ error, touched })} {...field} />
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
)}
|
)}
|
||||||
</FastField>
|
</FastField>
|
||||||
|
|
||||||
|
{/*------------ Warehouse Code -----------*/}
|
||||||
|
<FastField name={'code'}>
|
||||||
|
{({ form, field, meta: { error, touched } }) => (
|
||||||
|
<FormGroup
|
||||||
|
label={<T id={'warehouse.dialog.label.code'} />}
|
||||||
|
intent={inputIntent({ error, touched })}
|
||||||
|
inline={true}
|
||||||
|
helperText={<ErrorMessage name="code" />}
|
||||||
|
className={'form-group--warehouse_name'}
|
||||||
|
>
|
||||||
|
<InputGroup intent={inputIntent({ error, touched })} {...field} />
|
||||||
|
</FormGroup>
|
||||||
|
)}
|
||||||
|
</FastField>
|
||||||
|
|
||||||
{/*------------ Warehouse Address -----------*/}
|
{/*------------ Warehouse Address -----------*/}
|
||||||
<FastField name={'warehouse_address_1'}>
|
<FastField name={'address'}>
|
||||||
{({ form, field, meta: { error, touched } }) => (
|
{({ form, field, meta: { error, touched } }) => (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
label={intl.get('warehouse.dialog.label.warehouse_address')}
|
label={intl.get('warehouse.dialog.label.warehouse_address')}
|
||||||
intent={inputIntent({ error, touched })}
|
intent={inputIntent({ error, touched })}
|
||||||
inline={true}
|
inline={true}
|
||||||
helperText={<ErrorMessage name="warehouse_address_1" />}
|
helperText={<ErrorMessage name="address" />}
|
||||||
className={'form-group--warehouse_address_1'}
|
className={'form-group--warehouse_address_1'}
|
||||||
>
|
>
|
||||||
<InputGroup
|
<InputGroup
|
||||||
@@ -57,24 +73,6 @@ export default function WarehouseFormFields() {
|
|||||||
)}
|
)}
|
||||||
</FastField>
|
</FastField>
|
||||||
<WarehouseAddressWrap>
|
<WarehouseAddressWrap>
|
||||||
<FastField name={'warehouse_address_2'}>
|
|
||||||
{({ form, field, meta: { error, touched } }) => (
|
|
||||||
<FormGroup
|
|
||||||
intent={inputIntent({ error, touched })}
|
|
||||||
inline={true}
|
|
||||||
helperText={<ErrorMessage name="warehouse_address_2" />}
|
|
||||||
className={'form-group--warehouse_address_2'}
|
|
||||||
>
|
|
||||||
<InputGroup
|
|
||||||
intent={inputIntent({ error, touched })}
|
|
||||||
placeholder={intl.get(
|
|
||||||
'warehouse.dialog.label.warehouse_address_2',
|
|
||||||
)}
|
|
||||||
{...field}
|
|
||||||
/>
|
|
||||||
</FormGroup>
|
|
||||||
)}
|
|
||||||
</FastField>
|
|
||||||
{/*------------ Warehouse Address City & Country-----------*/}
|
{/*------------ Warehouse Address City & Country-----------*/}
|
||||||
<FormGroup
|
<FormGroup
|
||||||
inline={true}
|
inline={true}
|
||||||
@@ -82,7 +80,7 @@ export default function WarehouseFormFields() {
|
|||||||
helperText={<ErrorMessage name="warehouse_address_city" />}
|
helperText={<ErrorMessage name="warehouse_address_city" />}
|
||||||
>
|
>
|
||||||
<ControlGroup>
|
<ControlGroup>
|
||||||
<FastField name={'warehouse_address_city'}>
|
<FastField name={'city'}>
|
||||||
{({ field, meta: { error, touched } }) => (
|
{({ field, meta: { error, touched } }) => (
|
||||||
<InputGroup
|
<InputGroup
|
||||||
intent={inputIntent({ error, touched })}
|
intent={inputIntent({ error, touched })}
|
||||||
@@ -91,7 +89,7 @@ export default function WarehouseFormFields() {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</FastField>
|
</FastField>
|
||||||
<FastField name={'warehouse_address_country'}>
|
<FastField name={'country'}>
|
||||||
{({ field, meta: { error, touched } }) => (
|
{({ field, meta: { error, touched } }) => (
|
||||||
<InputGroup
|
<InputGroup
|
||||||
intent={inputIntent({ error, touched })}
|
intent={inputIntent({ error, touched })}
|
||||||
@@ -103,6 +101,7 @@ export default function WarehouseFormFields() {
|
|||||||
</ControlGroup>
|
</ControlGroup>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
</WarehouseAddressWrap>
|
</WarehouseAddressWrap>
|
||||||
|
|
||||||
{/*------------ Phone Number -----------*/}
|
{/*------------ Phone Number -----------*/}
|
||||||
<FastField name={'phone_number'}>
|
<FastField name={'phone_number'}>
|
||||||
{({ form, field, meta: { error, touched } }) => (
|
{({ form, field, meta: { error, touched } }) => (
|
||||||
@@ -117,6 +116,36 @@ export default function WarehouseFormFields() {
|
|||||||
</FormGroup>
|
</FormGroup>
|
||||||
)}
|
)}
|
||||||
</FastField>
|
</FastField>
|
||||||
|
|
||||||
|
{/*------------ Email -----------*/}
|
||||||
|
<FastField name={'email'}>
|
||||||
|
{({ form, field, meta: { error, touched } }) => (
|
||||||
|
<FormGroup
|
||||||
|
label={intl.get('warehouse.dialog.label.email')}
|
||||||
|
intent={inputIntent({ error, touched })}
|
||||||
|
inline={true}
|
||||||
|
helperText={<ErrorMessage name="email" />}
|
||||||
|
className={'form-group--warehouse_name'}
|
||||||
|
>
|
||||||
|
<InputGroup intent={inputIntent({ error, touched })} {...field} />
|
||||||
|
</FormGroup>
|
||||||
|
)}
|
||||||
|
</FastField>
|
||||||
|
|
||||||
|
{/*------------ Website -----------*/}
|
||||||
|
<FastField name={'website'}>
|
||||||
|
{({ form, field, meta: { error, touched } }) => (
|
||||||
|
<FormGroup
|
||||||
|
label={intl.get('warehouse.dialog.label.website')}
|
||||||
|
intent={inputIntent({ error, touched })}
|
||||||
|
inline={true}
|
||||||
|
helperText={<ErrorMessage name="email" />}
|
||||||
|
className={'form-group--warehouse_name'}
|
||||||
|
>
|
||||||
|
<InputGroup placeholder={'https://'} {...field} />
|
||||||
|
</FormGroup>
|
||||||
|
)}
|
||||||
|
</FastField>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,44 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { DialogContent } from 'components';
|
import { DialogContent } from 'components';
|
||||||
// import {} from 'hooks/query';
|
import {
|
||||||
|
useCreateWarehouse,
|
||||||
|
useEditWarehouse,
|
||||||
|
useWarehouse,
|
||||||
|
} from 'hooks/query';
|
||||||
|
import { useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
const WarehouseFormContext = React.createContext();
|
const WarehouseFormContext = React.createContext();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Warehouse form provider.
|
* Warehouse form provider.
|
||||||
*/
|
*/
|
||||||
function WarehouseFormProvider({ dialogName, ...props }) {
|
function WarehouseFormProvider({ dialogName, warehouseId, ...props }) {
|
||||||
|
const { state } = useLocation();
|
||||||
|
|
||||||
|
console.log(state, 'XXX');
|
||||||
|
// Create and edit warehouse mutations.
|
||||||
|
const { mutateAsync: createWarehouseMutate } = useCreateWarehouse();
|
||||||
|
const { mutateAsync: editWarehouseMutate } = useEditWarehouse();
|
||||||
|
|
||||||
|
// Handle fetch invoice detail.
|
||||||
|
const { data: warehouse, isLoading: isWarehouseLoading } = useWarehouse(
|
||||||
|
warehouseId,
|
||||||
|
{
|
||||||
|
enabled: !!warehouseId,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
// State provider.
|
// State provider.
|
||||||
const provider = {
|
const provider = {
|
||||||
dialogName,
|
dialogName,
|
||||||
|
warehouse,
|
||||||
|
warehouseId,
|
||||||
|
createWarehouseMutate,
|
||||||
|
editWarehouseMutate,
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogContent
|
<DialogContent isLoading={isWarehouseLoading}>
|
||||||
// isLoading={}
|
|
||||||
>
|
|
||||||
<WarehouseFormContext.Provider value={provider} {...props} />
|
<WarehouseFormContext.Provider value={provider} {...props} />
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -12,18 +12,31 @@ const WarehouseFormDialogContent = React.lazy(() =>
|
|||||||
/**
|
/**
|
||||||
* Warehouse form form dialog.
|
* Warehouse form form dialog.
|
||||||
*/
|
*/
|
||||||
function WarehouseFormDialog({ dialogName, isOpen }) {
|
function WarehouseFormDialog({
|
||||||
|
dialogName,
|
||||||
|
payload: { warehouseId = null, action },
|
||||||
|
isOpen,
|
||||||
|
}) {
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog
|
||||||
name={dialogName}
|
name={dialogName}
|
||||||
title={<T id={'warehouse.dialog.label'} />}
|
title={
|
||||||
|
action == 'edit' ? (
|
||||||
|
<T id={'warehouse.dialog.label.edit_warehouse'} />
|
||||||
|
) : (
|
||||||
|
<T id={'warehouse.dialog.label.new_warehouse'} />
|
||||||
|
)
|
||||||
|
}
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
canEscapeJeyClose={true}
|
canEscapeJeyClose={true}
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
className={'dialog--warehouse-form'}
|
className={'dialog--warehouse-form'}
|
||||||
>
|
>
|
||||||
<DialogSuspense>
|
<DialogSuspense>
|
||||||
<WarehouseFormDialogContent dialogName={dialogName} />
|
<WarehouseFormDialogContent
|
||||||
|
dialogName={dialogName}
|
||||||
|
warehouseId={warehouseId}
|
||||||
|
/>
|
||||||
</DialogSuspense>
|
</DialogSuspense>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,63 +1,30 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import intl from 'react-intl-universal';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { ContextMenu2 } from '@blueprintjs/popover2';
|
|
||||||
|
|
||||||
|
import { useWarehousesContext } from './WarehousesProvider';
|
||||||
import WarehousesGridItems from './WarehousesGridItems';
|
import WarehousesGridItems from './WarehousesGridItems';
|
||||||
import { WarehouseContextMenu } from './components';
|
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
||||||
import withAlertsActions from '../../Alert/withAlertActions';
|
|
||||||
import withDialogActions from '../../Dialog/withDialogActions';
|
|
||||||
import { compose } from 'utils';
|
|
||||||
|
|
||||||
const WAREHOUSE = [
|
import { compose } from 'utils';
|
||||||
{
|
|
||||||
title: 'Warehouse #1',
|
|
||||||
code: '1001',
|
|
||||||
city: 'City',
|
|
||||||
country: 'Country',
|
|
||||||
email: 'email@emial.com',
|
|
||||||
phone: '09xxxxxxxx',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Warehouse #2',
|
|
||||||
code: '100',
|
|
||||||
city: 'City',
|
|
||||||
country: 'Country',
|
|
||||||
email: 'email@emial.com',
|
|
||||||
phone: '09xxxxxxxx',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Warehouse #2',
|
|
||||||
code: '100',
|
|
||||||
city: 'City',
|
|
||||||
country: 'Country',
|
|
||||||
email: 'email@emial.com',
|
|
||||||
phone: '09xxxxxxxx',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Warehouses.
|
* Warehouses.
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
function Warehouses({
|
function Warehouses({
|
||||||
// #withAlertsActions
|
// #withDashboardActions
|
||||||
openAlert,
|
changePreferencesPageTitle,
|
||||||
// #withDialogActions
|
|
||||||
openDialog,
|
|
||||||
}) {
|
}) {
|
||||||
return (
|
const { warehouses } = useWarehousesContext();
|
||||||
<ContextMenu2 content={<WarehouseContextMenu />}>
|
|
||||||
<WarehouseGridWrap>
|
React.useEffect(() => {
|
||||||
<WarehousesGridItems warehouses={WAREHOUSE} />
|
changePreferencesPageTitle(intl.get('warehouses.label'));
|
||||||
</WarehouseGridWrap>
|
}, [changePreferencesPageTitle]);
|
||||||
</ContextMenu2>
|
|
||||||
);
|
return warehouses.map((warehouse) => (
|
||||||
|
<WarehousesGridItems warehouse={warehouse} />
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
export default compose(withAlertsActions, withDialogActions)(Warehouses);
|
export default compose(withDashboardActions)(Warehouses);
|
||||||
|
|
||||||
const WarehouseGridWrap = styled.div`
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin: 15px;
|
|
||||||
`;
|
|
||||||
|
|||||||
10
src/containers/Preferences/Warehouses/WarehousesAlerts.js
Normal file
10
src/containers/Preferences/Warehouses/WarehousesAlerts.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const WarehouseDeleteAlert = React.lazy(() =>
|
||||||
|
import('../../Alerts/Warehouses/WarehouseDeleteAlert'),
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Warehouses alerts.
|
||||||
|
*/
|
||||||
|
export default [{ name: 'warehouse-delete', component: WarehouseDeleteAlert }];
|
||||||
@@ -1,74 +1,56 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
import { ContextMenu2 } from '@blueprintjs/popover2';
|
||||||
|
|
||||||
|
import { WarehouseContextMenu, WarehousesGrid } from './components';
|
||||||
|
|
||||||
|
import withAlertsActions from '../../Alert/withAlertActions';
|
||||||
|
import withDialogActions from '../../Dialog/withDialogActions';
|
||||||
|
import { compose } from 'utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Warehouse grid items.
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function WarehousesGridItems({
|
||||||
|
// #withAlertsActions
|
||||||
|
openAlert,
|
||||||
|
// #withDialogActions
|
||||||
|
openDialog,
|
||||||
|
|
||||||
|
warehouse,
|
||||||
|
}) {
|
||||||
|
// Handle edit warehouse.
|
||||||
|
const handleEditWarehouse = () => {
|
||||||
|
openDialog('warehouse-form', { warehouseId: warehouse.id, action: 'edit' });
|
||||||
|
};
|
||||||
|
|
||||||
|
// Handle delete warehouse.
|
||||||
|
const handleDeleteWarehouse = () => {
|
||||||
|
openAlert('warehouse-delete', { warehouseId: warehouse.id });
|
||||||
|
};
|
||||||
|
|
||||||
function WarehousesGrid({ warehouse }) {
|
|
||||||
return (
|
return (
|
||||||
<WarehouseGrid>
|
<ContextMenu2
|
||||||
<WarehouseHeader>
|
content={
|
||||||
<WarehouseTitle>{warehouse.title}</WarehouseTitle>
|
<WarehouseContextMenu
|
||||||
<WarehouseCode>{warehouse.code}</WarehouseCode>
|
onEditClick={handleEditWarehouse}
|
||||||
</WarehouseHeader>
|
onDeleteClick={handleDeleteWarehouse}
|
||||||
<WarehouseInfoItem>{warehouse.city}</WarehouseInfoItem>
|
/>
|
||||||
<WarehouseInfoItem>{warehouse.country}</WarehouseInfoItem>
|
}
|
||||||
<WarehouseInfoItem>{warehouse.email}</WarehouseInfoItem>
|
>
|
||||||
<WarehouseInfoItem>{warehouse.phone}</WarehouseInfoItem>
|
<WarehousesGrid warehouse={warehouse} />
|
||||||
</WarehouseGrid>
|
</ContextMenu2>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
export default compose(
|
||||||
* Warehouse Grid.
|
withAlertsActions,
|
||||||
* @returns
|
withDialogActions,
|
||||||
*/
|
)(WarehousesGridItems);
|
||||||
function WarehousesGridItems({ warehouses }) {
|
|
||||||
return warehouses.map((warehouse) => (
|
|
||||||
<WarehousesGrid warehouse={warehouse} />
|
|
||||||
));
|
|
||||||
}
|
|
||||||
export default WarehousesGridItems;
|
|
||||||
|
|
||||||
const WarehouseGrid = styled.div`
|
const WarehouseGridWrap = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-wrap: wrap;
|
||||||
border-radius: 3px;
|
margin: 15px;
|
||||||
width: 300px; // 453px
|
|
||||||
height: 160px; //225px
|
|
||||||
background: #fff;
|
|
||||||
margin: 5px;
|
|
||||||
padding: 16px 12px 10px;
|
|
||||||
border: 1px solid #c8cad0; //#CFD1D6
|
|
||||||
transition: all 0.1s ease-in-out;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
border-color: #0153cc;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const WarehouseTitle = styled.div`
|
|
||||||
font-size: 14px; //22px
|
|
||||||
font-style: inherit;
|
|
||||||
color: #000;
|
|
||||||
white-space: nowrap;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 1;
|
|
||||||
`;
|
|
||||||
|
|
||||||
const WarehouseHeader = styled.div`
|
|
||||||
margin: 4px 0px 15px;
|
|
||||||
`;
|
|
||||||
|
|
||||||
const WarehouseCode = styled.div`
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 11px;
|
|
||||||
color: #6b7176;
|
|
||||||
`;
|
|
||||||
|
|
||||||
const WarehouseInfoItem = styled.div`
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #000;
|
|
||||||
line-height: 1.3rem;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
margin: 0;
|
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import intl from 'react-intl-universal';
|
|
||||||
|
|
||||||
import Warehouses from './Warehouses';
|
|
||||||
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
|
||||||
|
|
||||||
import { compose } from 'utils';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Warehouses List.
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
function WarehousesList({
|
|
||||||
// #withDashboardActions
|
|
||||||
changePreferencesPageTitle,
|
|
||||||
}) {
|
|
||||||
React.useEffect(() => {
|
|
||||||
changePreferencesPageTitle(intl.get('warehouses.label'));
|
|
||||||
}, [changePreferencesPageTitle]);
|
|
||||||
|
|
||||||
return <Warehouses />;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default compose(withDashboardActions)(WarehousesList);
|
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import styled from 'styled-components';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { CLASSES } from 'common/classes';
|
import { CLASSES } from 'common/classes';
|
||||||
import styled from 'styled-components';
|
import { useWarehouses } from 'hooks/query';
|
||||||
|
import PreferencesPageLoader from '../PreferencesPageLoader';
|
||||||
|
|
||||||
const WarehousesContext = React.createContext();
|
const WarehousesContext = React.createContext();
|
||||||
|
|
||||||
@@ -9,12 +11,24 @@ const WarehousesContext = React.createContext();
|
|||||||
* Warehouses data provider.
|
* Warehouses data provider.
|
||||||
*/
|
*/
|
||||||
function WarehousesProvider({ ...props }) {
|
function WarehousesProvider({ ...props }) {
|
||||||
|
// Fetch warehouses list.
|
||||||
|
const { data: warehouses, isLoading: isWarehouesLoading } = useWarehouses();
|
||||||
|
|
||||||
// Provider state.
|
// Provider state.
|
||||||
const provider = {};
|
const provider = {
|
||||||
|
warehouses,
|
||||||
|
isWarehouesLoading,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames(CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT)}>
|
<div className={classNames(CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT)}>
|
||||||
<WarehousesContext.Provider value={provider} {...props} />
|
<WarehousePreference>
|
||||||
|
{isWarehouesLoading ? (
|
||||||
|
<PreferencesPageLoader />
|
||||||
|
) : (
|
||||||
|
<WarehousesContext.Provider value={provider} {...props} />
|
||||||
|
)}
|
||||||
|
</WarehousePreference>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -22,3 +36,9 @@ function WarehousesProvider({ ...props }) {
|
|||||||
const useWarehousesContext = () => React.useContext(WarehousesContext);
|
const useWarehousesContext = () => React.useContext(WarehousesContext);
|
||||||
|
|
||||||
export { WarehousesProvider, useWarehousesContext };
|
export { WarehousesProvider, useWarehousesContext };
|
||||||
|
|
||||||
|
const WarehousePreference = styled.div`
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin: 15px;
|
||||||
|
`;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { Menu, MenuItem, MenuDivider, Intent } from '@blueprintjs/core';
|
import { Menu, MenuItem, MenuDivider, Intent } from '@blueprintjs/core';
|
||||||
import { If, Icon, Can } from '../../../components';
|
import { If, Icon, Can } from '../../../components';
|
||||||
@@ -35,3 +36,64 @@ export function WarehouseContextMenu({
|
|||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function WarehousesGrid({ warehouse }) {
|
||||||
|
return (
|
||||||
|
<WarehouseGrid>
|
||||||
|
<WarehouseHeader>
|
||||||
|
<WarehouseTitle>{warehouse.name}</WarehouseTitle>
|
||||||
|
<WarehouseCode>{warehouse.code}</WarehouseCode>
|
||||||
|
</WarehouseHeader>
|
||||||
|
<WarehouseInfoItem>{warehouse.city}</WarehouseInfoItem>
|
||||||
|
<WarehouseInfoItem>{warehouse.country}</WarehouseInfoItem>
|
||||||
|
<WarehouseInfoItem>{warehouse.email}</WarehouseInfoItem>
|
||||||
|
<WarehouseInfoItem>{warehouse.phone_number}</WarehouseInfoItem>
|
||||||
|
</WarehouseGrid>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const WarehouseGrid = styled.div`
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border-radius: 3px;
|
||||||
|
width: 280px; // 453px
|
||||||
|
height: 160px; //225px
|
||||||
|
background: #fff;
|
||||||
|
margin: 5px;
|
||||||
|
padding: 16px 12px 10px;
|
||||||
|
border: 1px solid #c8cad0; //#CFD1D6
|
||||||
|
transition: all 0.1s ease-in-out;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-color: #0153cc;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
const WarehouseTitle = styled.div`
|
||||||
|
font-size: 14px; //22px
|
||||||
|
font-style: inherit;
|
||||||
|
color: #000;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const WarehouseHeader = styled.div`
|
||||||
|
margin: 4px 0px 15px;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const WarehouseCode = styled.div`
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 11px;
|
||||||
|
color: #6b7176;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const WarehouseInfoItem = styled.div`
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #000;
|
||||||
|
line-height: 1.3rem;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
margin: 0;
|
||||||
|
`;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { WarehousesProvider } from './WarehousesProvider';
|
import { WarehousesProvider } from './WarehousesProvider';
|
||||||
import Warehouses from './WarehousesList';
|
import Warehouses from './Warehouses';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Warehouses Preferences.
|
* Warehouses Preferences.
|
||||||
|
|||||||
@@ -33,3 +33,4 @@ export * from './roles';
|
|||||||
export * from './creditNote';
|
export * from './creditNote';
|
||||||
export * from './vendorCredit';
|
export * from './vendorCredit';
|
||||||
export * from './transactionsLocking';
|
export * from './transactionsLocking';
|
||||||
|
export * from './warehouses'
|
||||||
|
|||||||
@@ -191,6 +191,11 @@ const TARNSACTIONS_LOCKING = {
|
|||||||
TRANSACTIONS_LOCKING: 'TRANSACTIONS_LOCKING',
|
TRANSACTIONS_LOCKING: 'TRANSACTIONS_LOCKING',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const WAREHOUSES = {
|
||||||
|
WAREHOUSE: 'WAREHOUSE',
|
||||||
|
WAREHOUSES: 'WAREHOUSES',
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
...ACCOUNTS,
|
...ACCOUNTS,
|
||||||
...BILLS,
|
...BILLS,
|
||||||
@@ -218,4 +223,5 @@ export default {
|
|||||||
...CREDIT_NOTES,
|
...CREDIT_NOTES,
|
||||||
...VENDOR_CREDIT_NOTES,
|
...VENDOR_CREDIT_NOTES,
|
||||||
...TARNSACTIONS_LOCKING,
|
...TARNSACTIONS_LOCKING,
|
||||||
|
...WAREHOUSES
|
||||||
};
|
};
|
||||||
|
|||||||
99
src/hooks/query/warehouses.js
Normal file
99
src/hooks/query/warehouses.js
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
import { useQueryClient, useMutation } from 'react-query';
|
||||||
|
import { useRequestQuery } from '../useQueryRequest';
|
||||||
|
import useApiRequest from '../useRequest';
|
||||||
|
import t from './types';
|
||||||
|
|
||||||
|
// Common invalidate queries.
|
||||||
|
const commonInvalidateQueries = (queryClient) => {
|
||||||
|
// Invalidate warehouses.
|
||||||
|
queryClient.invalidateQueries(t.WAREHOUSES);
|
||||||
|
queryClient.invalidateQueries(t.WAREHOUSE);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new warehouse.
|
||||||
|
*/
|
||||||
|
export function useCreateWarehouse(props) {
|
||||||
|
const queryClient = useQueryClient();
|
||||||
|
const apiRequest = useApiRequest();
|
||||||
|
|
||||||
|
return useMutation((values) => apiRequest.post('warehouses', values), {
|
||||||
|
onSuccess: (res, values) => {
|
||||||
|
// Common invalidate queries.
|
||||||
|
commonInvalidateQueries(queryClient);
|
||||||
|
},
|
||||||
|
...props,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Edits the given warehouse.
|
||||||
|
*/
|
||||||
|
export function useEditWarehouse(props) {
|
||||||
|
const queryClient = useQueryClient();
|
||||||
|
const apiRequest = useApiRequest();
|
||||||
|
|
||||||
|
return useMutation(
|
||||||
|
([id, values]) => apiRequest.post(`warehouses/${id}`, values),
|
||||||
|
{
|
||||||
|
onSuccess: (res, [id, values]) => {
|
||||||
|
// Invalidate specific sale invoice.
|
||||||
|
queryClient.invalidateQueries([t.WAREHOUSE, id]);
|
||||||
|
|
||||||
|
// Common invalidate queries.
|
||||||
|
commonInvalidateQueries(queryClient);
|
||||||
|
},
|
||||||
|
...props,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes the given warehouse.
|
||||||
|
*/
|
||||||
|
export function useDeleteWarehouse(props) {
|
||||||
|
const queryClient = useQueryClient();
|
||||||
|
const apiRequest = useApiRequest();
|
||||||
|
|
||||||
|
return useMutation((id) => apiRequest.delete(`warehouses/${id}`), {
|
||||||
|
onSuccess: (res, id) => {
|
||||||
|
// Invalidate specific warehoue.
|
||||||
|
queryClient.invalidateQueries([t.WAREHOUSE, id]);
|
||||||
|
|
||||||
|
// Common invalidate queries.
|
||||||
|
commonInvalidateQueries(queryClient);
|
||||||
|
},
|
||||||
|
...props,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve Warehoues list.
|
||||||
|
*/
|
||||||
|
export function useWarehouses(query, props) {
|
||||||
|
return useRequestQuery(
|
||||||
|
[t.WAREHOUSES, query],
|
||||||
|
{ method: 'get', url: 'warehouses', params: query },
|
||||||
|
{
|
||||||
|
select: (res) => res.data.warehouses,
|
||||||
|
defaultData: [],
|
||||||
|
...props,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the warehouse details.
|
||||||
|
* @param {number}
|
||||||
|
*/
|
||||||
|
export function useWarehouse(id, props, requestProps) {
|
||||||
|
return useRequestQuery(
|
||||||
|
[t.WAREHOUSE, id],
|
||||||
|
{ method: 'get', url: `warehouses/${id}`, ...requestProps },
|
||||||
|
{
|
||||||
|
select: (res) => res.data.warehouse,
|
||||||
|
defaultData: {},
|
||||||
|
...props,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1751,19 +1751,26 @@
|
|||||||
"payment_receive_preview.dialog.title": "Payment Receive PDF Preview",
|
"payment_receive_preview.dialog.title": "Payment Receive PDF Preview",
|
||||||
"warehouses.label": "Warehouses",
|
"warehouses.label": "Warehouses",
|
||||||
"warehouses.label.new_warehouse": "New Warehouse",
|
"warehouses.label.new_warehouse": "New Warehouse",
|
||||||
"warehouse.dialog.label":"New Warehouse",
|
"warehouse.dialog.label.new_warehouse": "New Warehouse",
|
||||||
"warehouse.dialog.label.warehouse_name":"Warehouse Name",
|
"warehouse.dialog.label.edit_warehouse": "Edit Warehouse",
|
||||||
"warehouse.dialog.label.warehouse_address":"Address",
|
"warehouse.dialog.label.warehouse_name": "Warehouse Name",
|
||||||
"warehouse.dialog.label.warehouse_address_1":"Address 1",
|
"warehouse.dialog.label.warehouse_address": "Address",
|
||||||
"warehouse.dialog.label.warehouse_address_2":"Address 2",
|
"warehouse.dialog.label.warehouse_address_1": "Address",
|
||||||
"warehouse.dialog.label.city":"City",
|
"warehouse.dialog.label.warehouse_address_2": "Address 2",
|
||||||
"warehouse.dialog.label.country":"Country",
|
"warehouse.dialog.label.city": "City",
|
||||||
"warehouse.dialog.label.phone_number":"Phone Number",
|
"warehouse.dialog.label.country": "Country",
|
||||||
"warehouse_locations.label":"Warehouses Locations",
|
"warehouse.dialog.label.phone_number": "Phone Number",
|
||||||
"warehouse_locations.column.warehouse_name":"Warehouse name",
|
"warehouse.dialog.label.code": "Code",
|
||||||
"warehouse_locations.column.quantity":"Quantity",
|
"warehouse.dialog.label.email": "Email",
|
||||||
"warehouse_locations.column.available_for_sale":"Available for sale",
|
"warehouse.dialog.label.website": "Website",
|
||||||
"warehouses.action.edit_warehouse":"Edit Warehouse",
|
"warehouse.dialog.success_message": "The warehouse has been created successfully.",
|
||||||
"warehouses.action.delete_warehouse":"Delete Warehouse",
|
"warehouse_locations.label": "Warehouses Locations",
|
||||||
"warehouses.action.make_as_parimary":"Mark as Primary"
|
"warehouse_locations.column.warehouse_name": "Warehouse name",
|
||||||
|
"warehouse_locations.column.quantity": "Quantity",
|
||||||
|
"warehouse_locations.column.available_for_sale": "Available for sale",
|
||||||
|
"warehouses.action.edit_warehouse": "Edit Warehouse",
|
||||||
|
"warehouses.action.delete_warehouse": "Delete Warehouse",
|
||||||
|
"warehouses.action.make_as_parimary": "Mark as Primary",
|
||||||
|
"warehouse.alert.delete_message":"The warehouse has been deleted successfully",
|
||||||
|
"warehouse.once_delete_this_warehouse":"Once you delete this warehouse, you won't be able to restore it later. Are you sure you want to delete this warehouse?"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user