parent
833ec518b4
commit
256fd89fd2
|
@ -31,6 +31,7 @@ import { useWindowSize } from 'web/hooks/use-window-size'
|
||||||
import { ExtraContractActionsRow } from './extra-contract-actions-row'
|
import { ExtraContractActionsRow } from './extra-contract-actions-row'
|
||||||
import { PlusCircleIcon } from '@heroicons/react/solid'
|
import { PlusCircleIcon } from '@heroicons/react/solid'
|
||||||
import { GroupLink } from 'common/group'
|
import { GroupLink } from 'common/group'
|
||||||
|
import { Subtitle } from '../subtitle'
|
||||||
|
|
||||||
export type ShowTime = 'resolve-date' | 'close-date'
|
export type ShowTime = 'resolve-date' | 'close-date'
|
||||||
|
|
||||||
|
@ -427,11 +428,18 @@ function EditableCloseDate(props: {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{isEditingCloseTime ? (
|
<Modal
|
||||||
<Row className="z-10 mr-2 w-full shrink-0 items-center gap-1">
|
size="sm"
|
||||||
|
open={isEditingCloseTime}
|
||||||
|
setOpen={setIsEditingCloseTime}
|
||||||
|
position="top"
|
||||||
|
>
|
||||||
|
<Col className="rounded bg-white px-8 pb-8">
|
||||||
|
<Subtitle text="Edit Close Date" />
|
||||||
|
<Row className="z-10 mr-2 w-full shrink-0 flex-wrap items-center gap-2">
|
||||||
<input
|
<input
|
||||||
type="date"
|
type="date"
|
||||||
className="input input-bordered shrink-0"
|
className="input input-bordered w-full shrink-0 sm:w-fit"
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
onChange={(e) => setCloseDate(e.target.value)}
|
onChange={(e) => setCloseDate(e.target.value)}
|
||||||
min={Date.now()}
|
min={Date.now()}
|
||||||
|
@ -439,17 +447,23 @@ function EditableCloseDate(props: {
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
type="time"
|
type="time"
|
||||||
className="input input-bordered shrink-0"
|
className="input input-bordered w-full shrink-0 sm:w-max"
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
onChange={(e) => setCloseHoursMinutes(e.target.value)}
|
onChange={(e) => setCloseHoursMinutes(e.target.value)}
|
||||||
min="00:00"
|
min="00:00"
|
||||||
value={closeHoursMinutes}
|
value={closeHoursMinutes}
|
||||||
/>
|
/>
|
||||||
<Button size={'xs'} color={'blue'} onClick={onSave}>
|
</Row>
|
||||||
|
<Button
|
||||||
|
className="mt-2"
|
||||||
|
size={'xs'}
|
||||||
|
color={'indigo'}
|
||||||
|
onClick={onSave}
|
||||||
|
>
|
||||||
Done
|
Done
|
||||||
</Button>
|
</Button>
|
||||||
</Row>
|
</Col>
|
||||||
) : (
|
</Modal>
|
||||||
<DateTimeTooltip
|
<DateTimeTooltip
|
||||||
text={closeTime > Date.now() ? 'Trading ends:' : 'Trading ended:'}
|
text={closeTime > Date.now() ? 'Trading ends:' : 'Trading ended:'}
|
||||||
time={closeTime}
|
time={closeTime}
|
||||||
|
@ -467,7 +481,6 @@ function EditableCloseDate(props: {
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
</DateTimeTooltip>
|
</DateTimeTooltip>
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user