diff --git a/lib/Screens/approvals/approval_list.dart b/lib/Screens/approvals/approval_list.dart index 5a8623b..35e75e5 100644 --- a/lib/Screens/approvals/approval_list.dart +++ b/lib/Screens/approvals/approval_list.dart @@ -199,13 +199,38 @@ class _ApprovalListState extends State { // } // } + Future> getViewPlan(String planId) async { + final String apiUrldata = '$apiUrl/api/plans/find/$planId'; + print("API URL: $apiUrldata"); + // final token = await getToken(); + + if (token == null) { + throw Exception('Token not found. Please log in.'); + } + + final response = await http.put( + Uri.parse(apiUrldata), + headers: { + 'Authorization': 'Bearer $token', // Add token here + 'Content-Type': 'application/json', + }, + ); + + if (response.statusCode == 200) { + final Map? resData = json.decode(response.body); + + return resData?["data"]; + } else { + throw Exception('Failed to load plans'); + } + } + void viewPlanforApprover(String planId, {bool isViewMode = false, bool isApprover = true}) async { try { - Map planData = - await apiService.getViewPlan(planId, plansJson); - print("ViewAAA - $planData"); + Map planData = await getViewPlan(planId); + print("ViewAAA - $planData"); context.go('/createPlan', extra: { 'planData': planData, 'isViewMode': isViewMode, @@ -216,6 +241,18 @@ class _ApprovalListState extends State { } } + // void viewPlan(String planId, {bool isViewMode = false}) async { + // try { + // Map planData = await getViewPlan(planId); + // print("ViewAAA - $planData"); + // + // context.go('/createPlan', + // extra: {'planData': planData, 'isViewMode': isViewMode}); + // } catch (e) { + // print("Error fetching plan: $e"); + // } + // } + Widget build(BuildContext context) { return ResponsiveBuilder(builder: (context, sizingInfo) { bool isDesktop = sizingInfo.deviceScreenType == DeviceScreenType.desktop; @@ -227,18 +264,46 @@ class _ApprovalListState extends State { body: Row( children: [ if (isDesktop) CustomDrawer(isDesktop: true), - Expanded(child: buildTableLayout(isDesktop)) + Expanded(child: buildGroupListLayout(isDesktop)) ], ), ); }); } + Widget buildGroupListLayout(bool isDesktop) { + return Container( + decoration: BoxDecoration( + // color: Colors.amber, + color: bodyColor, + border: Border.all(color: Color(0xFFF7F7FB), width: 3.5)), + child: buildTableLayout(isDesktop), + ); + } + Widget buildTableLayout(isDesktop) { return Container( - color: bodyColor, + margin: isDesktop + ? EdgeInsets.all(10.0) + : EdgeInsets.only(left: 20.0, bottom: 20.0, top: 10.0, right: 20.0), + padding: const EdgeInsets.all(10), + height: isDesktop + ? MediaQuery.of(context).size.height * 0.98 + : MediaQuery.of(context).size.height, + decoration: BoxDecoration( + border: isDesktop + ? Border.all( + width: 2, + color: Color(0xFFF7F7FB), + ) + : null, + color: Colors.white, + // color: Color(0xFFF7F7FB), + + // color: Colors.amber, + ), child: Padding( - padding: const EdgeInsets.all(10.0), + padding: const EdgeInsets.all(1.0), child: Container( padding: const EdgeInsets.all(10.0), color: Colors.white, diff --git a/lib/Screens/group/group.dart b/lib/Screens/group/group.dart index c8b1352..9be348b 100644 --- a/lib/Screens/group/group.dart +++ b/lib/Screens/group/group.dart @@ -193,22 +193,30 @@ class _groupState extends State { } Future postGroupData(Map groupData) async { - // final String apiUrldata = '$apiUrl/api/groups/create'; - final token = await getToken(); // Fetch token + final bool isEdit = widget.group != null && widget.group!.isNotEmpty; + print("isEdit: $isEdit"); print("postGroupData- ${widget.group?['group_id']}"); - // Determine whether it's create or update - final bool isEdit = widget.group != null && widget.group!.isNotEmpty; - final int? groupId = int.tryParse(selectedGroupId!); + String apiUrlData; - print("postGroupData1 - $selectedGroupId"); + if (isEdit) { + if (selectedGroupId == null) { + print("selectedGroupId is null. Cannot proceed."); + return; + } - // Build correct API URL - final String apiUrlData = isEdit - ? '$apiUrl/api/groups/update/$groupId' // Update API - : '$apiUrl/api/groups/create'; + final int? groupId = int.tryParse(selectedGroupId!); + if (groupId == null) { + print("groupId is invalid. selectedGroupId = $selectedGroupId"); + return; + } + + apiUrlData = '$apiUrl/api/groups/update/$groupId'; + } else { + apiUrlData = '$apiUrl/api/groups/create'; + } if (token == null) { throw Exception('Token not found. Please log in.'); @@ -217,7 +225,6 @@ class _groupState extends State { try { final response = await (isEdit ? http.put( - // <-- Use PUT for update Uri.parse(apiUrlData), headers: { 'Authorization': 'Bearer $token', @@ -231,23 +238,86 @@ class _groupState extends State { 'Authorization': 'Bearer $token', 'Content-Type': 'application/json', }, - body: jsonEncode(groupData), // Convert map to JSON + body: jsonEncode(groupData), )); if (response.statusCode == 200 || response.statusCode == 201) { - print("Plan submitted successfully!"); + print("Group submitted successfully!"); print("Response: ${response.body}"); - context.go('/group'); } else { - print("Failed to submit plan. Status: ${response.statusCode}"); + print("Failed to submit group. Status: ${response.statusCode}"); print("Error: ${response.body}"); } } catch (e) { - print(" Error submitting plan: $e"); + print("Error submitting group: $e"); } } + // Future postGroupData(Map groupData) async { + // // final String apiUrldata = '$apiUrl/api/groups/create'; + // + // final token = await getToken(); // Fetch token + // + // print("postGroupData- ${widget.group?['group_id']}"); + // + // if (selectedGroupId == null) { + // print("selectedGroupId is null. Cannot proceed."); + // return; + // } + // + // final int? groupId = int.tryParse(selectedGroupId!); + // if (groupId == null) { + // print("groupId is invalid. selectedGroupId = $selectedGroupId"); + // return; + // } + // + // final bool isEdit = widget.group != null && widget.group!.isNotEmpty; + // print("postGroupData1 - $selectedGroupId"); + // + // // Build correct API URL + // final String apiUrlData = isEdit + // ? '$apiUrl/api/groups/update/$groupId' // Update API + // : '$apiUrl/api/groups/create'; + // + // if (token == null) { + // throw Exception('Token not found. Please log in.'); + // } + // + // try { + // final response = await (isEdit + // ? http.put( + // // <-- Use PUT for update + // Uri.parse(apiUrlData), + // headers: { + // 'Authorization': 'Bearer $token', + // 'Content-Type': 'application/json', + // }, + // body: jsonEncode(groupData), + // ) + // : http.post( + // Uri.parse(apiUrlData), + // headers: { + // 'Authorization': 'Bearer $token', + // 'Content-Type': 'application/json', + // }, + // body: jsonEncode(groupData), // Convert map to JSON + // )); + // + // if (response.statusCode == 200 || response.statusCode == 201) { + // print("Plan submitted successfully!"); + // print("Response: ${response.body}"); + // + // context.go('/group'); + // } else { + // print("Failed to submit plan. Status: ${response.statusCode}"); + // print("Error: ${response.body}"); + // } + // } catch (e) { + // print(" Error submitting plan: $e"); + // } + // } + @override Widget build(BuildContext context) { return ResponsiveBuilder(builder: (context, sizingInfo) { @@ -260,114 +330,146 @@ class _groupState extends State { body: Row( children: [ if (isDesktop) CustomDrawer(isDesktop: true), - Expanded(child: buildOrganizationLayout(isDesktop)) + Expanded(child: buildData(isDesktop, context)) ], ), ); }); } + Widget buildData(bool isDesktop, context) { + return Container( + // margin: const EdgeInsets.only(left: 10.0, right: 15.0, top: 10.0, bottom: 10.0), + decoration: BoxDecoration( + // color: Colors.amber, + color: bodyColor, + border: Border.all(color: Color(0xFFF7F7FB), width: 3.5)), + child: Column( + children: [ + Expanded( + child: Container( + color: bodyColor, + child: buildOrganizationLayout(isDesktop), + ), + ), + Container( + color: Colors.white, + padding: const EdgeInsets.all(8.0), + child: isDesktop + ? Row( + mainAxisAlignment: MainAxisAlignment.end, + children: _buildSubmit(isDesktop), + ) + : Row( + mainAxisAlignment: MainAxisAlignment.center, + children: _buildSubmit(isDesktop), + ), + ), + ], + ), + ); + } + Widget buildOrganizationLayout(isDesktop) { return Container( - color: bodyColor, - // color: Colors.white, - width: double.infinity, - height: MediaQuery.of(context).size.height, - margin: const EdgeInsets.all(8), - child: SingleChildScrollView( - scrollDirection: Axis.vertical, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - // color: Colors.white, - padding: const EdgeInsets.all(10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "Create Group", - style: TextStyle(fontSize: 18), - ), - Container( - color: Color(0xFFE9EBF6), - child: IconButton( - icon: Icon( - Icons.close, - ), - onPressed: () { - context.go('/group'); - }, - ), - ) - ], - ), + margin: isDesktop + ? EdgeInsets.all(10.0) + : EdgeInsets.only(left: 20.0, bottom: 20.0, top: 10.0, right: 20.0), + height: isDesktop + ? MediaQuery.of(context).size.height * 0.98 + : MediaQuery.of(context).size.height, + decoration: BoxDecoration( + border: isDesktop + ? Border.all( + width: 2, + color: Color(0xFFF7F7FB), + ) + : null, + color: Colors.white, + // color: Color(0xFFF7F7FB), + + // color: Colors.amber, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + // color: Colors.white, + padding: const EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "Create Group", + style: TextStyle(fontSize: 18), + ), + // Container( + // color: Color(0xFFE9EBF6), + // child: IconButton( + // icon: Icon( + // Icons.close, + // ), + // onPressed: () { + // context.go('/group'); + // }, + // ), + // ) + ], ), - // SizedBox( - // height: 5, - // ), - Container( - margin: const EdgeInsets.all(10), - padding: const EdgeInsets.all(20), - color: Colors.white, - height: MediaQuery.of(context).size.height * 0.8, - child: Column( - children: [ - // Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // Text( - // "Mail Settings", - // style: TextStyle(color: Colors.blueAccent), - // ), - // Icon( - // Icons.keyboard_arrow_down_outlined, - // color: Colors.blueAccent, - // size: 30, - // ), - // ], - // ), - isDesktop - ? Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: _buildFirstRow(isDesktop), - ) - : Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: _buildFirstRow(isDesktop), - ), + ), + // SizedBox( + // height: 5, + // ), + Container( + margin: const EdgeInsets.all(10), + padding: const EdgeInsets.all(20), + color: Colors.white, + height: MediaQuery.of(context).size.height * 0.6, + child: Column( + children: [ + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Text( + // "Mail Settings", + // style: TextStyle(color: Colors.blueAccent), + // ), + // Icon( + // Icons.keyboard_arrow_down_outlined, + // color: Colors.blueAccent, + // size: 30, + // ), + // ], + // ), + isDesktop + ? Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: _buildFirstRow(isDesktop), + ) + : Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: _buildFirstRow(isDesktop), + ), - SizedBox( - height: 10, - ), + SizedBox( + height: 10, + ), - isDesktop - ? Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: _buildSecondRow(isDesktop), - ) - : Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: _buildSecondRow(isDesktop), - ), + isDesktop + ? Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: _buildSecondRow(isDesktop), + ) + : Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: _buildSecondRow(isDesktop), + ), - // SizedBox(height: 15), - - Spacer(), - isDesktop - ? Row( - mainAxisAlignment: MainAxisAlignment.end, - children: _buildSubmit(isDesktop), - ) - : Row( - mainAxisAlignment: MainAxisAlignment.center, - children: _buildSubmit(isDesktop), - ) - ], - )), - ], - ), + // SizedBox(height: 15), + ], + )), + ], ), ); } diff --git a/lib/Screens/group/groupList.dart b/lib/Screens/group/groupList.dart index fad04aa..1a24c4e 100644 --- a/lib/Screens/group/groupList.dart +++ b/lib/Screens/group/groupList.dart @@ -146,12 +146,41 @@ class _GroupListState extends State { Widget buildGroupListLayout(bool isDesktop) { return Container( - color: bodyColor, - // color: Colors.white, - width: double.infinity, - height: MediaQuery.of(context).size.height, - // margin: const EdgeInsets.all(8), - padding: const EdgeInsets.all(8), + decoration: BoxDecoration( + // color: Colors.amber, + color: bodyColor, + border: Border.all(color: Color(0xFFF7F7FB), width: 3.5)), + child: buildGroupData(isDesktop), + ); + } + + // Widget buildGroupListView(bool isDesktop) { + // return Container( + // child: Text("DAta"), + // ); + // } + + Widget buildGroupData(isDesktop) { + return Container( + margin: isDesktop + ? EdgeInsets.all(10.0) + : EdgeInsets.only(left: 20.0, bottom: 20.0, top: 10.0, right: 20.0), + padding: const EdgeInsets.all(10), + height: isDesktop + ? MediaQuery.of(context).size.height * 0.98 + : MediaQuery.of(context).size.height, + decoration: BoxDecoration( + border: isDesktop + ? Border.all( + width: 2, + color: Color(0xFFF7F7FB), + ) + : null, + color: Colors.white, + // color: Color(0xFFF7F7FB), + + // color: Colors.amber, + ), child: Column( children: [ Row( @@ -171,7 +200,7 @@ class _GroupListState extends State { ElevatedButton( style: ElevatedButton.styleFrom( foregroundColor: Colors.white, - backgroundColor: layoutColor, + backgroundColor: Color(0xFF114D8B), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), // side: BorderSide(color: , width: 1), @@ -204,7 +233,7 @@ class _GroupListState extends State { children: [ Expanded( child: Container( - height: MediaQuery.of(context).size.height * 0.899, + // height: MediaQuery.of(context).size.height * 0.89, padding: const EdgeInsets.all(10), // margin: const EdgeInsets.only(bottom: 10), color: Colors.white, @@ -226,12 +255,6 @@ class _GroupListState extends State { ); } - // Widget buildGroupListView(bool isDesktop) { - // return Container( - // child: Text("DAta"), - // ); - // } - Widget buildGroupListView(bool isDesktop) { if (apiAllGroups == null || apiAllGroups!.isEmpty) { return Center(child: Text("No groups found.")); @@ -253,13 +276,26 @@ class _GroupListState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text("Group Name: ${group['name']}", - style: - TextStyle(fontSize: 13, fontWeight: FontWeight.bold)), + Row( + children: [ + Expanded( + child: Text("Group Name: ${group['name']}", + style: TextStyle( + fontSize: 13, fontWeight: FontWeight.bold)), + ), + ], + ), SizedBox(height: 4), - Text("Description: ${group['description'] ?? 'N/A'}"), - Text("Policy: ${group['domestic_policy_id']}"), - Text("Created By : ${group['created_by']}"), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + "Policy: ${group['domestic_policy_name'] ?? group['international_policy_name']}")), + Expanded(child: Text("${group['description'] ?? 'N/A'}")), + Expanded(child: Text(" ${group['created_by']}")), + ], + ), Row( mainAxisAlignment: MainAxisAlignment.end, children: [ diff --git a/lib/Screens/organization/orgSetup.dart b/lib/Screens/organization/orgSetup.dart index 037f497..1799778 100644 --- a/lib/Screens/organization/orgSetup.dart +++ b/lib/Screens/organization/orgSetup.dart @@ -558,7 +558,7 @@ class _OrgSetUpState extends State { // if (showMail) SizedBox( - height: 3, + height: 10, ), Container( // width: double.infinity, @@ -595,7 +595,7 @@ class _OrgSetUpState extends State { ], )), SizedBox( - height: 5, + height: 15, ), Text( @@ -607,7 +607,7 @@ class _OrgSetUpState extends State { color: Color(0xFF212121)), ), SizedBox( - height: 5, + height: 10, ), Container( decoration: BoxDecoration( @@ -634,11 +634,11 @@ class _OrgSetUpState extends State { ), ), SizedBox( - height: 5, + height: 15, ), - Row( - // crossAxisAlignment: CrossAxisAlignment.start, + Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "Choose Theme", diff --git a/lib/Screens/plans/create_plans.dart b/lib/Screens/plans/create_plans.dart index 250210e..5d18894 100644 --- a/lib/Screens/plans/create_plans.dart +++ b/lib/Screens/plans/create_plans.dart @@ -126,16 +126,31 @@ class _CreatePlansState extends State { // ), Expanded( child: Container( - margin: const EdgeInsets.all(8), + margin: isDesktop + ? EdgeInsets.all(10.0) + : EdgeInsets.only( + left: 20.0, bottom: 20.0, top: 10.0, right: 20.0), + padding: const EdgeInsets.all(10), + height: isDesktop + ? MediaQuery.of(context).size.height * 0.98 + : MediaQuery.of(context).size.height, decoration: BoxDecoration( + border: isDesktop + ? Border.all( + width: 2, + color: Color(0xFFF7F7FB), + ) + : null, color: Colors.white, - borderRadius: BorderRadius.circular(12), // rounds all corners + // color: Color(0xFFF7F7FB), + + // color: Colors.amber, ), // color: bodyColor, child: SingleChildScrollView( child: Padding( - padding: EdgeInsets.all(20.0), + padding: EdgeInsets.all(10.0), child: CreateNewPlan( key: _createPlanKey, bodyColor: bodyColor, @@ -920,6 +935,9 @@ class CreateNewPlansState extends State { )), ], ), + SizedBox( + height: 10, + ), if (widget.isApprover) Container( padding: const EdgeInsets.all(10), @@ -1570,7 +1588,7 @@ class CreateNewPlansState extends State { ? Colors.white : Colors.black, fontWeight: _selectedOption == option["value"] - ? FontWeight.w600 + ? FontWeight.w500 : null, ), ), @@ -1652,7 +1670,7 @@ class CreateNewPlansState extends State { color: _selectedTripType == "1" ? Colors.white : Colors.black, fontWeight: - _selectedTripType == "1" ? FontWeight.w600 : null, + _selectedTripType == "1" ? FontWeight.w500 : null, fontSize: 13), ), @@ -1683,6 +1701,7 @@ class CreateNewPlansState extends State { child: Container( width: 15, height: 15, + decoration: BoxDecoration( shape: BoxShape.rectangle, // color: _selectedOption == option["value"] @@ -1724,7 +1743,7 @@ class CreateNewPlansState extends State { style: TextStyle( fontSize: 13, color: _selectedTripType == "2" ? Colors.white : Colors.black, - fontWeight: _selectedTripType == "2" ? FontWeight.w600 : null, + fontWeight: _selectedTripType == "2" ? FontWeight.w500 : null, ), ), GestureDetector( diff --git a/lib/Screens/plans/list_plans.dart b/lib/Screens/plans/list_plans.dart index fee8689..f91e616 100644 --- a/lib/Screens/plans/list_plans.dart +++ b/lib/Screens/plans/list_plans.dart @@ -187,18 +187,46 @@ class _ListPlansState extends State { body: Row( children: [ if (isDesktop) CustomDrawer(isDesktop: true), - Expanded(child: buildTableLayout(isDesktop)) + Expanded(child: buildGroupListLayout(isDesktop)) ], ), ); }); } + Widget buildGroupListLayout(bool isDesktop) { + return Container( + decoration: BoxDecoration( + // color: Colors.amber, + color: bodyColor, + border: Border.all(color: Color(0xFFF7F7FB), width: 3.5)), + child: buildTableLayout(isDesktop), + ); + } + Widget buildTableLayout(isDesktop) { return Container( - color: bodyColor, + margin: isDesktop + ? EdgeInsets.all(10.0) + : EdgeInsets.only(left: 20.0, bottom: 20.0, top: 10.0, right: 20.0), + padding: const EdgeInsets.all(10), + height: isDesktop + ? MediaQuery.of(context).size.height * 0.98 + : MediaQuery.of(context).size.height, + decoration: BoxDecoration( + border: isDesktop + ? Border.all( + width: 2, + color: Color(0xFFF7F7FB), + ) + : null, + color: Colors.white, + // color: Color(0xFFF7F7FB), + + // color: Colors.amber, + ), child: Padding( - padding: const EdgeInsets.all(10.0), + padding: const EdgeInsets.all(1.0), child: Container( padding: const EdgeInsets.all(10.0), color: Colors.white, diff --git a/lib/Screens/policy/policyCriteria.dart b/lib/Screens/policy/policyCriteria.dart index 2e8773f..f62403b 100644 --- a/lib/Screens/policy/policyCriteria.dart +++ b/lib/Screens/policy/policyCriteria.dart @@ -286,7 +286,7 @@ class PolicyCriteriaState extends State { Expanded( flex: 2, child: Text( - "Approver Name", + "Approver", style: TextStyle( color: Color(0xFF9E9DBD), fontWeight: FontWeight.bold, @@ -296,7 +296,7 @@ class PolicyCriteriaState extends State { Expanded( flex: 2, child: Text( - "Notification", + "Actions", style: TextStyle( color: Color(0xFF9E9DBD), fontWeight: FontWeight.bold, @@ -304,7 +304,7 @@ class PolicyCriteriaState extends State { ), ), Text( - "Select", + "Parallel Action", style: TextStyle( color: Color(0xFF9E9DBD), fontWeight: FontWeight.bold, diff --git a/lib/Screens/policy/policy_list.dart b/lib/Screens/policy/policy_list.dart index 4bbc863..5795e90 100644 --- a/lib/Screens/policy/policy_list.dart +++ b/lib/Screens/policy/policy_list.dart @@ -145,21 +145,44 @@ class _PolicyListState extends State { body: Row( children: [ if (isDesktop) CustomDrawer(isDesktop: true), - Expanded(child: buildGroupListLayout(isDesktop)) + Expanded(child: buildGroupList(isDesktop)) ], ), ); }); } + Widget buildGroupList(bool isDesktop) { + return Container( + decoration: BoxDecoration( + // color: Colors.amber, + color: bodyColor, + border: Border.all(color: Color(0xFFF7F7FB), width: 3.5)), + child: buildGroupListLayout(isDesktop), + ); + } + Widget buildGroupListLayout(bool isDesktop) { return Container( - color: bodyColor, - // color: Colors.white, - width: double.infinity, - height: MediaQuery.of(context).size.height, - // margin: const EdgeInsets.all(8), - padding: const EdgeInsets.all(8), + margin: isDesktop + ? EdgeInsets.all(10.0) + : EdgeInsets.only(left: 20.0, bottom: 20.0, top: 10.0, right: 20.0), + padding: const EdgeInsets.all(10), + height: isDesktop + ? MediaQuery.of(context).size.height * 0.98 + : MediaQuery.of(context).size.height, + decoration: BoxDecoration( + border: isDesktop + ? Border.all( + width: 2, + color: Color(0xFFF7F7FB), + ) + : null, + color: Colors.white, + // color: Color(0xFFF7F7FB), + + // color: Colors.amber, + ), child: Column( children: [ Row( @@ -179,7 +202,7 @@ class _PolicyListState extends State { ElevatedButton( style: ElevatedButton.styleFrom( foregroundColor: Colors.white, - backgroundColor: layoutColor, + backgroundColor: Color(0xFF114D8B), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), // side: BorderSide(color: , width: 1), @@ -212,7 +235,7 @@ class _PolicyListState extends State { children: [ Expanded( child: Container( - height: MediaQuery.of(context).size.height * 0.899, + height: MediaQuery.of(context).size.height * 0.8, padding: const EdgeInsets.all(10), // margin: const EdgeInsets.only(bottom: 10), color: Colors.white, diff --git a/lib/Screens/userManagement/create_user/create_user.dart b/lib/Screens/userManagement/create_user/create_user.dart index c0ff5f7..daa5879 100644 --- a/lib/Screens/userManagement/create_user/create_user.dart +++ b/lib/Screens/userManagement/create_user/create_user.dart @@ -695,16 +695,30 @@ class _CreateUserFormState extends State { children: [ Expanded( child: Container( - margin: const EdgeInsets.all(8), + margin: isDesktop + ? EdgeInsets.all(10.0) + : EdgeInsets.only( + left: 20.0, bottom: 20.0, top: 10.0, right: 20.0), + padding: const EdgeInsets.all(10), + height: isDesktop + ? MediaQuery.of(context).size.height * 0.98 + : MediaQuery.of(context).size.height, decoration: BoxDecoration( + border: isDesktop + ? Border.all( + width: 2, + color: Color(0xFFF7F7FB), + ) + : null, color: Colors.white, - borderRadius: BorderRadius.circular(12), // rounds all corners - ), + // color: Color(0xFFF7F7FB), + // color: Colors.amber, + ), // color: bodyColor, child: SingleChildScrollView( child: Padding( - padding: EdgeInsets.all(20.0), + padding: EdgeInsets.all(0.0), child: _buildUserDetails(isDesktop), ), ), diff --git a/lib/Screens/userManagement/user_List.dart b/lib/Screens/userManagement/user_List.dart index 4632a99..29fc9d9 100644 --- a/lib/Screens/userManagement/user_List.dart +++ b/lib/Screens/userManagement/user_List.dart @@ -253,7 +253,7 @@ class _UserListScreenState extends State { children: [ if (isDesktop) CustomDrawer(isDesktop: true), // const Expanded(child: Center(child: Text("User Page Content"))), - Expanded(child: buildUserTable(isDesktop)), + Expanded(child: buildGroupList(isDesktop)), ], ), ), @@ -261,9 +261,37 @@ class _UserListScreenState extends State { }); } + Widget buildGroupList(bool isDesktop) { + return Container( + decoration: BoxDecoration( + // color: Colors.amber, + color: bodyColor, + border: Border.all(color: Color(0xFFF7F7FB), width: 3.5)), + child: buildUserTable(isDesktop), + ); + } + Widget buildUserTable(bool isDesktop) { return Container( - color: bodyColor, + margin: isDesktop + ? EdgeInsets.all(10.0) + : EdgeInsets.only(left: 20.0, bottom: 20.0, top: 10.0, right: 20.0), + // padding: const EdgeInsets.all(10), + height: isDesktop + ? MediaQuery.of(context).size.height * 0.98 + : MediaQuery.of(context).size.height, + decoration: BoxDecoration( + border: isDesktop + ? Border.all( + width: 2, + color: Color(0xFFF7F7FB), + ) + : null, + color: Colors.white, + // color: Color(0xFFF7F7FB), + + // color: Colors.amber, + ), child: Padding( padding: const EdgeInsets.all(10.0), child: Container( diff --git a/lib/routes/custom_drawer.dart b/lib/routes/custom_drawer.dart index 7d6d011..ec593ae 100644 --- a/lib/routes/custom_drawer.dart +++ b/lib/routes/custom_drawer.dart @@ -136,14 +136,15 @@ class _CustomDrawerState extends State { children: [ Row( mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ selectedOrg?['logo'] != null - ? ClipOval( + ? ClipRect( child: Image.network( selectedOrg!['logo'], - width: 50, + width: 150, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fitWidth, errorBuilder: (context, error, stackTrace) { return const CircleAvatar( radius: 20, @@ -155,8 +156,12 @@ class _CustomDrawerState extends State { ) : const CircleAvatar( radius: 20, - backgroundColor: Colors.amber, - child: Icon(Icons.add_a_photo, size: 10), + backgroundColor: Colors.white, + child: Icon( + Icons.add_a_photo, + size: 10, + color: Colors.grey, + ), ), ], ),