mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-26 20:54:21 +01:00
(i18n) improve product category delete message
This commit is contained in:
parent
50e4b2ba0c
commit
4f58ea64d1
@ -73,7 +73,7 @@ export const ManageProductCategory: React.FC<ManageProductCategoryProps> = ({ pr
|
||||
isOpen={isOpen}
|
||||
toggleModal={toggleModal}
|
||||
closeButton>
|
||||
{ (action === 'update' || action === 'delete') && <p className='subtitle'>{productCategory.name}</p>}
|
||||
{ action === 'update' && <p className='subtitle'>{productCategory.name}</p>}
|
||||
<ProductCategoryForm action={action}
|
||||
productCategories={productCategories}
|
||||
productCategory={productCategory}
|
||||
|
@ -6,8 +6,8 @@ import { FormInput } from '../../form/form-input';
|
||||
import { FormSelect } from '../../form/form-select';
|
||||
import { ProductCategory } from '../../../models/product-category';
|
||||
import { FabButton } from '../../base/fab-button';
|
||||
import { FabAlert } from '../../base/fab-alert';
|
||||
import ProductCategoryAPI from '../../../api/product-category';
|
||||
import { HtmlTranslate } from '../../base/html-translate';
|
||||
|
||||
interface ProductCategoryFormProps {
|
||||
action: 'create' | 'update' | 'delete',
|
||||
@ -95,10 +95,8 @@ export const ProductCategoryForm: React.FC<ProductCategoryFormProps> = ({ action
|
||||
<form onSubmit={handleSubmit(onSubmit)} name="productCategoryForm" className="product-category-form">
|
||||
{ action === 'delete'
|
||||
? <>
|
||||
<FabAlert level='danger'>
|
||||
{t('app.admin.store.product_category_form.delete.confirm')}
|
||||
</FabAlert>
|
||||
<FabButton type='submit'>{t('app.admin.store.product_category_form.save')}</FabButton>
|
||||
<HtmlTranslate trKey="app.admin.store.product_category_form.delete.confirm" options={{ CATEGORY: productCategory?.name }} />
|
||||
<FabButton type='submit'>{t('app.admin.store.product_category_form.delete.save')}</FabButton>
|
||||
</>
|
||||
: <>
|
||||
<FormInput id='name'
|
||||
|
@ -99,6 +99,7 @@
|
||||
@import "modules/store/orders-dashboard";
|
||||
@import "modules/store/orders";
|
||||
@import "modules/store/product-categories";
|
||||
@import "modules/store/product-category-form";
|
||||
@import "modules/store/product-form";
|
||||
@import "modules/store/product-stock-form";
|
||||
@import "modules/store/product-stock-modal";
|
||||
|
@ -0,0 +1,5 @@
|
||||
.product-category-form {
|
||||
span {
|
||||
margin-bottom: 2.4rem;
|
||||
}
|
||||
}
|
@ -1937,7 +1937,8 @@ en:
|
||||
error: "Unable to modify the category: "
|
||||
success: "The category has been modified."
|
||||
delete:
|
||||
confirm: "Do you really want to delete this product category?"
|
||||
confirm: "Do you really want to delete <strong>{CATEGORY}</strong>?<br>If it has sub-categories, they will also be deleted."
|
||||
save: "Delete"
|
||||
error: "Unable to delete the category: "
|
||||
success: "The category has been successfully deleted"
|
||||
save: "Save"
|
||||
|
Loading…
x
Reference in New Issue
Block a user