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( child: Column(
children: [ children: [
const Gap(88), 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 Gap(20),
const TextWidget( const TextWidget(
text: "OCBO e-Sign", text: "OCBO e-Sign",

View file

@ -120,8 +120,8 @@ class _LoginPageState extends State<LoginPage> {
child: Column( child: Column(
children: [ children: [
const Gap(88), const Gap(88),
const ImageWidget(imagePath: 'assets/logo.webp', size: 100, measureByHeight: true), const ImageWidget(imagePath: 'assets/esign-mobile.webp', size: 148, measureByHeight: true),
const Gap(58), const Gap(32),
LoginBoxWidget( LoginBoxWidget(
title: 'Login', title: 'Login',
content: Column( content: Column(
@ -135,6 +135,7 @@ class _LoginPageState extends State<LoginPage> {
const Gap(8), const Gap(8),
InputWidget(controller: _passwordController, password: true), InputWidget(controller: _passwordController, password: true),
const Gap(24), const Gap(24),
// ValueListenableBuilder<String>( // ValueListenableBuilder<String>(
// valueListenable: passwordNotifier, // valueListenable: passwordNotifier,
// builder: (context, password, child) { // 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> { class _ValidateDetailPageState extends State<ValidateDetailPage> {
final _searchController = TextEditingController(); final _searchController = TextEditingController();
late int _total = 0;
final NumberFormat formatter = NumberFormat('#,###.##'); 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 { void _getTotalSigned() async {
final name = await blocGetQr(context); final name = await blocGetQr(context);
final responseCount = await getApi('get-transactions-count', name, null); final responseCount = await getApi('get-transactions-count', name, null);
final total = responseCount['result']; final total = responseCount['result'];
final response = await getApi('get-transactions', name, null);
final applicationNoList = response['result'];
final dateList = response['result2'];
setState(() { setState(() {
_total = double.parse(total).toInt(); _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 @override
@ -64,19 +70,10 @@ class _ValidateDetailPageState extends State<ValidateDetailPage> {
), ),
), ),
child: SizedBox( child: SizedBox(
width: MediaQuery.of(context).size.width - 104, width: MediaQuery.of(context).size.width - 112,
child: Column( child: Column(
children: [ children: [
const Gap(88), const Gap(88),
ClipRRect(
borderRadius: BorderRadius.circular(36),
child: InputWidget(
controller: _searchController,
password: false,
placeholder: 'Search Application Number',
),
),
const Gap(24),
BoxWidget( BoxWidget(
circular: 16, circular: 16,
content: Row( content: Row(
@ -85,81 +82,153 @@ class _ValidateDetailPageState extends State<ValidateDetailPage> {
Column( Column(
children: [ children: [
TextWidget(text: formatter.format(_total), size: 50, bold: true), 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), const Gap(16),
(Column( ClipRRect(
crossAxisAlignment: CrossAxisAlignment.center, // borderRadius: BorderRadius.circular(36),
children: [ child: InputWidget(
BoxWidget( controller: _searchController,
alignment: CrossAxisAlignment.center, password: false,
circular: 16, placeholder: 'Search Application Number',
content: Row( ),
),
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: ListView.builder(
itemCount: _total,
itemBuilder: (BuildContext context, int index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true), BoxWidget(
const Gap(16), alignment: CrossAxisAlignment.center,
Column( circular: 16,
crossAxisAlignment: CrossAxisAlignment.start, content: Row(
children: [ children: [
TextWidget(text: '23-000123', size: 18, bold: true), const ImageWidget(imagePath: 'assets/esign-check.webp', size: 40, measureByHeight: true),
const Gap(4), const Gap(16),
TextWidget(text: 'Total Signed Applications', size: 12), Column(
], crossAxisAlignment: CrossAxisAlignment.start,
), children: [
], TextWidget(text: _applicationList[index], size: 18, bold: true),
), const Gap(4),
), SizedBox(
const Gap(8), width: 190,
BoxWidget( child: TextWidget(text: '8990 Housing Development Corporation', size: 10),
alignment: CrossAxisAlignment.center, ),
circular: 16, const Gap(4),
content: Row( TextWidget(text: _dateList[index], size: 10, opacity: 0.8),
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),
], ],
), );
), },
const Gap(8), ),
BoxWidget( ),
alignment: CrossAxisAlignment.center,
circular: 16, // Column(
content: Row( // crossAxisAlignment: CrossAxisAlignment.center,
children: [ // children: [
const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true), // BoxWidget(
const Gap(16), // alignment: CrossAxisAlignment.center,
Column( // circular: 16,
crossAxisAlignment: CrossAxisAlignment.start, // content: Row(
children: [ // children: [
TextWidget(text: '23-000123', size: 18, bold: true), // const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true),
const Gap(4), // const Gap(16),
TextWidget(text: 'Total Signed Applications', size: 12), // 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, resizeToAvoidBottomInset: false,
body: Container( body: Container(
alignment: Alignment.center, alignment: Alignment.center,
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height * 1.2,
decoration: const BoxDecoration( decoration: const BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment.topCenter, begin: Alignment.topCenter,
@ -187,12 +187,12 @@ class _BarcodeScannerScreenState extends State<BarcodeScannerScreen> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: MediaQuery.of(context).size.width - 160, width: 220,
padding: const EdgeInsets.fromLTRB(8, 16, 8, 26), padding: const EdgeInsets.fromLTRB(0, 16, 0, 32),
decoration: BoxDecoration( decoration: BoxDecoration(
border: BoxBorder.all(color: redColor), border: BoxBorder.all(color: redColor),
color: redColorShade, color: redColorShade,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(32),
), ),
child: Column( child: Column(
children: [ children: [
@ -220,12 +220,12 @@ class _BarcodeScannerScreenState extends State<BarcodeScannerScreen> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: MediaQuery.of(context).size.width - 160, width: 220,
padding: const EdgeInsets.fromLTRB(8, 16, 8, 26), padding: const EdgeInsets.fromLTRB(0, 16, 0, 32),
decoration: BoxDecoration( decoration: BoxDecoration(
border: BoxBorder.all(color: redColor), border: BoxBorder.all(color: redColor),
color: redColorShade, color: redColorShade,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(32),
), ),
child: Column( child: Column(
children: [ children: [
@ -252,12 +252,13 @@ class _BarcodeScannerScreenState extends State<BarcodeScannerScreen> {
Column( Column(
children: [ children: [
Container( Container(
width: MediaQuery.of(context).size.width - 160, // 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( decoration: BoxDecoration(
border: BoxBorder.all(color: greenColor), border: BoxBorder.all(color: greenColor),
color: greenColorShade, color: greenColorShade,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(32),
), ),
child: Column( child: Column(
children: [ children: [
@ -280,7 +281,7 @@ class _BarcodeScannerScreenState extends State<BarcodeScannerScreen> {
const Gap(24), const Gap(24),
TextWidget(text: qrResult, bold: true, size: 20, color: greenColor), TextWidget(text: qrResult, bold: true, size: 20, color: greenColor),
const Gap(24), const Gap(24),
ButtonWidget(text: "Show Details", disabled: false, onPressed: gotoDetails), ButtonWidget(text: "Check Signed Applications", disabled: false, onPressed: gotoDetails),
], ],
), ),
], ],