Skip to content

Commit

Permalink
Merge pull request #841 from NUTFes/feat/kubosaka/840-hidden-no-url
Browse files Browse the repository at this point in the history
urlが登録されていないものは非表示にする
  • Loading branch information
Kubosaka authored Jul 15, 2024
2 parents 330a5e6 + 7e5d4e9 commit e8ef3c2
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 87 deletions.
38 changes: 20 additions & 18 deletions view/next-project/src/components/purchaseorders/DetailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,25 +206,27 @@ const DetailModal: FC<ModalProps> = (props) => {
</td>
<td className={clsx('border-b py-3')}>
<div className={clsx('text-center text-sm text-black-300')}>
<div className={clsx('flex justify-center')}>
<a
className={clsx('mx-1')}
href={purchaseItem.url}
target='_blank'
rel='noopener noreferrer'
>
<RiExternalLinkLine size={'16px'} />
</a>
<Tooltip text={'copy URL'}>
<RiFileCopyLine
{purchaseItem.url && (
<div className={clsx('flex justify-center')}>
<a
className={clsx('mx-1')}
size={'16px'}
onClick={() => {
navigator.clipboard.writeText(purchaseItem.url);
}}
/>
</Tooltip>
</div>
href={purchaseItem.url}
target='_blank'
rel='noopener noreferrer'
>
<RiExternalLinkLine size={'16px'} />
</a>
<Tooltip text={'copy URL'}>
<RiFileCopyLine
className={clsx('mx-1')}
size={'16px'}
onClick={() => {
navigator.clipboard.writeText(purchaseItem.url);
}}
/>
</Tooltip>
</div>
)}
</div>
</td>
{user.roleID === 3 ? (
Expand Down
33 changes: 18 additions & 15 deletions view/next-project/src/components/purchaseorders/EditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,26 +166,29 @@ export default function EditModal(props: ModalProps) {
</thead>
<tbody>
{formDataList.map((data) => (
<tr key={data.id} className='border-gray-300 border-b'>
<tr key={data.id} className='border-gray-300 border-b text-center'>
<td className='py-2'>{data.item}</td>
<td className='py-2'>{data.price}</td>
<td className='py-2'>{data.quantity}</td>
<td className='py-2'>{data.detail}</td>
<td className='py-2'>
<div className={'flex justify-center'}>
<a href={data.url} target='_blank' rel='noopener noreferrer'>
<RiExternalLinkLine size={'16px'} />
</a>
<Tooltip text={'copy URL'}>
<RiFileCopyLine
size={'16px'}
className='cursor-pointer'
onClick={() => {
navigator.clipboard.writeText(data.url);
}}
/>
</Tooltip>
</div>
{data.url && (
<div className={'flex justify-center'}>
<a href={data.url} target='_blank' rel='noopener noreferrer'>
<RiExternalLinkLine size={'16px'} />
</a>

<Tooltip text={'copy URL'}>
<RiFileCopyLine
size={'16px'}
className='cursor-pointer'
onClick={() => {
navigator.clipboard.writeText(data.url);
}}
/>
</Tooltip>
</div>
)}
</td>
</tr>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,25 +209,27 @@ export default function AddModal(props: ModalProps) {
)}
>
<div className={clsx('text-center text-sm text-black-300')}>
<div className={clsx('flex')}>
<a
className={clsx('mx-1')}
href={purchaseItem.url}
target='_blank'
rel='noopener noreferrer'
>
<RiExternalLinkLine size={'16px'} />
</a>
<Tooltip text={'copy URL'}>
<RiFileCopyLine
{purchaseItem.url && (
<div className={clsx('flex justify-center')}>
<a
className={clsx('mx-1')}
size={'16px'}
onClick={() => {
navigator.clipboard.writeText(purchaseItem.url);
}}
/>
</Tooltip>
</div>
href={purchaseItem.url}
target='_blank'
rel='noopener noreferrer'
>
<RiExternalLinkLine size={'16px'} />
</a>
<Tooltip text={'copy URL'}>
<RiFileCopyLine
className={clsx('mx-1')}
size={'16px'}
onClick={() => {
navigator.clipboard.writeText(purchaseItem.url);
}}
/>
</Tooltip>
</div>
)}
</div>
</td>
</tr>
Expand Down
38 changes: 20 additions & 18 deletions view/next-project/src/components/purchasereports/DetailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,25 +181,27 @@ const DetailModal: FC<ModalProps> = (props) => {
</td>
<td className='border-b py-3'>
<div className='text-center text-sm text-black-300'>
<div className='flex justify-center'>
<a
className='mx-1'
href={purchaseItem.url}
target='_blank'
rel='noopener noreferrer'
>
<RiExternalLinkLine size={'16px'} />
</a>
<Tooltip text={'copy URL'}>
<RiFileCopyLine
{purchaseItem.url && (
<div className='flex justify-center'>
<a
className='mx-1'
size={'16px'}
onClick={() => {
navigator.clipboard.writeText(purchaseItem.url);
}}
/>
</Tooltip>
</div>
href={purchaseItem.url}
target='_blank'
rel='noopener noreferrer'
>
<RiExternalLinkLine size={'16px'} />
</a>
<Tooltip text={'copy URL'}>
<RiFileCopyLine
className='mx-1'
size={'16px'}
onClick={() => {
navigator.clipboard.writeText(purchaseItem.url);
}}
/>
</Tooltip>
</div>
)}
</div>
</td>
<td className='border-b py-3'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,25 +96,27 @@ export default function PurchaseItemNumModal(props: ModalProps) {
)}
>
<div className='text-center text-sm text-black-300'>
<div className='flex'>
<a
className='mx-1'
href={purchaseItem.url}
target='_blank'
rel='noopener noreferrer'
>
<RiExternalLinkLine size={'16px'} />
</a>
<Tooltip text={'copy URL'}>
<RiFileCopyLine
{purchaseItem.url && (
<div className='flex justify-center'>
<a
className='mx-1'
size={'16px'}
onClick={() => {
navigator.clipboard.writeText(purchaseItem.url);
}}
/>
</Tooltip>
</div>
href={purchaseItem.url}
target='_blank'
rel='noopener noreferrer'
>
<RiExternalLinkLine size={'16px'} />
</a>
<Tooltip text={'copy URL'}>
<RiFileCopyLine
className='mx-1'
size={'16px'}
onClick={() => {
navigator.clipboard.writeText(purchaseItem.url);
}}
/>
</Tooltip>
</div>
)}
</div>
</td>
</tr>
Expand Down

0 comments on commit e8ef3c2

Please sign in to comment.