Added combobox for reprints
This commit is contained in:
parent
52e7793734
commit
6abc0052f4
1 changed files with 22 additions and 10 deletions
|
|
@ -6,7 +6,7 @@ import { FiLogOut } from 'solid-icons/fi'
|
||||||
import { VsRefresh } from 'solid-icons/vs'
|
import { VsRefresh } from 'solid-icons/vs'
|
||||||
import { createEffect, createSignal, onMount } from 'solid-js'
|
import { createEffect, createSignal, onMount } from 'solid-js'
|
||||||
import { Show } from 'solid-js/web'
|
import { Show } from 'solid-js/web'
|
||||||
import { Box, Button, Clickable, Column, Input, Link, Logo, Modal, ModalButton, Padding, Page, Row } from '../../components'
|
import { Box, Button, Clickable, Column, Combobox, Input, Link, Logo, Modal, ModalButton, Padding, Page, Row } from '../../components'
|
||||||
import {
|
import {
|
||||||
_additional,
|
_additional,
|
||||||
_additionalAmountList,
|
_additionalAmountList,
|
||||||
|
|
@ -68,6 +68,9 @@ export default () => {
|
||||||
|
|
||||||
const [filter, setFilter] = createSignal('')
|
const [filter, setFilter] = createSignal('')
|
||||||
|
|
||||||
|
const listType = ['Print', 'Manual Print', 'Reprint']
|
||||||
|
const [selectedType, setSelectedType] = createSignal('Print')
|
||||||
|
|
||||||
let bldgadditional = false
|
let bldgadditional = false
|
||||||
|
|
||||||
const checkAccess = async (access: string) => {
|
const checkAccess = async (access: string) => {
|
||||||
|
|
@ -266,7 +269,7 @@ export default () => {
|
||||||
const checkLogged = async () => {
|
const checkLogged = async () => {
|
||||||
const idStore = sessionStorage.getItem('id')
|
const idStore = sessionStorage.getItem('id')
|
||||||
const nameStore = sessionStorage.getItem('name')
|
const nameStore = sessionStorage.getItem('name')
|
||||||
setEmployeeId(parseInt(idStore!))
|
setEmployeeId(parseInt(idStore!, 10))
|
||||||
setEmployeeName(nameStore!)
|
setEmployeeName(nameStore!)
|
||||||
|
|
||||||
if (employeeId() === 0 || employeeId().toString() === 'NaN') {
|
if (employeeId() === 0 || employeeId().toString() === 'NaN') {
|
||||||
|
|
@ -315,7 +318,7 @@ export default () => {
|
||||||
|
|
||||||
const updateOp = async (division: string) => {
|
const updateOp = async (division: string) => {
|
||||||
const post = await postApi(`update-opprinted-${division}`, {
|
const post = await postApi(`update-opprinted-${division}`, {
|
||||||
data: parseInt(applicationId().toString()),
|
data: parseInt(applicationId().toString(), 10),
|
||||||
})
|
})
|
||||||
return post
|
return post
|
||||||
}
|
}
|
||||||
|
|
@ -323,7 +326,7 @@ export default () => {
|
||||||
const setNewStatus = async (division: string, status: string, tag: string, tagword: string, approved: number) => {
|
const setNewStatus = async (division: string, status: string, tag: string, tagword: string, approved: number) => {
|
||||||
const today = new Date()
|
const today = new Date()
|
||||||
const formattedDate = dayjs(today).format('YYYY-MM-DD HH:mm:ss')
|
const formattedDate = dayjs(today).format('YYYY-MM-DD HH:mm:ss')
|
||||||
const statusid = parseInt(applicationId().toString())
|
const statusid = parseInt(applicationId().toString(), 10)
|
||||||
|
|
||||||
const post = await postApi(`post-newstatus-${division}`, {
|
const post = await postApi(`post-newstatus-${division}`, {
|
||||||
data: statusid,
|
data: statusid,
|
||||||
|
|
@ -331,8 +334,8 @@ export default () => {
|
||||||
data3: status,
|
data3: status,
|
||||||
data4: tag,
|
data4: tag,
|
||||||
data5: tagword,
|
data5: tagword,
|
||||||
data6: parseInt(approved.toString()),
|
data6: parseInt(approved.toString(), 10),
|
||||||
data7: parseInt(employeeId().toString()),
|
data7: parseInt(employeeId().toString(), 10),
|
||||||
})
|
})
|
||||||
return post
|
return post
|
||||||
}
|
}
|
||||||
|
|
@ -375,7 +378,7 @@ export default () => {
|
||||||
const formatedDate = dayjs(today).format('YYYY-MM-DD HH:mm:ss')
|
const formatedDate = dayjs(today).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
|
||||||
await postApi('post-esigntransaction', {
|
await postApi('post-esigntransaction', {
|
||||||
data: parseInt(id),
|
data: parseInt(id, 10),
|
||||||
data2: application,
|
data2: application,
|
||||||
data3: formatedDate,
|
data3: formatedDate,
|
||||||
})
|
})
|
||||||
|
|
@ -498,8 +501,11 @@ export default () => {
|
||||||
<Padding top={0} bottom={0} right={10} left={10}>
|
<Padding top={0} bottom={0} right={10} left={10}>
|
||||||
<Row content="split">
|
<Row content="split">
|
||||||
<Input value={filter()} onChange={setFilter} placeholder="Filter Application Number" />
|
<Input value={filter()} onChange={setFilter} placeholder="Filter Application Number" />
|
||||||
|
<Row>
|
||||||
|
<Combobox options={listType} value={selectedType()} onChange={setSelectedType} placeholder="Select Type" />
|
||||||
<Button label="Refresh Data" edges="curved" design="bo-primary" icon={VsRefresh} onClick={refresh}></Button>
|
<Button label="Refresh Data" edges="curved" design="bo-primary" icon={VsRefresh} onClick={refresh}></Button>
|
||||||
</Row>
|
</Row>
|
||||||
|
</Row>
|
||||||
</Padding>
|
</Padding>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
|
|
@ -589,8 +595,11 @@ export default () => {
|
||||||
<Padding top={0} bottom={0} right={10} left={10}>
|
<Padding top={0} bottom={0} right={10} left={10}>
|
||||||
<Row content="split">
|
<Row content="split">
|
||||||
<Input value={filter()} onChange={setFilter} placeholder="Filter Application Number" />
|
<Input value={filter()} onChange={setFilter} placeholder="Filter Application Number" />
|
||||||
|
<Row>
|
||||||
|
<Combobox options={listType} value={selectedType()} onChange={setSelectedType} placeholder="Select Type" />
|
||||||
<Button label="Refresh Data" edges="curved" design="bo-primary" icon={VsRefresh} onClick={refresh}></Button>
|
<Button label="Refresh Data" edges="curved" design="bo-primary" icon={VsRefresh} onClick={refresh}></Button>
|
||||||
</Row>
|
</Row>
|
||||||
|
</Row>
|
||||||
</Padding>
|
</Padding>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
|
|
@ -680,8 +689,11 @@ export default () => {
|
||||||
<Padding top={0} bottom={0} right={10} left={10}>
|
<Padding top={0} bottom={0} right={10} left={10}>
|
||||||
<Row content="split">
|
<Row content="split">
|
||||||
<Input value={filter()} onChange={setFilter} placeholder="Filter Application Number" />
|
<Input value={filter()} onChange={setFilter} placeholder="Filter Application Number" />
|
||||||
|
<Row gap={0.5}>
|
||||||
|
<Combobox options={listType} value={selectedType()} onChange={setSelectedType} placeholder="Select Type" width='200px'/>
|
||||||
<Button label="Refresh Data" edges="curved" design="bo-primary" icon={VsRefresh} onClick={refresh}></Button>
|
<Button label="Refresh Data" edges="curved" design="bo-primary" icon={VsRefresh} onClick={refresh}></Button>
|
||||||
</Row>
|
</Row>
|
||||||
|
</Row>
|
||||||
</Padding>
|
</Padding>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue