From ac4b122d074256beb507fac928070da40b7a2da6 Mon Sep 17 00:00:00 2001 From: Felix Date: Fri, 5 Jul 2019 16:15:09 +0100 Subject: [PATCH] About screen slightly updated, all transaction options can now be implemented (interface with API is now more complete) --- To Do List.rtf | 43 +++++++++++++++++-------- lib/common/functions/logout.dart | 7 ++++ lib/common/widgets/basic_drawer.dart | 4 +-- lib/pages/about_screen.dart | 48 +++++++++++++++------------- lib/pages/home_page.dart | 4 +-- lib/pages/receipt_page.dart | 1 - 6 files changed, 65 insertions(+), 42 deletions(-) create mode 100644 lib/common/functions/logout.dart diff --git a/To Do List.rtf b/To Do List.rtf index 5e0608e..a7ad29b 100644 --- a/To Do List.rtf +++ b/To Do List.rtf @@ -3,12 +3,14 @@ {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid1\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1} -{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid102\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li1440\lin1440 }{\listname ;}\listid2} -{\list\listtemplateid3\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid201\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid202\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li1440\lin1440 }{\listname ;}\listid3} +{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid101\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2} +{\list\listtemplateid3\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid201\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid202\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li1440\lin1440 }{\listname ;}\listid3} {\list\listtemplateid4\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid301\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid302\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li1440\lin1440 }{\listname ;}\listid4} -{\list\listtemplateid5\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid401\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid402\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li1440\lin1440 }{\listname ;}\listid5}} -{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}} -\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh9800\viewkind0 +{\list\listtemplateid5\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid401\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid402\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li1440\lin1440 }{\listname ;}\listid5} +{\list\listtemplateid6\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid501\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid502\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li1440\lin1440 }{\listname ;}\listid6} +{\list\listtemplateid7\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid601\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid7}} +{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}{\listoverride\listid7\listoverridecount0\ls7}} +\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh14260\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \f0\b\fs38 \cf0 \ul \ulc0 TODO\ @@ -16,35 +18,48 @@ \ls1\ilvl0\cf0 \ulnone {\listtext \uc0\u8259 } \f1\b0 Show username\ \ls1\ilvl0 -\f0\b \ - \ul \ulc0 Splash Screen\ +\f0\b {\listtext \uc0\u8259 }add \'91confirm logout\'92\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 +\cf0 \ +\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0 +\ls2\ilvl0\cf0 \ul Splash Screen\ \pard\tx940\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li1440\fi-1440\pardirnatural\partightenfactor0 -\ls2\ilvl1\cf0 \ulnone {\listtext \uc0\u8259 } +\ls3\ilvl1\cf0 \ulnone {\listtext \uc0\u8259 } \f1\b0 Splash screen transition - fade\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 -\f0\b \ul Login\ +\f0\b \cf0 \ul Login\ \pard\tx940\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li1440\fi-1440\pardirnatural\partightenfactor0 -\ls3\ilvl1\cf0 \ulnone {\listtext \uc0\u8259 } +\ls4\ilvl1\cf0 \ulnone {\listtext \uc0\u8259 } \f1\b0 Full page/ popover\ -\ls3\ilvl1 +\ls4\ilvl1 \f0\b {\listtext \uc0\u8259 } \f1\b0 Colours\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 -\f0\b \ul Navigation\ +\f0\b \cf0 \ul Navigation\ \pard\tx940\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li1440\fi-1440\pardirnatural\partightenfactor0 -\ls4\ilvl1\cf0 \ulnone {\listtext \uc0\u8259 } +\ls5\ilvl1\cf0 \ulnone {\listtext \uc0\u8259 } \f1\b0 Make it look good\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \cf0 \ \f0\b \ul Submit Receipt\ \pard\tx940\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li1440\fi-1440\pardirnatural\partightenfactor0 -\ls5\ilvl1\cf0 \ulnone {\listtext \uc0\u8259 } +\ls6\ilvl1\cf0 \ulnone {\listtext \uc0\u8259 } \f1\b0 Categories\ {\listtext \uc0\u8259 }Recurring\ {\listtext \uc0\u8259 }Sort out \'91essential purchase\'92 checkbox\'92s Y position\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 +\cf0 \ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 + +\f0\b \cf0 \ul Done\ +\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0 +\ls7\ilvl0 +\f1\b0 \cf0 \ulnone {\listtext \uc0\u8259 }submit receipt API implemented more fully so now all transaction options can be submitted\ } \ No newline at end of file diff --git a/lib/common/functions/logout.dart b/lib/common/functions/logout.dart new file mode 100644 index 0000000..8f9ba29 --- /dev/null +++ b/lib/common/functions/logout.dart @@ -0,0 +1,7 @@ +import 'package:flutter/material.dart'; +import 'package:local_spend/common/apifunctions/request_logout_api.dart'; + +logout(context) { + requestLogoutAPI(context); + Navigator.of(context).pushReplacementNamed('/LoginPage'); +} \ No newline at end of file diff --git a/lib/common/widgets/basic_drawer.dart b/lib/common/widgets/basic_drawer.dart index 85ab80e..f19c835 100644 --- a/lib/common/widgets/basic_drawer.dart +++ b/lib/common/widgets/basic_drawer.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:local_spend/common/apifunctions/request_logout_api.dart'; import 'package:local_spend/common/functions/get_token.dart'; +import 'package:local_spend/common/functions/logout.dart'; // debug import 'package:flutter/foundation.dart'; @@ -57,8 +58,7 @@ class _BasicDrawerState extends State { style: TextStyle(color: Colors.black, fontSize: 20.0), ), onTap: () { - requestLogoutAPI(context); - Navigator.of(context).pushReplacementNamed('/LoginPage'); + logout(context); }, ), ], diff --git a/lib/pages/about_screen.dart b/lib/pages/about_screen.dart index 443ee32..a9b8f27 100644 --- a/lib/pages/about_screen.dart +++ b/lib/pages/about_screen.dart @@ -43,7 +43,7 @@ class _HomePageState extends State { children: [ InkWell( child: const Center(child: Text - ('Link to Pear trading website', + ('Pear Trading', style: TextStyle( fontSize: 20, color: Colors.blue, @@ -55,18 +55,7 @@ class _HomePageState extends State { Padding( padding: EdgeInsets.fromLTRB(0,20,0,0), child: Text( - "Developed by Shadowcat Industries", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20.0, - color: Colors.black, - ), - ), - ), - Padding( - padding: EdgeInsets.fromLTRB(0,20,0,0), - child: Text( - "Pear tradings a commerce company designed to register andmonitor money circulating in the local economy.", + "Pear Trading is a commerce company designed to register and monitor money circulating in the local economy.", textAlign: TextAlign.center, style: TextStyle( fontSize: 20.0, @@ -86,7 +75,7 @@ class _HomePageState extends State { ), ), Padding( - padding: EdgeInsets.fromLTRB(0,0,0,20), + padding: EdgeInsets.fromLTRB(0,20,0,0), child: Text( "Phone: +44(0)1524 64544", textAlign: TextAlign.center, @@ -96,17 +85,30 @@ class _HomePageState extends State { ), ), ), - - InkWell( - child: const Center(child: Text - ('Link to Shadowcat website', - style: TextStyle( - fontSize: 20, - color: Colors.blue, + Padding( + padding: EdgeInsets.fromLTRB(0,40,0,0), + child: Text( + "Developed by Shadowcat Industries", + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 20.0, + color: Colors.black, + ), + ), + ), + Padding( + padding: EdgeInsets.fromLTRB(0,20,0,0), + child: InkWell( + child: const Center(child: Text + ('Shadowcat', + style: TextStyle( + fontSize: 20, + color: Colors.blue, + ), ), ), - ), - onTap: () => launch('https://shadow.cat/') + onTap: () => launch('https://shadow.cat/') + ), ), ], ), diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 0ab6210..6b9ae64 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -6,6 +6,7 @@ import 'package:flutter/services.dart'; import 'package:local_spend/common/apifunctions/request_logout_api.dart'; import 'package:local_spend/common/functions/get_token.dart'; import 'package:flutter_fadein/flutter_fadein.dart'; +import 'package:local_spend/common/functions/logout.dart'; class HomePage extends StatefulWidget { @override @@ -81,8 +82,7 @@ class _HomePageState extends State { ), ), onTap: () { - requestLogoutAPI(context); - Navigator.of(context).pushReplacementNamed('/LoginPage'); + logout(context); }, ), diff --git a/lib/pages/receipt_page.dart b/lib/pages/receipt_page.dart index c24f47d..497ef99 100644 --- a/lib/pages/receipt_page.dart +++ b/lib/pages/receipt_page.dart @@ -201,7 +201,6 @@ class ReceiptPageState extends State { style: TextStyle( fontSize: 18.0, color: Colors.black, - fontWeight: FontWeight.bold, ), ), ),