Updated pages

This commit is contained in:
Patrick Alvin Alcala 2026-02-04 18:28:35 +08:00
parent b1024daa59
commit f4ab256fa0
4 changed files with 177 additions and 94 deletions

View file

@ -44,7 +44,7 @@ class IndexPage extends StatelessWidget {
child: Column(
children: [
const Gap(88),
const ImageWidget(imagePath: 'assets/logo.webp', size: 160, measureByHeight: false),
const ImageWidget(imagePath: 'assets/esign-mobile.webp', size: 160, measureByHeight: false),
const Gap(20),
const TextWidget(
text: "OCBO e-Sign",

View file

@ -120,8 +120,8 @@ class _LoginPageState extends State<LoginPage> {
child: Column(
children: [
const Gap(88),
const ImageWidget(imagePath: 'assets/logo.webp', size: 100, measureByHeight: true),
const Gap(58),
const ImageWidget(imagePath: 'assets/esign-mobile.webp', size: 148, measureByHeight: true),
const Gap(32),
LoginBoxWidget(
title: 'Login',
content: Column(
@ -135,6 +135,7 @@ class _LoginPageState extends State<LoginPage> {
const Gap(8),
InputWidget(controller: _passwordController, password: true),
const Gap(24),
// ValueListenableBuilder<String>(
// valueListenable: passwordNotifier,
// builder: (context, password, child) {
@ -145,6 +146,18 @@ class _LoginPageState extends State<LoginPage> {
// );
// },
// ),
ValueListenableBuilder<String>(
valueListenable: passwordNotifier,
builder: (context, password, child) {
return ButtonWidget(
text: _passwordController.text.isNotEmpty
? "Stop typing, login not ready"
: 'Not yet functional',
onPressed: _ignoreButton,
disabled: true,
);
},
),
],
),
),

View file

@ -19,21 +19,27 @@ class ValidateDetailPage extends StatefulWidget {
class _ValidateDetailPageState extends State<ValidateDetailPage> {
final _searchController = TextEditingController();
late int _total = 0;
final NumberFormat formatter = NumberFormat('#,###.##');
final dateFormatter = DateFormat('yyyy-MM-dd');
// final Color greenColor = const Color(0xFF4CCE51);
late int _total = 0;
late List _applicationList = [];
late List _dateList = [];
void _getTotalSigned() async {
final name = await blocGetQr(context);
final responseCount = await getApi('get-transactions-count', name, null);
final total = responseCount['result'];
final response = await getApi('get-transactions', name, null);
final applicationNoList = response['result'];
final dateList = response['result2'];
setState(() {
_total = double.parse(total).toInt();
_applicationList = applicationNoList;
_dateList = dateList;
});
// final response = await getApi('get-transactions', name, null);
// final applicationNoList = response['result'];
// final dateList = response['result2'];
}
@override
@ -64,19 +70,10 @@ class _ValidateDetailPageState extends State<ValidateDetailPage> {
),
),
child: SizedBox(
width: MediaQuery.of(context).size.width - 104,
width: MediaQuery.of(context).size.width - 112,
child: Column(
children: [
const Gap(88),
ClipRRect(
borderRadius: BorderRadius.circular(36),
child: InputWidget(
controller: _searchController,
password: false,
placeholder: 'Search Application Number',
),
),
const Gap(24),
BoxWidget(
circular: 16,
content: Row(
@ -85,81 +82,153 @@ class _ValidateDetailPageState extends State<ValidateDetailPage> {
Column(
children: [
TextWidget(text: formatter.format(_total), size: 50, bold: true),
TextWidget(text: 'Total Signed Applications', size: 16),
const TextWidget(text: 'Total Signed Applications', size: 16),
],
),
],
),
),
const Gap(16),
(Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
BoxWidget(
alignment: CrossAxisAlignment.center,
circular: 16,
content: Row(
children: [
const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true),
const Gap(16),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(text: '23-000123', size: 18, bold: true),
const Gap(4),
TextWidget(text: 'Total Signed Applications', size: 12),
],
),
],
ClipRRect(
// borderRadius: BorderRadius.circular(36),
child: InputWidget(
controller: _searchController,
password: false,
placeholder: 'Search Application Number',
),
),
const Gap(8),
BoxWidget(
alignment: CrossAxisAlignment.center,
circular: 16,
content: Row(
children: [
const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true),
const Gap(16),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(text: '23-000123', size: 18, bold: true),
const Gap(4),
TextWidget(text: 'Total Signed Applications', size: 12),
const Gap(4),
const Gap(24),
// ListView(
// scrollDirection: Axis.horizontal,
// padding: EdgeInsets.symmetric(horizontal: 16),
// children: [
// // BoxWidget(
// // alignment: CrossAxisAlignment.center,
// // circular: 16,
// // content: Row(
// // children: [
// // const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true),
// // const Gap(16),
// // Column(
// // crossAxisAlignment: CrossAxisAlignment.start,
// // children: [
// // TextWidget(text: '23-000123', size: 18, bold: true),
// // const Gap(4),
// // TextWidget(text: 'Total Signed Applications', size: 12),
// // ],
// // ),
// // ],
// // ),
// // ),
// ],
// ),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [TextWidget(text: 'Dates', size: 8)],
),
child: ListView.builder(
itemCount: _total,
itemBuilder: (BuildContext context, int index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
children: [
BoxWidget(
alignment: CrossAxisAlignment.center,
circular: 16,
content: Row(
children: [
const ImageWidget(imagePath: 'assets/esign-check.webp', size: 40, measureByHeight: true),
const Gap(16),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(text: _applicationList[index], size: 18, bold: true),
const Gap(4),
SizedBox(
width: 190,
child: TextWidget(text: '8990 Housing Development Corporation', size: 10),
),
const Gap(4),
TextWidget(text: _dateList[index], size: 10, opacity: 0.8),
],
),
],
),
),
const Gap(8),
BoxWidget(
alignment: CrossAxisAlignment.center,
circular: 16,
content: Row(
children: [
const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true),
const Gap(16),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(text: '23-000123', size: 18, bold: true),
const Gap(4),
TextWidget(text: 'Total Signed Applications', size: 12),
],
),
],
);
},
),
),
],
)),
// Column(
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// BoxWidget(
// alignment: CrossAxisAlignment.center,
// circular: 16,
// content: Row(
// children: [
// const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true),
// const Gap(16),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// TextWidget(text: '23-000123', size: 18, bold: true),
// const Gap(4),
// TextWidget(text: 'Total Signed Applications', size: 12),
// ],
// ),
// ],
// ),
// ),
// // const Gap(8),
// // BoxWidget(
// // alignment: CrossAxisAlignment.center,
// // circular: 16,
// // content: Row(
// // children: [
// // const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true),
// // const Gap(16),
// // Column(
// // crossAxisAlignment: CrossAxisAlignment.start,
// // children: [
// // TextWidget(text: '23-000123', size: 18, bold: true),
// // const Gap(4),
// // TextWidget(text: 'Total Signed Applications', size: 12),
// // const Gap(4),
// // Expanded(
// // child: Row(
// // mainAxisAlignment: MainAxisAlignment.end,
// // children: [TextWidget(text: 'Dates', size: 8)],
// // ),
// // ),
// // ],
// // ),
// // ],
// // ),
// // ),
// // const Gap(8),
// // BoxWidget(
// // alignment: CrossAxisAlignment.center,
// // circular: 16,
// // content: Row(
// // children: [
// // const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true),
// // const Gap(16),
// // Column(
// // crossAxisAlignment: CrossAxisAlignment.start,
// // children: [
// // TextWidget(text: '23-000123', size: 18, bold: true),
// // const Gap(4),
// // TextWidget(text: 'Total Signed Applications', size: 12),
// // ],
// // ),
// // ],
// // ),
// // ),
// ],
// ),
],
),
),

View file

@ -113,7 +113,7 @@ class _BarcodeScannerScreenState extends State<BarcodeScannerScreen> {
resizeToAvoidBottomInset: false,
body: Container(
alignment: Alignment.center,
height: MediaQuery.of(context).size.height,
height: MediaQuery.of(context).size.height * 1.2,
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
@ -187,12 +187,12 @@ class _BarcodeScannerScreenState extends State<BarcodeScannerScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: MediaQuery.of(context).size.width - 160,
padding: const EdgeInsets.fromLTRB(8, 16, 8, 26),
width: 220,
padding: const EdgeInsets.fromLTRB(0, 16, 0, 32),
decoration: BoxDecoration(
border: BoxBorder.all(color: redColor),
color: redColorShade,
borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(32),
),
child: Column(
children: [
@ -220,12 +220,12 @@ class _BarcodeScannerScreenState extends State<BarcodeScannerScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: MediaQuery.of(context).size.width - 160,
padding: const EdgeInsets.fromLTRB(8, 16, 8, 26),
width: 220,
padding: const EdgeInsets.fromLTRB(0, 16, 0, 32),
decoration: BoxDecoration(
border: BoxBorder.all(color: redColor),
color: redColorShade,
borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(32),
),
child: Column(
children: [
@ -252,12 +252,13 @@ class _BarcodeScannerScreenState extends State<BarcodeScannerScreen> {
Column(
children: [
Container(
width: MediaQuery.of(context).size.width - 160,
padding: const EdgeInsets.fromLTRB(8, 16, 8, 26),
// width: MediaQuery.of(context).size.width - 160,
width: 220,
padding: const EdgeInsets.fromLTRB(0, 16, 0, 32),
decoration: BoxDecoration(
border: BoxBorder.all(color: greenColor),
color: greenColorShade,
borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(32),
),
child: Column(
children: [
@ -280,7 +281,7 @@ class _BarcodeScannerScreenState extends State<BarcodeScannerScreen> {
const Gap(24),
TextWidget(text: qrResult, bold: true, size: 20, color: greenColor),
const Gap(24),
ButtonWidget(text: "Show Details", disabled: false, onPressed: gotoDetails),
ButtonWidget(text: "Check Signed Applications", disabled: false, onPressed: gotoDetails),
],
),
],