Compare commits
8 commits
71564cd6fa
...
55f17c4ef6
| Author | SHA1 | Date | |
|---|---|---|---|
| 55f17c4ef6 | |||
| 99cd91158a | |||
| d7fadb74d6 | |||
| 257da50a83 | |||
| 00471abee4 | |||
| 155e5e6e0b | |||
| 76ecc10903 | |||
| 788007ca03 |
9 changed files with 179 additions and 100 deletions
|
|
@ -98,7 +98,7 @@ func connect() {
|
|||
case "get-listopapproval-electrical":
|
||||
array := []string{}
|
||||
|
||||
results, err := db.Query("SELECT DISTINCT electricalid FROM electricaldocflowtxn WHERE remarks = 'FOR ELECTRICAL ORDER OF PAYMENT APPROVAL'")
|
||||
results, err := db.Query("SELECT DISTINCT electricalid as result FROM electricaldocflowtxn WHERE remarks = 'FOR ELECTRICAL ORDER OF PAYMENT APPROVAL'")
|
||||
if err != nil {
|
||||
c.AbortWithError(http.StatusBadRequest, err)
|
||||
c.String(http.StatusBadRequest, err.Error())
|
||||
|
|
@ -113,6 +113,31 @@ func connect() {
|
|||
}
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"result": array,
|
||||
})
|
||||
|
||||
case "get-list-assessors":
|
||||
var result2 string
|
||||
|
||||
array := []string{}
|
||||
array2 := []string{}
|
||||
|
||||
results, err := db.Query("SELECT employeeid as result, employeename as result2 FROM employee WHERE is_assessment = 1")
|
||||
if err != nil {
|
||||
c.AbortWithError(http.StatusBadRequest, err)
|
||||
c.String(http.StatusBadRequest, err.Error())
|
||||
}
|
||||
for results.Next() {
|
||||
err = results.Scan(&result, &result2)
|
||||
if err != nil {
|
||||
c.AbortWithError(http.StatusBadRequest, err)
|
||||
c.String(http.StatusBadRequest, err.Error())
|
||||
}
|
||||
array = append(array, result)
|
||||
array2 = append(array2, result2)
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"result": array,
|
||||
"result2": array2,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
@ -336,6 +361,7 @@ func connect() {
|
|||
"result4": array4,
|
||||
})
|
||||
|
||||
|
||||
case "get-laststatus-building":
|
||||
err := db.QueryRow(`SELECT IFNULL(remarks, '') AS result FROM docflowtxn WHERE docflowtxnid = (SELECT MAX(docflowtxnid) FROM docflowtxn WHERE receivingid = ?)`, data).Scan(&result)
|
||||
if err != nil {
|
||||
|
|
@ -397,6 +423,8 @@ func connect() {
|
|||
"result": result,
|
||||
})
|
||||
|
||||
|
||||
|
||||
case "GetFeesBuilding":
|
||||
var result2, result3 string
|
||||
array := []string{}
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 13 KiB |
41
src/components/Combobox/Combobox.tsx
Normal file
41
src/components/Combobox/Combobox.tsx
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import Input from '../../../fwt/components/Input'
|
||||
import { createSignal } from 'solid-js'
|
||||
|
||||
interface Props {
|
||||
placeholder?: string
|
||||
value?: string
|
||||
onChange?: (value: string) => void
|
||||
options: string[]
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
const [sample, setSample] = createSignal(props.value || '')
|
||||
const [isOpen, setIsOpen] = createSignal(false)
|
||||
const [selectedOption, setSelectedOption] = createSignal('')
|
||||
|
||||
const handleInputChange = (val: string) => {
|
||||
setSample(val)
|
||||
setSelectedOption('')
|
||||
setIsOpen(true)
|
||||
}
|
||||
|
||||
const handleSelectOption = (option: string) => {
|
||||
setSelectedOption(option)
|
||||
setSample(option)
|
||||
setIsOpen(false)
|
||||
props.onChange?.(option)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Input onChange={handleInputChange} placeholder={props.placeholder || 'Select an option'} value={sample()}></Input>
|
||||
{isOpen() && (
|
||||
<ul>
|
||||
{props.options.map((option, index) => (
|
||||
<li onClick={() => handleSelectOption(option)}>{option}</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
26
src/components/RegistrationForm/RegistrantionForm.tsx
Normal file
26
src/components/RegistrationForm/RegistrantionForm.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { Button, Logo, Link, Box, Page, Form, Row, Column, Image, Copyright, OptimizeLogo, Display, Padding } from '../../../fwt/'
|
||||
import Input from '../../components/Input/Input'
|
||||
import Combobox from '../../components/Combobox/Combobox'
|
||||
import { ofetch } from 'ofetch'
|
||||
import { createSignal } from 'solid-js'
|
||||
|
||||
const api = import.meta.env.BACKEND
|
||||
const assessors = await ofetch(api + 'get-list-assessors', { parseResponse: JSON.parse })
|
||||
const assessorsIDList = assessors.result
|
||||
const assessorsNameList = assessors.result2
|
||||
|
||||
const [sample, setSample] = createSignal('')
|
||||
|
||||
export default () => {
|
||||
return (
|
||||
<>
|
||||
<Column>
|
||||
<Form>
|
||||
<span>Name</span>
|
||||
{/* <Combobox placeholder="Enter Name" value="1" onChange={() => console.log(1)} /> */}
|
||||
<span>{assessorsNameList}</span>
|
||||
</Form>
|
||||
</Column>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
@ -20,8 +20,6 @@ export default () => {
|
|||
const response = await ofetch(api + 'get-laststatus-electrical/' + list[i], { parseResponse: JSON.parse })
|
||||
if (response.result === 'FOR ELECTRICAL ORDER OF PAYMENT APPROVAL') {
|
||||
newList.push(list[i])
|
||||
} else {
|
||||
// console.log(response.result)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -43,8 +41,6 @@ export default () => {
|
|||
const listOfReadyForApproval = await getListOfReadyForApproval()
|
||||
const listOfReadyForApprovalFiltered = await getListOfReadyForApprovalFiltered(listOfReadyForApproval)
|
||||
await getApplicationById(listOfReadyForApprovalFiltered)
|
||||
|
||||
console.log(updatedList())
|
||||
}
|
||||
|
||||
load()
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@ import { Background, HTML } from '../../fwt'
|
|||
---
|
||||
|
||||
<HTML title={title} name={websiteName} description={websiteDescription} font="roboto" author="Patrick Alvin Alcala">
|
||||
<Background color="#16212c" />
|
||||
<Background image />
|
||||
<slot />
|
||||
</HTML>
|
||||
|
|
|
|||
|
|
@ -33,53 +33,33 @@ import Table from '../components/Table/Table'
|
|||
<Padding left={4.75} right={4.75}>
|
||||
<Row content="split">
|
||||
<Display desktop tablet>
|
||||
<Link to="/">
|
||||
<Row content="left" gap={2}>
|
||||
<Logo size={200} />
|
||||
<h1>OCBO e-Sign</h1>
|
||||
</Row>
|
||||
</Display>
|
||||
</Link>
|
||||
|
||||
<Row content="left" gap={1}>
|
||||
<span class="name">Patrick Alvin Alcala</span>
|
||||
<Link to="/"><FiLogOut size={25} /></Link>
|
||||
</Row>
|
||||
</Row>
|
||||
</Display>
|
||||
|
||||
<Row content="center">
|
||||
<h2>List of Ready to Approve and Sign OP (Order of Payments)</h2>
|
||||
</Row>
|
||||
|
||||
<Table client:load />
|
||||
|
||||
<!-- <table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Application Number</th>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>25-000011</td>
|
||||
<td>123</td>
|
||||
<td id="modal-button"><Button label="Show Details" design="bu-ghost" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>25-000012</td>
|
||||
<td>Another Name</td>
|
||||
<td><Button label="Show Details" design="bu-ghost" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table> -->
|
||||
</Row>
|
||||
</Padding>
|
||||
</Page>
|
||||
|
||||
<div id="modal" style="display: none">
|
||||
<Modal background="rgba(0,0,0,0.5)">
|
||||
<h1>SAMPLE</h1>
|
||||
</Modal>
|
||||
</div>
|
||||
</Layout>
|
||||
</Page>
|
||||
|
||||
<style lang="sass">
|
||||
@use '/src/styles/variables.sass' as vars
|
||||
|
|
@ -99,3 +79,4 @@ import Table from '../components/Table/Table'
|
|||
.name
|
||||
font-size: 1.25rem
|
||||
</style>
|
||||
</Layout>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
import Layout from '../layouts/Layout.astro'
|
||||
import { Button, Logo, Link, Page, Footer, Row, Column, Image, Copyright, OptimizeLogo, Display, Padding } from '../../fwt/'
|
||||
import { Button, Logo, Link, Box, Page, Form, Row, Column, Image, Copyright, OptimizeLogo, Display, Padding } from '../../fwt/'
|
||||
import RegistrationForm from '../components/RegistrationForm/RegistrantionForm'
|
||||
---
|
||||
|
||||
<Layout title="Register - OCBO e-Sign">
|
||||
|
|
@ -8,26 +9,30 @@ import { Button, Logo, Link, Page, Footer, Row, Column, Image, Copyright, Optimi
|
|||
<Padding left={4.75} right={4.75}>
|
||||
<Display desktop tablet>
|
||||
<Row content="split">
|
||||
<Link to="/">
|
||||
<Row content="left" gap={2}>
|
||||
<Logo size={200} />
|
||||
<h1>OCBO e-Sign</h1>
|
||||
</Row>
|
||||
</Link>
|
||||
|
||||
<Button label="Register" edges="curved" to="/main" />
|
||||
</Row>
|
||||
</Display>
|
||||
|
||||
<Display mobile>
|
||||
<Column content="center">
|
||||
<Link to="/">
|
||||
<Logo size={120} />
|
||||
<h1>OCBO e-Sign</h1>
|
||||
</Link>
|
||||
|
||||
<Button label="Register" edges="curved" to="/main" />
|
||||
</Column>
|
||||
</Display>
|
||||
|
||||
<RegistrationForm />
|
||||
</Display>
|
||||
</Padding>
|
||||
</Page>
|
||||
</Layout>
|
||||
|
||||
<style lang="sass">
|
||||
@use '/src/styles/variables.sass' as vars
|
||||
|
|
@ -43,3 +48,5 @@ import { Button, Logo, Link, Page, Footer, Row, Column, Image, Copyright, Optimi
|
|||
.div
|
||||
width: 8rem
|
||||
</style>
|
||||
</Page>
|
||||
</Layout>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue