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,22 +98,47 @@ func connect() {
|
||||||
case "get-listopapproval-electrical":
|
case "get-listopapproval-electrical":
|
||||||
array := []string{}
|
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 {
|
if err != nil {
|
||||||
c.AbortWithError(http.StatusBadRequest, err)
|
c.AbortWithError(http.StatusBadRequest, err)
|
||||||
c.String(http.StatusBadRequest, err.Error())
|
c.String(http.StatusBadRequest, err.Error())
|
||||||
}
|
}
|
||||||
for results.Next() {
|
for results.Next() {
|
||||||
err = results.Scan(&result)
|
err = results.Scan(&result)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.AbortWithError(http.StatusBadRequest, err)
|
c.AbortWithError(http.StatusBadRequest, err)
|
||||||
c.String(http.StatusBadRequest, err.Error())
|
c.String(http.StatusBadRequest, err.Error())
|
||||||
}
|
}
|
||||||
array = append(array, result)
|
array = append(array, result)
|
||||||
}
|
}
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
"result": array,
|
"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,
|
"result4": array4,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
case "get-laststatus-building":
|
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)
|
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 {
|
if err != nil {
|
||||||
|
|
@ -397,6 +423,8 @@ func connect() {
|
||||||
"result": result,
|
"result": result,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case "GetFeesBuilding":
|
case "GetFeesBuilding":
|
||||||
var result2, result3 string
|
var result2, result3 string
|
||||||
array := []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 })
|
const response = await ofetch(api + 'get-laststatus-electrical/' + list[i], { parseResponse: JSON.parse })
|
||||||
if (response.result === 'FOR ELECTRICAL ORDER OF PAYMENT APPROVAL') {
|
if (response.result === 'FOR ELECTRICAL ORDER OF PAYMENT APPROVAL') {
|
||||||
newList.push(list[i])
|
newList.push(list[i])
|
||||||
} else {
|
|
||||||
// console.log(response.result)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -43,8 +41,6 @@ export default () => {
|
||||||
const listOfReadyForApproval = await getListOfReadyForApproval()
|
const listOfReadyForApproval = await getListOfReadyForApproval()
|
||||||
const listOfReadyForApprovalFiltered = await getListOfReadyForApprovalFiltered(listOfReadyForApproval)
|
const listOfReadyForApprovalFiltered = await getListOfReadyForApprovalFiltered(listOfReadyForApproval)
|
||||||
await getApplicationById(listOfReadyForApprovalFiltered)
|
await getApplicationById(listOfReadyForApprovalFiltered)
|
||||||
|
|
||||||
console.log(updatedList())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
load()
|
load()
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,6 @@ import { Background, HTML } from '../../fwt'
|
||||||
---
|
---
|
||||||
|
|
||||||
<HTML title={title} name={websiteName} description={websiteDescription} font="roboto" author="Patrick Alvin Alcala">
|
<HTML title={title} name={websiteName} description={websiteDescription} font="roboto" author="Patrick Alvin Alcala">
|
||||||
<Background color="#16212c" />
|
<Background image />
|
||||||
<slot />
|
<slot />
|
||||||
</HTML>
|
</HTML>
|
||||||
|
|
|
||||||
|
|
@ -33,69 +33,50 @@ import Table from '../components/Table/Table'
|
||||||
<Padding left={4.75} right={4.75}>
|
<Padding left={4.75} right={4.75}>
|
||||||
<Row content="split">
|
<Row content="split">
|
||||||
<Display desktop tablet>
|
<Display desktop tablet>
|
||||||
<Row content="left" gap={2}>
|
<Link to="/">
|
||||||
<Logo size={200} />
|
<Row content="left" gap={2}>
|
||||||
<h1>OCBO e-Sign</h1>
|
<Logo size={200} />
|
||||||
|
<h1>OCBO e-Sign</h1>
|
||||||
|
</Row>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<Row content="left" gap={1}>
|
||||||
|
<span class="name">Patrick Alvin Alcala</span>
|
||||||
|
<Link to="/"><FiLogOut size={25} /></Link>
|
||||||
</Row>
|
</Row>
|
||||||
</Display>
|
</Display>
|
||||||
|
|
||||||
<Row content="left" gap={1}>
|
<Row content="center">
|
||||||
<span class="name">Patrick Alvin Alcala</span>
|
<h2>List of Ready to Approve and Sign OP (Order of Payments)</h2>
|
||||||
<Link to="/"><FiLogOut size={25} /></Link>
|
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
|
<Table client:load />
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<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> -->
|
|
||||||
</Padding>
|
</Padding>
|
||||||
|
|
||||||
|
<div id="modal" style="display: none">
|
||||||
|
<Modal background="rgba(0,0,0,0.5)">
|
||||||
|
<h1>SAMPLE</h1>
|
||||||
|
</Modal>
|
||||||
|
</div>
|
||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
<div id="modal" style="display: none">
|
<style lang="sass">
|
||||||
<Modal background="rgba(0,0,0,0.5)">
|
@use '/src/styles/variables.sass' as vars
|
||||||
<h1>SAMPLE</h1>
|
@use 'sass:color'
|
||||||
</Modal>
|
|
||||||
</div>
|
.padding
|
||||||
|
margin: 11rem
|
||||||
|
border: 1px solid red
|
||||||
|
|
||||||
|
h1
|
||||||
|
font-size: 3.25rem
|
||||||
|
color: vars.$textColor
|
||||||
|
|
||||||
|
.div
|
||||||
|
width: 8rem
|
||||||
|
|
||||||
|
.name
|
||||||
|
font-size: 1.25rem
|
||||||
|
</style>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
<style lang="sass">
|
|
||||||
@use '/src/styles/variables.sass' as vars
|
|
||||||
@use 'sass:color'
|
|
||||||
|
|
||||||
.padding
|
|
||||||
margin: 11rem
|
|
||||||
border: 1px solid red
|
|
||||||
|
|
||||||
h1
|
|
||||||
font-size: 3.25rem
|
|
||||||
color: vars.$textColor
|
|
||||||
|
|
||||||
.div
|
|
||||||
width: 8rem
|
|
||||||
|
|
||||||
.name
|
|
||||||
font-size: 1.25rem
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
import Layout from '../layouts/Layout.astro'
|
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">
|
<Layout title="Register - OCBO e-Sign">
|
||||||
|
|
@ -8,38 +9,44 @@ import { Button, Logo, Link, Page, Footer, Row, Column, Image, Copyright, Optimi
|
||||||
<Padding left={4.75} right={4.75}>
|
<Padding left={4.75} right={4.75}>
|
||||||
<Display desktop tablet>
|
<Display desktop tablet>
|
||||||
<Row content="split">
|
<Row content="split">
|
||||||
<Row content="left" gap={2}>
|
<Link to="/">
|
||||||
<Logo size={200} />
|
<Row content="left" gap={2}>
|
||||||
<h1>OCBO e-Sign</h1>
|
<Logo size={200} />
|
||||||
</Row>
|
<h1>OCBO e-Sign</h1>
|
||||||
|
</Row>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Button label="Register" edges="curved" to="/main" />
|
<Button label="Register" edges="curved" to="/main" />
|
||||||
</Row>
|
</Row>
|
||||||
</Display>
|
|
||||||
|
|
||||||
<Display mobile>
|
<Display mobile>
|
||||||
<Column content="center">
|
<Column content="center">
|
||||||
<Logo size={120} />
|
<Link to="/">
|
||||||
<h1>OCBO e-Sign</h1>
|
<Logo size={120} />
|
||||||
|
<h1>OCBO e-Sign</h1>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Button label="Register" edges="curved" to="/main" />
|
<Button label="Register" edges="curved" to="/main" />
|
||||||
</Column>
|
</Column>
|
||||||
|
</Display>
|
||||||
|
|
||||||
|
<RegistrationForm />
|
||||||
</Display>
|
</Display>
|
||||||
</Padding>
|
</Padding>
|
||||||
|
|
||||||
|
<style lang="sass">
|
||||||
|
@use '/src/styles/variables.sass' as vars
|
||||||
|
@use '/src/styles/breakpoint.sass' as views
|
||||||
|
|
||||||
|
h1
|
||||||
|
font-size: 3.25rem
|
||||||
|
color: vars.$textColor
|
||||||
|
|
||||||
|
@media only screen and (max-width: views.$mobile)
|
||||||
|
font-size: 2.25rem
|
||||||
|
|
||||||
|
.div
|
||||||
|
width: 8rem
|
||||||
|
</style>
|
||||||
</Page>
|
</Page>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
<style lang="sass">
|
|
||||||
@use '/src/styles/variables.sass' as vars
|
|
||||||
@use '/src/styles/breakpoint.sass' as views
|
|
||||||
|
|
||||||
h1
|
|
||||||
font-size: 3.25rem
|
|
||||||
color: vars.$textColor
|
|
||||||
|
|
||||||
@media only screen and (max-width: views.$mobile)
|
|
||||||
font-size: 2.25rem
|
|
||||||
|
|
||||||
.div
|
|
||||||
width: 8rem
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue