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

見た目修正 #875

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 2 additions & 2 deletions view/next-project/src/components/common/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ interface Props {

function Card(props: Props): JSX.Element {
return (
<div className={clsx('mx-auto', props.w ? props.w : 'md:w-4/5')} onClick={props.onClick}>
<div className={clsx('mx-auto', props.w ? props.w : 'md:w-11/12')} onClick={props.onClick}>
<div
className={clsx(
'm-2 rounded-lg border border-black-300 border-opacity-10 px-2 shadow-md md:m-10 md:px-10',
'm-2 rounded-lg border border-black-300 border-opacity-10 px-2 shadow-md md:m-7 md:px-10',
)}
>
{props.children}
Expand Down
18 changes: 9 additions & 9 deletions view/next-project/src/components/purchaseorders/DetailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,27 @@ const DetailModal: FC<ModalProps> = (props) => {
</div>
<div
className={clsx(
'col-span-3 grid w-full border border-x-white-0 border-b-primary-1 border-t-white-0 pl-1',
'col-span-4 grid w-full border border-x-white-0 border-b-primary-1 border-t-white-0 pl-1',
)}
>
{props.purchaseOrderViewItem && props.purchaseOrderViewItem.purchaseOrder.id}
</div>
<div className={clsx('col-span-3 grid')} />
<div className={clsx('col-span-2 grid')} />
</div>
<div className={clsx('col-span-1 grid ')} />
<div className={clsx('my-2 grid w-full grid-cols-12')}>
<div className={clsx('col-span-2 grid')} />
<div className={clsx('col-span-4 mr-2 grid justify-items-end')}>
<div className={clsx('text-md flex items-center text-black-600')}>申請した局</div>
<div className={clsx('text-md flex items-center text-black-600')}>支出元</div>
</div>
<div
className={clsx(
'col-span-3 grid w-full border border-x-white-0 border-b-primary-1 border-t-white-0 pl-1',
'col-span-4 grid w-full border border-x-white-0 border-b-primary-1 border-t-white-0 pl-1',
)}
>
{expenseName}
</div>
<div className={clsx('col-span-3 grid')} />
<div className={clsx('col-span-2 grid')} />
</div>
<div className={clsx('my-2 grid w-full grid-cols-12')}>
<div className={clsx('col-span-2 grid')} />
Expand All @@ -108,7 +108,7 @@ const DetailModal: FC<ModalProps> = (props) => {
</div>
<div
className={clsx(
'col-span-3 grid w-full border border-x-white-0 border-b-primary-1 border-t-white-0 pl-1',
'col-span-4 grid w-full border border-x-white-0 border-b-primary-1 border-t-white-0 pl-1',
)}
>
{props.purchaseOrderViewItem &&
Expand All @@ -118,7 +118,7 @@ const DetailModal: FC<ModalProps> = (props) => {
: '',
)}
</div>
<div className={clsx('col-span-3 grid')} />
<div className={clsx('col-span-2 grid')} />
</div>
<div className={clsx('my-2 grid w-full grid-cols-12')}>
<div className={clsx('col-span-2 grid')} />
Expand All @@ -127,12 +127,12 @@ const DetailModal: FC<ModalProps> = (props) => {
</div>
<div
className={clsx(
'col-span-3 grid w-full border border-x-white-0 border-b-primary-1 border-t-white-0 pl-1',
'col-span-4 grid w-full border border-x-white-0 border-b-primary-1 border-t-white-0 pl-1',
)}
>
{props.purchaseOrderViewItem && props.purchaseOrderViewItem.purchaseOrder.deadline}
</div>
<div className={clsx('col-span-3 grid')} />
<div className={clsx('col-span-2 grid')} />
</div>
<div className={clsx('col-span-1 grid ')} />
</div>
Expand Down
18 changes: 14 additions & 4 deletions view/next-project/src/pages/purchaseorders/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ export default function PurchaseOrders(props: Props) {
return datetime2;
};

const formatDateForDeadline = (date: string) => {
const spilitDate = date.split('-');
const datetime = spilitDate[1] + '/' + spilitDate[2];
return datetime;
};

const yearPeriods = props.yearPeriods;
const [selectedYear, setSelectedYear] = useState<string>(
yearPeriods ? String(yearPeriods[yearPeriods.length - 1].year) : String(date.getFullYear()),
Expand Down Expand Up @@ -215,15 +221,15 @@ export default function PurchaseOrders(props: Props) {
</OpenAddModalButton>
</div>
</div>
<div className='w-100 mb-2 overflow-scroll p-5'>
<div className='w-100 mb-2 overflow-scroll p-5 md:overflow-visible'>
<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-1/12 pb-2'>
<div className='text-center text-sm text-black-600'></div>
</th>
<th className='w-2/12 border-b-primary-1 pb-2'>
<div className='text-center text-sm text-black-600'>購入したい局</div>
<th className='w-1/5 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'>
<div className='text-center text-sm text-black-600'>申請日</div>
Expand Down Expand Up @@ -293,7 +299,11 @@ export default function PurchaseOrders(props: Props) {
}}
>
<div className='text-center text-sm text-black-600'>
{purchaseOrderViewItem.purchaseOrder.deadline}
{formatDateForDeadline(
purchaseOrderViewItem.purchaseOrder.deadline
? purchaseOrderViewItem.purchaseOrder.deadline
: '',
)}
</div>
</td>
<td
Expand Down
42 changes: 6 additions & 36 deletions view/next-project/src/pages/purchasereports/index.tsx
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

後備がめっちゃはみ出るのが気になりました。

345行目
<div className='text-center text-sm text-black-600'>

'

'

Original file line number Diff line number Diff line change
Expand Up @@ -221,33 +221,27 @@ export default function PurchaseReports(props: Props) {
<OpenAddModalButton>報告登録</OpenAddModalButton>
</div>
</div>
<div className='w-100 mb-2 overflow-scroll p-5'>
<div className='w-100 mb-2 overflow-scroll p-5 md:overflow-visible'>
<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-1/12 pb-2'></th>
<th className='w-1/12 pb-2'>
<div className='text-center text-sm text-black-600'>ID</div>
</th>
<th className='w-2/12 border-b-primary-1 pb-2'>
<div className='text-center text-sm text-black-600'>購入した局</div>
<th className='pb-2'></th>
<th className='w-1/4 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'>
<div className='text-center text-sm text-black-600'>報告日</div>
</th>
<th className='w-2/12 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'>
<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-1/12 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'>
<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-1/12 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>
Expand All @@ -271,18 +265,6 @@ export default function PurchaseReports(props: Props) {
/>
</div>
</td>
<td
onClick={() => {
onOpen(
purchaseReportViewItem.purchaseOrder.id || 0,
purchaseReportViewItem,
);
}}
>
<div className='text-center text-sm text-black-600'>
{purchaseReportViewItem.purchaseReport.id}
</div>
</td>
<td
onClick={() => {
onOpen(
Expand Down Expand Up @@ -318,18 +300,6 @@ export default function PurchaseReports(props: Props) {
)}
</div>
</td>
<td
onClick={() => {
onOpen(
purchaseReportViewItem.purchaseOrder.id || 0,
purchaseReportViewItem,
);
}}
>
<div className='text-center text-sm text-black-600'>
{purchaseReportViewItem.purchaseOrder.deadline}
</div>
</td>
<td
onClick={() => {
onOpen(
Expand Down
2 changes: 1 addition & 1 deletion view/next-project/src/pages/sponsoractivities/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export default function SponsorActivities(props: Props) {
<meta name='viewpoinst' content='initial-scale=1.0, width=device-width' />
</Head>
{isLoading && <Loading />}
<Card w='w-full'>
<Card>
<div className='mx-6 mt-10 md:mx-5'>
<div className='gap-4 md:flex'>
<div className='flex'>
Expand Down
2 changes: 1 addition & 1 deletion view/next-project/src/pages/teachers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function TeachersList(props: Props) {
<OpenAddModalButton departments={props.departments}>教員登録</OpenAddModalButton>
</div>
</div>
<div className='mb-2 overflow-scroll p-5'>
<div className='mb-2 overflow-scroll p-5 md:overflow-visible'>
<table className='mb-5 w-max table-auto border-collapse md:w-full'>
<thead className='text-sm text-black-600'>
<tr className='border border-x-white-0 border-b-primary-1 border-t-white-0 py-3'>
Expand Down
Loading