Skip to content

Commit

Permalink
[fix]テーブルのカラム名修正
Browse files Browse the repository at this point in the history
  • Loading branch information
KazumaSun committed Nov 12, 2023
1 parent c372a96 commit 15c2e85
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions view/next-project/src/pages/purchasereports/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,14 @@ export default function PurchaseReports(props: Props) {
const [selectedYear, setSelectedYear] = useState<string>(currentYear);

const filteredPurchaseReportViews = useMemo(() => {
return purchaseReportViews.filter((purchaseReportViewItem) => {
return purchaseReportViewItem.purchaseOrder.createdAt?.includes(selectedYear);
});
if (purchaseReportViews.length > 0) {
return purchaseReportViews.filter((purchaseReportViewItem: PurchaseReportView) => {
return purchaseReportViewItem.purchaseOrder.createdAt?.includes(selectedYear);
});
}
else {
return [];
}
}, [purchaseReportViews, selectedYear]);

const TotalFee = useCallback((purchaseReport: PurchaseReport, purchaseItems: PurchaseItem[]) => {
Expand Down Expand Up @@ -213,34 +218,34 @@ export default function PurchaseReports(props: Props) {
<table className='mb-5 w-max table-auto border-collapse md:w-full md:table-fixed'>
<thead>
<tr className='border border-x-white-0 border-b-primary-1 border-t-white-0 py-3'>
<th className='w-fit pb-2'>
<div className='text-center text-sm text-black-600'>財務局長チェック</div>
<th className='w-1/20 pb-2'>
<div className='text-center text-sm text-black-600'></div>
</th>
<th className='w-1/12 pb-2'>
<th className='w-2/20 pb-2'>
<div className='text-center text-sm text-black-600'>ID</div>
</th>
<th className='w-1/12 border-b-primary-1 pb-2'>
<th className='w-2/20 border-b-primary-1 pb-2'>
<div className='text-center text-sm text-black-600'>購入した局</div>
</th>
<th className='w-1/12 border-b-primary-1 pb-2'>
<th className='w-2/20 border-b-primary-1 pb-2'>
<div className='text-center text-sm text-black-600'>報告日</div>
</th>
<th className='w-1/12 border-b-primary-1 pb-2'>
<th className='w-2/20 border-b-primary-1 pb-2'>
<div className='text-center text-sm text-black-600'>期限日</div>
</th>
<th className='w-2/12 border-b-primary-1 pb-2'>
<th className='w-3/20 border-b-primary-1 pb-2'>
<div className='text-center text-sm text-black-600'>購入物品 (個数)</div>
</th>
<th className='w-1/12 border-b-primary-1 pb-2'>
<th className='w-2/20 border-b-primary-1 pb-2'>
<div className='text-center text-sm text-black-600'>合計金額</div>
</th>
<th className='w-1/12 border-b-primary-1 pb-2'>
<th className='w-2/20 border-b-primary-1 pb-2'>
<div className='text-center text-sm text-black-600'>備考</div>
</th>
<th className='w-1/12 border-b-primary-1 pb-2'>
<th className='w-2/20 border-b-primary-1 pb-2'>
<div className='text-center text-sm text-black-600'>購入者</div>
</th>
<th className='w-1/12 border-b-primary-1 pb-2'></th>
<th className='w-2/20 border-b-primary-1 pb-2'></th>
</tr>
</thead>
<tbody className='border border-x-white-0 border-b-primary-1 border-t-white-0'>
Expand Down

0 comments on commit 15c2e85

Please sign in to comment.