invoice
This commit is contained in:
@@ -15,6 +15,7 @@ import { ServiceItemType } from '../service/types/ServiceTypes'
|
||||
import { useCreateAnnoncement } from './hooks/useAnnoncementData'
|
||||
import { ErrorType } from '../../helpers/types'
|
||||
import { toast } from 'react-toastify'
|
||||
import moment from 'moment-jalaali'
|
||||
|
||||
const Create: FC = () => {
|
||||
|
||||
@@ -119,7 +120,7 @@ const Create: FC = () => {
|
||||
<div className='bg-white mt-10 w-sidebar text-xs hidden 2xl:block h-fit px-5 py-7 rounded-3xl'>
|
||||
<DatePickerComponent
|
||||
label={t('announcement.publish_date')}
|
||||
onChange={(d) => formik.setFieldValue('publishAt', d)}
|
||||
onChange={(d) => formik.setFieldValue('publishAt', moment(d, 'jYYYY-jMM-jDD').format('YYYY-MM-DD'))}
|
||||
placeholder={t('select')}
|
||||
/>
|
||||
|
||||
|
||||
@@ -269,12 +269,25 @@ const CreateReceipt: FC = () => {
|
||||
{
|
||||
items.map((item, index: number) => {
|
||||
return (
|
||||
<div key={item.name} className='mt-8 flex items-end justify-between text-xs text-description'>
|
||||
|
||||
<div key={item.name} className='mt-6 flex items-end justify-between text-xs text-description'>
|
||||
<div className='flex flex-col gap-2 items-center'>
|
||||
<div>
|
||||
{t('receip.product_name')}
|
||||
{
|
||||
index === 0 &&
|
||||
<div>
|
||||
{t('receip.number')}
|
||||
</div>
|
||||
}
|
||||
<div className='size-10 bg-[#EBEDF5] rounded-xl flex justify-center items-center'>
|
||||
{index + 1}
|
||||
</div>
|
||||
</div>
|
||||
<div className='flex flex-col gap-2 items-center'>
|
||||
{
|
||||
index === 0 &&
|
||||
<div>
|
||||
{t('receip.product_name')}
|
||||
</div>
|
||||
}
|
||||
<Input
|
||||
className='text-center'
|
||||
name='name'
|
||||
@@ -284,9 +297,12 @@ const CreateReceipt: FC = () => {
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col gap-2 items-center'>
|
||||
<div>
|
||||
{t('receip.count')}
|
||||
</div>
|
||||
{
|
||||
index === 0 &&
|
||||
<div>
|
||||
{t('receip.count')}
|
||||
</div>
|
||||
}
|
||||
<Input
|
||||
type='number'
|
||||
className='w-16 text-center'
|
||||
@@ -297,9 +313,12 @@ const CreateReceipt: FC = () => {
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col gap-2 items-center'>
|
||||
<div>
|
||||
{t('receip.unit_amount')}
|
||||
</div>
|
||||
{
|
||||
index === 0 &&
|
||||
<div>
|
||||
{t('receip.unit_amount')}
|
||||
</div>
|
||||
}
|
||||
<Input
|
||||
className='text-center'
|
||||
name='unitPrice'
|
||||
@@ -310,9 +329,12 @@ const CreateReceipt: FC = () => {
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col gap-2 items-center'>
|
||||
<div>
|
||||
{t('receip.discount')}
|
||||
</div>
|
||||
{
|
||||
index === 0 &&
|
||||
<div>
|
||||
{t('receip.discount')}
|
||||
</div>
|
||||
}
|
||||
<Input
|
||||
type='number'
|
||||
className='w-16 text-center'
|
||||
@@ -323,9 +345,12 @@ const CreateReceipt: FC = () => {
|
||||
</div>
|
||||
|
||||
<div className='flex flex-col gap-2 items-center'>
|
||||
<div>
|
||||
{t('receip.total_amount')}
|
||||
</div>
|
||||
{
|
||||
index === 0 &&
|
||||
<div>
|
||||
{t('receip.total_amount')}
|
||||
</div>
|
||||
}
|
||||
<Input
|
||||
className='text-center bg-[#EBEDF5]'
|
||||
readOnly
|
||||
|
||||
Reference in New Issue
Block a user