Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urlが登録されていないものは非表示にする #841

Merged
merged 5 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading