UI_DISABLE_ROLE_PROFILE
This commit is contained in:
parent
fa00f90f8a
commit
b40f65514d
@ -557,7 +557,7 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
case 'train':
|
||||
return Icons.train_outlined;
|
||||
case 'bus':
|
||||
return Icons.bus_alert_outlined;
|
||||
return Icons.directions_bus;
|
||||
case 'taxi':
|
||||
return Icons.local_taxi_outlined;
|
||||
case 'accomodation':
|
||||
|
||||
@ -1604,6 +1604,7 @@ class _CreateUserFormDetialsState extends State<CreateUserFormDetials> {
|
||||
personalDetailsKey: personalDetailsKey,
|
||||
isDesktop: isDesktop, // pass isDesktop as a named argument
|
||||
isViewMode: isViewMode,
|
||||
isEditProfile: isEditProfile,
|
||||
userIdApi: userIdApi,
|
||||
controllers: controllers,
|
||||
errorMessages: errorMessages,
|
||||
@ -1706,6 +1707,7 @@ class _CreateUserFormDetialsState extends State<CreateUserFormDetials> {
|
||||
personalDetailsKey: personalDetailsKey,
|
||||
isDesktop: isDesktop, // pass isDesktop as a named argument
|
||||
isViewMode: isViewMode,
|
||||
isEditProfile: isEditProfile,
|
||||
userIdApi: userIdApi,
|
||||
controllers: controllers,
|
||||
errorMessages: errorMessages,
|
||||
|
||||
@ -380,6 +380,7 @@ class OfficeDetailsState extends State<OfficeDetails> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: MediaQuery.of(context).size.height * 0.8,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
|
||||
@ -22,6 +22,7 @@ class PersonalDetails extends StatefulWidget {
|
||||
final bool isDesktop;
|
||||
final bool isViewMode;
|
||||
final bool apiselectedUser;
|
||||
final bool isEditProfile;
|
||||
|
||||
final Function(List<Map<String, dynamic>>)? onServiceIdsChanged;
|
||||
|
||||
@ -57,6 +58,7 @@ class PersonalDetails extends StatefulWidget {
|
||||
this.onRoleChanged,
|
||||
this.onUserTypeChanged,
|
||||
this.userIdApi,
|
||||
required this.isEditProfile,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
@ -102,6 +104,7 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
bool _countryFocus = false;
|
||||
bool _postalCodeFocus = false;
|
||||
bool _roleIdFocus = false;
|
||||
bool iseditRole = true;
|
||||
|
||||
late bool isTravelAgent = false;
|
||||
|
||||
@ -164,6 +167,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
loadInitialData();
|
||||
print("EDITP1- ${widget.isEditProfile}");
|
||||
print("EDITP2- ${widget.isViewMode}");
|
||||
|
||||
// iseditRole = ;
|
||||
});
|
||||
apiCountryData = null;
|
||||
|
||||
@ -609,7 +616,7 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
case 'train':
|
||||
return Icons.train_outlined;
|
||||
case 'bus':
|
||||
return Icons.bus_alert_outlined;
|
||||
return Icons.directions_bus;
|
||||
case 'taxi':
|
||||
return Icons.local_taxi_outlined;
|
||||
case 'accomodation':
|
||||
@ -1827,7 +1834,7 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
child: DropdownSearch<String>(
|
||||
selectedItem:
|
||||
selectedRole != null ? roleMap[selectedRole] : null,
|
||||
enabled: !widget.isViewMode,
|
||||
enabled: !widget.isEditProfile,
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: true,
|
||||
fit: FlexFit.loose,
|
||||
@ -1902,7 +1909,7 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
),
|
||||
),
|
||||
onChanged:
|
||||
widget.isViewMode
|
||||
!widget.isEditProfile
|
||||
? null
|
||||
: (String? newValue) {
|
||||
widget.errorMessages.remove("role_id");
|
||||
|
||||
@ -2,7 +2,7 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
// import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'dart:html' as html;
|
||||
import 'package:frontend/config/apiUrl.dart'; // 1 newly added
|
||||
import 'package:frontend/services/apiService.dart';
|
||||
@ -34,8 +34,8 @@ class _MyAppState extends State<MyApp> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// SemanticsBinding.instance
|
||||
// .ensureSemantics(); // Safe here -only for testing uncomment, Otherwise Email Template wont allow to type
|
||||
SemanticsBinding.instance
|
||||
.ensureSemantics(); // -only for testing uncomment, Otherwise Email Template wont allow to type
|
||||
if (kIsWeb) {
|
||||
final uri = Uri.parse(html.window.location.href);
|
||||
print("URI - $uri");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user