From d6dcec01a0311dfb3f5ae0e06e8982c5a912fb27 Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Mon, 27 Oct 2025 11:42:34 +0800 Subject: [PATCH 1/4] Added icon for button --- src/components/Button/Button.tsx | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 0bb57ef..85b2826 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -1,6 +1,7 @@ import './Button.sass' -import { Show, Switch, Match } from 'solid-js' +import { Show, Switch, Match, type JSXElement } from 'solid-js' import { A } from '@solidjs/router' +import { Row } from '../index' interface Props { label?: string @@ -12,6 +13,7 @@ interface Props { newtab?: boolean width?: number wide?: boolean + icon?: (props: { size?: number }) => JSXElement } const getBorderRadius = (edge: Props['edges']) => { @@ -29,7 +31,7 @@ const getBorderRadius = (edge: Props['edges']) => { export default (props: Props) => { const borderRadius = getBorderRadius(props.edges) - + const Icon = props.icon return ( <> @@ -37,6 +39,9 @@ export default (props: Props) => { @@ -44,6 +49,9 @@ export default (props: Props) => { @@ -56,25 +64,39 @@ export default (props: Props) => { From 1816cdf488530a423cdf244a0755b25f2ed40087 Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Mon, 27 Oct 2025 11:42:50 +0800 Subject: [PATCH 2/4] Updated main page --- src/pages/MainPage/Main.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/pages/MainPage/Main.tsx b/src/pages/MainPage/Main.tsx index 9043640..16d0eeb 100644 --- a/src/pages/MainPage/Main.tsx +++ b/src/pages/MainPage/Main.tsx @@ -10,6 +10,7 @@ import { FaSolidThumbsUp } from 'solid-icons/fa' import { _employeeName } from '../../stores/employee' import { useNavigate } from '@solidjs/router' import { _applicationNo, _date, _optn, _name, _location, _type, _assessor, _feeList, _codeList, _amountList, _signatureAssessor, _signatureApprover, _assessorid, _approvedDate, _assessedDate } from '../../stores/pdfinfo' +import { VsRefresh } from 'solid-icons/vs' const API = import.meta.env.VITE_BACKEND const PESO = import.meta.env.VITE_PESO @@ -167,7 +168,7 @@ export default () => { const postPops = async (application: string) => { const applicationId = await ofetch(API + 'get-idbyapplication-electrical/' + application, { parseResponse: JSON.parse }) const response = await ofetch(API + 'get-popsdetails-electrical/' + applicationId.result, { parseResponse: JSON.parse }) - const applicationNo = response.result[0] + // const applicationNo = response.result[0] const customerid = response.result2[0] const customerName = response.result3[0] const location = response.result4[0] @@ -181,7 +182,7 @@ export default () => { const formattedDate = dayjs(today).format('YYYY-MM-DD') const formattedDatewithTime = dayjs(today).format('YYYY-MM-DD HH:mm:ss') - for (let i = 0; i < applicationNo.length; i++) { + for (let i = 0; i < response.result.length; i++) { await ofetch(API + 'post-pops', { method: 'POST', body: { data: application, data2: formattedDate, data3: customerid, data4: customerName, data5: location, data6: codeList[i], data7: amountList[i], data8: NAME, data9: formattedDatewithTime, data10: lguList[i], data11: dpwhList[i], data12: boList[i], data13: PUBLICIP }, @@ -279,6 +280,10 @@ export default () => { } } + const refresh = async () => { + await load() + } + const logout = async () => { removeEmployee() navigate('/') @@ -380,6 +385,12 @@ export default () => {

List of Ready to Approve and Sign in Electrical Order of Payments

+ + + + + + From 4af26755662884256f8a057a8f4999b7ea0ff7b8 Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Mon, 27 Oct 2025 11:43:03 +0800 Subject: [PATCH 3/4] Adjusted table margin --- src/styles/classes.sass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/classes.sass b/src/styles/classes.sass index fc03ee4..a5fb9f4 100644 --- a/src/styles/classes.sass +++ b/src/styles/classes.sass @@ -79,7 +79,7 @@ .table width: 80% border-collapse: collapse - margin: 2rem + margin: 1rem box-shadow: inset 0 1px 2px #16212C, 0 2px 4px #2a3f5332, 0 4px 8px #344c654e th, td From 577066c9eacf6a81af049b4f429b683f85bde158 Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Mon, 27 Oct 2025 15:52:30 +0800 Subject: [PATCH 4/4] Fixed submission on pops --- src/pages/MainPage/Main.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/MainPage/Main.tsx b/src/pages/MainPage/Main.tsx index 16d0eeb..6bb37cd 100644 --- a/src/pages/MainPage/Main.tsx +++ b/src/pages/MainPage/Main.tsx @@ -15,7 +15,7 @@ import { VsRefresh } from 'solid-icons/vs' const API = import.meta.env.VITE_BACKEND const PESO = import.meta.env.VITE_PESO const ID = import.meta.env.VITE_HEADID -const NAME = import.meta.env.VITE_HEAD +// const NAME = import.meta.env.VITE_HEAD const PUBLICIP = import.meta.env.VITE_PUBLICIP export default () => { @@ -185,7 +185,7 @@ export default () => { for (let i = 0; i < response.result.length; i++) { await ofetch(API + 'post-pops', { method: 'POST', - body: { data: application, data2: formattedDate, data3: customerid, data4: customerName, data5: location, data6: codeList[i], data7: amountList[i], data8: NAME, data9: formattedDatewithTime, data10: lguList[i], data11: dpwhList[i], data12: boList[i], data13: PUBLICIP }, + body: { data: application, data2: formattedDate, data3: customerid, data4: customerName, data5: location, data6: codeList[i], data7: amountList[i], data8: assessor(), data9: formattedDatewithTime, data10: lguList[i], data11: dpwhList[i], data12: boList[i], data13: PUBLICIP }, }) } }