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