fix: ScheduleCompleteVisitPageModel => ScheduleCompleteVisit
This commit is contained in:
parent
7c11b6d84b
commit
d6a67e54f5
|
@ -41,146 +41,138 @@ class _VisitorNotFoundComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Align(
|
return Container(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
width: MediaQuery.of(context).size.height * 0.5,
|
||||||
child: Container(
|
height: MediaQuery.of(context).size.height * 0.4,
|
||||||
width: 350.0,
|
decoration: BoxDecoration(
|
||||||
height: 350.0,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
decoration: BoxDecoration(
|
borderRadius: const BorderRadius.only(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
bottomLeft: Radius.circular(25.0),
|
||||||
borderRadius: const BorderRadius.only(
|
bottomRight: Radius.circular(25.0),
|
||||||
bottomLeft: Radius.circular(25.0),
|
topLeft: Radius.circular(25.0),
|
||||||
bottomRight: Radius.circular(25.0),
|
topRight: Radius.circular(25.0),
|
||||||
topLeft: Radius.circular(25.0),
|
),
|
||||||
topRight: Radius.circular(25.0),
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 5.0, 0.0),
|
||||||
|
child: FlutterFlowIconButton(
|
||||||
|
borderRadius: 20.0,
|
||||||
|
borderWidth: 1.0,
|
||||||
|
buttonSize: 40.0,
|
||||||
|
icon: Icon(
|
||||||
|
Icons.close,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
size: 24.0,
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
Icon(
|
||||||
child: Column(
|
Icons.notifications_none,
|
||||||
mainAxisSize: MainAxisSize.max,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
size: 72.0,
|
||||||
children: [
|
),
|
||||||
Align(
|
Padding(
|
||||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 16.0, 0.0, 0.0),
|
||||||
child: Padding(
|
child: Text(
|
||||||
padding:
|
FFLocalizations.of(context).getText(
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 5.0, 0.0),
|
'1p9mykbj' /* Usuário não encontrado */,
|
||||||
child: FlutterFlowIconButton(
|
),
|
||||||
borderRadius: 20.0,
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
borderWidth: 1.0,
|
fontFamily:
|
||||||
buttonSize: 40.0,
|
FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||||
icon: Icon(
|
letterSpacing: 0.0,
|
||||||
Icons.close,
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||||
size: 24.0,
|
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
),
|
||||||
Navigator.pop(context);
|
),
|
||||||
},
|
Padding(
|
||||||
),
|
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 4.0, 20.0, 0.0),
|
||||||
|
child: Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'kt937sp6' /* O documento inserido não corre... */,
|
||||||
),
|
),
|
||||||
),
|
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
Icon(
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
Icons.notifications_none,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
fontSize: 14.0,
|
||||||
size: 72.0,
|
letterSpacing: 0.0,
|
||||||
),
|
fontStyle: FontStyle.italic,
|
||||||
Padding(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
padding:
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 16.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'1p9mykbj' /* Usuário não encontrado */,
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).headlineMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context).headlineMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(10.0, 4.0, 10.0, 0.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'kt937sp6' /* O documento inserido não corre... */,
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
fontSize: 14.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontStyle: FontStyle.italic,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
|
||||||
child: FFButtonWidget(
|
|
||||||
onPressed: () async {
|
|
||||||
Navigator.pop(context);
|
|
||||||
await showModalBottomSheet(
|
|
||||||
isScrollControlled: true,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
enableDrag: true,
|
|
||||||
useSafeArea: true,
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return Padding(
|
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
|
||||||
child: SizedBox(
|
|
||||||
width: double.infinity,
|
|
||||||
height: MediaQuery.of(context).size.height * 0.9,
|
|
||||||
child:
|
|
||||||
const RegisiterVistorTemplateComponentWidget(
|
|
||||||
source: 'VisitorNotFoundComponent',
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
).then((value) => safeSetState(() {}));
|
|
||||||
},
|
|
||||||
text: FFLocalizations.of(context).getText(
|
|
||||||
'y2x4nfcn' /* Adicionar */,
|
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
),
|
||||||
width: double.infinity,
|
),
|
||||||
height: 30.0,
|
Expanded(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
child: Align(
|
||||||
24.0, 0.0, 24.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
child: FFButtonWidget(
|
||||||
0.0, 0.0, 0.0, 0.0),
|
onPressed: () async {
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
Navigator.pop(context);
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
await showModalBottomSheet(
|
||||||
fontFamily:
|
isScrollControlled: true,
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily,
|
backgroundColor: Colors.transparent,
|
||||||
color: Colors.white,
|
enableDrag: true,
|
||||||
letterSpacing: 0.0,
|
useSafeArea: true,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
isDismissible: true,
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
context: context,
|
||||||
),
|
builder: (context) {
|
||||||
elevation: 3.0,
|
return Padding(
|
||||||
borderSide: const BorderSide(
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
color: Colors.transparent,
|
child: SizedBox(
|
||||||
width: 1.0,
|
width: double.infinity,
|
||||||
),
|
height: MediaQuery.of(context).size.height * 0.9,
|
||||||
borderRadius: const BorderRadius.only(
|
child: const RegisiterVistorTemplateComponentWidget(
|
||||||
bottomLeft: Radius.circular(25.0),
|
source: 'VisitorNotFoundComponent',
|
||||||
bottomRight: Radius.circular(25.0),
|
)),
|
||||||
topLeft: Radius.circular(15.0),
|
);
|
||||||
topRight: Radius.circular(15.0),
|
},
|
||||||
),
|
).then((value) => safeSetState(() {}));
|
||||||
|
},
|
||||||
|
text: FFLocalizations.of(context)
|
||||||
|
.getVariableText(enText: 'Add', ptText: 'Adicionar'),
|
||||||
|
options: FFButtonOptions(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 30.0,
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
|
iconPadding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
|
color: Colors.white,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
|
),
|
||||||
|
elevation: 3.0,
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: Colors.transparent,
|
||||||
|
width: 1.0,
|
||||||
|
),
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(25.0),
|
||||||
|
bottomRight: Radius.circular(25.0),
|
||||||
|
topLeft: Radius.circular(15.0),
|
||||||
|
topRight: Radius.circular(15.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import 'package:hub/backend/api_requests/api_manager.dart';
|
import 'dart:developer';
|
||||||
|
|
||||||
|
import 'package:hub/backend/api_requests/api_manager.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
class ScheduleVisitDetailModel
|
class ScheduleVisitDetailModel
|
||||||
extends FlutterFlowModel<ScheduleVisitDetailWidget> {
|
extends FlutterFlowModel<ScheduleVisitDetailWidget> {
|
||||||
|
@ -36,6 +38,36 @@ class ScheduleVisitDetailModel
|
||||||
// Stores action output result for [Backend Call - API (postScheduleVisit)] action in Icon widget.
|
// Stores action output result for [Backend Call - API (postScheduleVisit)] action in Icon widget.
|
||||||
ApiCallResponse? postScheduleVisit;
|
ApiCallResponse? postScheduleVisit;
|
||||||
|
|
||||||
|
String convertDateFormat(String dateStr) {
|
||||||
|
try {
|
||||||
|
log('Received date string: $dateStr');
|
||||||
|
|
||||||
|
// Formato original
|
||||||
|
DateFormat originalFormat = DateFormat('d/M/y H:mm:ss');
|
||||||
|
// Novo formato
|
||||||
|
DateFormat newFormat = DateFormat('y-M-d H:mm:ss');
|
||||||
|
|
||||||
|
// Validate the input string format
|
||||||
|
if (!RegExp(r'^\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{2}:\d{2}$')
|
||||||
|
.hasMatch(dateStr)) {
|
||||||
|
log('Invalid date format: $dateStr');
|
||||||
|
return 'Invalid date format';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Converte a string para DateTime
|
||||||
|
DateTime dateTime = originalFormat.parse(dateStr);
|
||||||
|
|
||||||
|
// Converte DateTime para a nova string formatada
|
||||||
|
String formattedDate = newFormat.format(dateTime);
|
||||||
|
log('Formatted date: $formattedDate');
|
||||||
|
return formattedDate;
|
||||||
|
} catch (e) {
|
||||||
|
// Handle the exception by returning an error message or a default value
|
||||||
|
log('Error parsing date: $e');
|
||||||
|
return 'Invalid date format';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
@ -59,4 +91,4 @@ class ScheduleVisitDetailModel
|
||||||
textFieldFocusNode6?.dispose();
|
textFieldFocusNode6?.dispose();
|
||||||
textController6?.dispose();
|
textController6?.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -485,9 +485,9 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
final selectedMedia =
|
final selectedMedia =
|
||||||
await selectMediaWithSourceBottomSheet(
|
await selectMediaWithSourceBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
maxWidth: 300.00,
|
// maxWidth: 300.00,
|
||||||
maxHeight: 300.00,
|
// maxHeight: 300.00,
|
||||||
imageQuality: 0,
|
imageQuality: 100,
|
||||||
allowPhoto: true,
|
allowPhoto: true,
|
||||||
includeDimensions: true,
|
includeDimensions: true,
|
||||||
);
|
);
|
||||||
|
@ -567,7 +567,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
width: 0.5,
|
width: 0.2,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
|
@ -915,7 +915,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 250.0,
|
width: 250.0,
|
||||||
height: 36.0,
|
height: 36.0,
|
||||||
disabledColor: FlutterFlowTheme.of(context).customColor6,
|
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
80.0, 0.0, 80.0, 0.0),
|
80.0, 0.0, 80.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
||||||
import 'package:hub/components/templates_components/view_visit_detail/view_visit_detail_widget.dart';
|
import 'package:hub/components/templates_components/view_visit_detail/view_visit_detail_widget.dart';
|
||||||
|
@ -74,50 +71,47 @@ class _VisitDetailsModalTemplateComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Align(
|
return Builder(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
builder: (context) {
|
||||||
child: Builder(
|
if (widget.visitStatusStr != null && widget.visitStatusStr != '') {
|
||||||
builder: (context) {
|
return wrapWithModel(
|
||||||
if (widget.visitStatusStr != null && widget.visitStatusStr != '') {
|
model: _model.viewVisitDetailModel,
|
||||||
return wrapWithModel(
|
updateCallback: () => setState(() {}),
|
||||||
model: _model.viewVisitDetailModel,
|
updateOnChange: true,
|
||||||
updateCallback: () => setState(() {}),
|
child: ViewVisitDetailWidget(
|
||||||
updateOnChange: true,
|
visitorImgPath: widget.visitorImgPath,
|
||||||
child: ViewVisitDetailWidget(
|
visitStartDate: widget.visitStartDateStr!,
|
||||||
visitorImgPath: widget.visitorImgPath,
|
visitEndDate: widget.visitEndDateStr!,
|
||||||
visitStartDate: widget.visitStartDateStr!,
|
visitReasonStr: widget.visitReasonStr!,
|
||||||
visitEndDate: widget.visitEndDateStr!,
|
visitLevelStr: widget.visitLevelStr!,
|
||||||
visitReasonStr: widget.visitReasonStr!,
|
visitTempStr: widget.visitTempStr!,
|
||||||
visitLevelStr: widget.visitLevelStr!,
|
visitObsStr: widget.visitObsStr!,
|
||||||
visitTempStr: widget.visitTempStr!,
|
visitStatusStr: widget.visitStatusStr!,
|
||||||
visitObsStr: widget.visitObsStr!,
|
visitorStrList: widget.visitorStrList!,
|
||||||
visitStatusStr: widget.visitStatusStr!,
|
visitorJsonList: widget.visitorJsonList,
|
||||||
visitorStrList: widget.visitorStrList!,
|
visitIdStr: widget.visitIdStr!,
|
||||||
visitorJsonList: widget.visitorJsonList,
|
visitStatusColor: widget.visitStatusColor!,
|
||||||
visitIdStr: widget.visitIdStr!,
|
),
|
||||||
visitStatusColor: widget.visitStatusColor!,
|
);
|
||||||
),
|
} else {
|
||||||
);
|
return wrapWithModel(
|
||||||
} else {
|
model: _model.scheduleVisitDetailModel,
|
||||||
return wrapWithModel(
|
updateCallback: () => setState(() {}),
|
||||||
model: _model.scheduleVisitDetailModel,
|
updateOnChange: true,
|
||||||
updateCallback: () => setState(() {}),
|
child: ScheduleVisitDetailWidget(
|
||||||
updateOnChange: true,
|
visitorStrList: widget.visitorStrList!,
|
||||||
child: ScheduleVisitDetailWidget(
|
visitorImgPath: widget.visitorImgPath,
|
||||||
visitorStrList: widget.visitorStrList!,
|
visitStartDate: widget.visitStartDateStr!,
|
||||||
visitorImgPath: widget.visitorImgPath,
|
visitEndDate: widget.visitEndDateStr!,
|
||||||
visitStartDate: widget.visitStartDateStr!,
|
visitResonStr: widget.visitReasonStr!,
|
||||||
visitEndDate: widget.visitEndDateStr!,
|
visitLevelStr: widget.visitLevelStr!,
|
||||||
visitResonStr: widget.visitReasonStr!,
|
visitTempStr: widget.visitTempStr!,
|
||||||
visitLevelStr: widget.visitLevelStr!,
|
visitObsStr: widget.visitObsStr!,
|
||||||
visitTempStr: widget.visitTempStr!,
|
visitorJsonList: widget.visitorJsonList!,
|
||||||
visitObsStr: widget.visitObsStr!,
|
),
|
||||||
visitorJsonList: widget.visitorJsonList!,
|
);
|
||||||
),
|
}
|
||||||
);
|
},
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,16 +109,20 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
_model.addToDocs(_model.textController.text);
|
_model.addToDocs(_model.textController.text);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
} else {
|
} else {
|
||||||
await showModalBottomSheet(
|
await showAdaptiveDialog(
|
||||||
isScrollControlled: true,
|
useSafeArea: true,
|
||||||
enableDrag: true,
|
|
||||||
isDismissible: true,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Padding(
|
return Dialog(
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
child: Padding(
|
||||||
child: const VisitorNotFoundComponentWidget(),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
|
child: Container(
|
||||||
|
color: Colors.transparent,
|
||||||
|
// width: MediaQuery.of(context).size.height * 0.1,
|
||||||
|
// height:
|
||||||
|
// MediaQuery.of(context).size.height * 0.4,
|
||||||
|
child: const VisitorNotFoundComponentWidget()),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
).then((value) => safeSetState(() {}));
|
).then((value) => safeSetState(() {}));
|
||||||
|
|
|
@ -58,23 +58,23 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
||||||
bool includeBlurHash = false,
|
bool includeBlurHash = false,
|
||||||
}) async {
|
}) async {
|
||||||
createUploadMediaListTile(String label, MediaSource mediaSource) => ListTile(
|
createUploadMediaListTile(String label, MediaSource mediaSource) => ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
label,
|
label,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: GoogleFonts.getFont(
|
style: GoogleFonts.getFont(
|
||||||
pickerFontFamily,
|
pickerFontFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
tileColor: FlutterFlowTheme.of(context).primaryBackground,
|
tileColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
dense: false,
|
dense: false,
|
||||||
onTap: () => Navigator.pop(
|
onTap: () => Navigator.pop(
|
||||||
context,
|
context,
|
||||||
mediaSource,
|
mediaSource,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
final mediaSource = await showModalBottomSheet<MediaSource>(
|
final mediaSource = await showModalBottomSheet<MediaSource>(
|
||||||
context: context,
|
context: context,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
@ -91,7 +91,9 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: GoogleFonts.getFont(
|
style: GoogleFonts.getFont(
|
||||||
pickerFontFamily,
|
pickerFontFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText.withOpacity(0.65),
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryText
|
||||||
|
.withOpacity(0.65),
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
),
|
),
|
||||||
|
@ -360,18 +362,26 @@ void showUploadMessage(
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
valueColor: Theme.of(context).brightness == Brightness.dark
|
valueColor: Theme.of(context).brightness == Brightness.dark
|
||||||
? AlwaysStoppedAnimation<Color>(
|
? AlwaysStoppedAnimation<Color>(
|
||||||
FlutterFlowTheme.of(context).accent4)
|
FlutterFlowTheme.of(context).info)
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(message),
|
Text(message, style: FlutterFlowTheme.of(context).bodyMedium),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
duration: showLoading ? const Duration(days: 1) : const Duration(seconds: 4),
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
shape: const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(15),
|
||||||
|
topRight: Radius.circular(15),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
duration:
|
||||||
|
showLoading ? const Duration(days: 1) : const Duration(seconds: 4),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String? _removeTrailingSlash(String? path) => path != null && path.endsWith('/')
|
String? _removeTrailingSlash(String? path) => path != null && path.endsWith('/')
|
||||||
? path.substring(0, path.length - 1)
|
? path.substring(0, path.length - 1)
|
||||||
: path;
|
: path;
|
||||||
|
|
|
@ -83,6 +83,12 @@ class ScheduleCompleteVisitPageModel
|
||||||
enText: 'Start date must be before end date.',
|
enText: 'Start date must be before end date.',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (startDate.isBefore(DateTime.now())) {
|
||||||
|
return FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Start date must be after current date.',
|
||||||
|
ptText: 'A data de início deve ser posterior à data atual.',
|
||||||
|
);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return '$e';
|
return '$e';
|
||||||
}
|
}
|
||||||
|
@ -113,6 +119,12 @@ class ScheduleCompleteVisitPageModel
|
||||||
ptText: 'A data de término deve ser posterior à data de início.',
|
ptText: 'A data de término deve ser posterior à data de início.',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (endDate.isBefore(DateTime.now())) {
|
||||||
|
return FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'End date must be after current date.',
|
||||||
|
ptText: 'A data de término deve ser posterior à data atual.',
|
||||||
|
);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return '$e';
|
return '$e';
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,300 +269,12 @@ Widget scheduleVisit(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
children: [
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
20.0, 30.0, 0.0, 30.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'u0jocx7e' /* Quais visitantes você deseja c... */,
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.start,
|
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (_model.visitorJsonList.isNotEmpty)
|
|
||||||
Builder(
|
|
||||||
builder: (context) {
|
|
||||||
final visitorListView =
|
|
||||||
_model.visitorJsonList.map((e) => e).toList();
|
|
||||||
return ListView.separated(
|
|
||||||
padding: const EdgeInsets.fromLTRB(
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
20,
|
|
||||||
20,
|
|
||||||
),
|
|
||||||
shrinkWrap: true,
|
|
||||||
scrollDirection: Axis.vertical,
|
|
||||||
itemCount: visitorListView.length,
|
|
||||||
separatorBuilder: (_, __) =>
|
|
||||||
const SizedBox(height: 5.0),
|
|
||||||
itemBuilder: (context, visitorListViewIndex) {
|
|
||||||
final visitorListViewItem =
|
|
||||||
visitorListView[visitorListViewIndex];
|
|
||||||
return InkWell(
|
|
||||||
splashColor: Colors.transparent,
|
|
||||||
focusColor: Colors.transparent,
|
|
||||||
hoverColor: Colors.transparent,
|
|
||||||
highlightColor: Colors.transparent,
|
|
||||||
onTap: () async {
|
|
||||||
// await showModalBottomSheet(
|
|
||||||
// isScrollControlled: true,
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// enableDrag: false,
|
|
||||||
// context: context,
|
|
||||||
// builder: (context) {
|
|
||||||
// return GestureDetector(
|
|
||||||
// onTap: () => _model
|
|
||||||
// .unfocusNode.canRequestFocus
|
|
||||||
// ? FocusScope.of(context)
|
|
||||||
// .requestFocus(_model.unfocusNode)
|
|
||||||
// : FocusScope.of(context).unfocus(),
|
|
||||||
// child: Padding(
|
|
||||||
// padding:
|
|
||||||
// MediaQuery.viewInsetsOf(context),
|
|
||||||
// child:
|
|
||||||
// const VisitorDetailsModalTemplateComponentWidget(
|
|
||||||
// visitorImageURL: '',
|
|
||||||
// visitorEmail: '',
|
|
||||||
// visitorName: '',
|
|
||||||
// visitorPhone: '',
|
|
||||||
// visitorType: '',
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// ).then((value) => safeSetState(() {}));
|
|
||||||
},
|
|
||||||
onLongPress: () async {
|
|
||||||
// _model.removeFromVisitorJsonList(
|
|
||||||
// visitorListViewItem);
|
|
||||||
// setState(() {});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: MediaQuery.of(context).size.width,
|
|
||||||
height: 70.0,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryBackground,
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 50.0,
|
|
||||||
height: 50.0,
|
|
||||||
clipBehavior: Clip.antiAlias,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
child: CachedNetworkImage(
|
|
||||||
fadeInDuration:
|
|
||||||
const Duration(milliseconds: 500),
|
|
||||||
fadeOutDuration:
|
|
||||||
const Duration(milliseconds: 500),
|
|
||||||
imageUrl:
|
|
||||||
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
|
||||||
visitorListViewItem,
|
|
||||||
r'''$.VTE_DOCUMENTO''',
|
|
||||||
).toString()}&tipo=E",
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
getJsonField(
|
|
||||||
visitorListViewItem,
|
|
||||||
r'''$.VTE_NOME''',
|
|
||||||
).toString(),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
IconButton(
|
|
||||||
onPressed: () async {
|
|
||||||
_model
|
|
||||||
.removeFromVisitorJsonList(
|
|
||||||
visitorListViewItem);
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
icon: const Icon(Icons.close)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.divide(const SizedBox(width: 30.0))
|
|
||||||
.addToStart(const SizedBox(width: 30.0)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Stack(
|
|
||||||
children: [
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(0.01, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 20.0),
|
|
||||||
child: FFButtonWidget(
|
|
||||||
onPressed: () async {
|
|
||||||
await showModalBottomSheet(
|
|
||||||
isScrollControlled: true,
|
|
||||||
isDismissible: true,
|
|
||||||
backgroundColor: FlutterFlowTheme.of(context)
|
|
||||||
.primaryBackground,
|
|
||||||
enableDrag: true,
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return GestureDetector(
|
|
||||||
onTap: () => _model
|
|
||||||
.unfocusNode.canRequestFocus
|
|
||||||
? FocusScope.of(context)
|
|
||||||
.requestFocus(_model.unfocusNode)
|
|
||||||
: FocusScope.of(context).unfocus(),
|
|
||||||
child: SizedBox(
|
|
||||||
height:
|
|
||||||
MediaQuery.of(context).size.height *
|
|
||||||
0.9,
|
|
||||||
width: MediaQuery.of(context).size.width,
|
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
MediaQuery.viewInsetsOf(context),
|
|
||||||
child:
|
|
||||||
VisitorSearchModalTemplateComponentWidget(
|
|
||||||
getVisitors: (visitorsParam) async {
|
|
||||||
_model.visitorJsonList =
|
|
||||||
visitorsParam!
|
|
||||||
.toList()
|
|
||||||
.cast<dynamic>();
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
getDocs: (docsParam) async {
|
|
||||||
_model.visitorStrList =
|
|
||||||
strListToStr(
|
|
||||||
docsParam!.toList());
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
).then((value) => safeSetState(() {}));
|
|
||||||
},
|
|
||||||
text: '',
|
|
||||||
icon: Icon(
|
|
||||||
Icons.add,
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
size: 30.0,
|
|
||||||
),
|
|
||||||
options: FFButtonOptions(
|
|
||||||
width: MediaQuery.sizeOf(context).width * 0.8,
|
|
||||||
height: 80.0,
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
14.0, 0.0, 0.0, 20.0),
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryBackground,
|
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.titleSmallFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 16.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.titleSmallFamily),
|
|
||||||
),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).accent4,
|
|
||||||
width: 1.0,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 50.0, 0.0, 0.0),
|
|
||||||
child: Container(
|
|
||||||
width: MediaQuery.sizeOf(context).width * 0.8,
|
|
||||||
height: 20.0,
|
|
||||||
decoration: const BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: AutoSizeText(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'r8soavtz' /* Clique para adicionar um visit... */,
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Column(mainAxisSize: MainAxisSize.max, children: [
|
Column(mainAxisSize: MainAxisSize.max, children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
20.0, 24.0, 0.0, 24.0),
|
20.0, 30.0, 0.0, 24.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'98evnbbe' /* Qual o período de validade da ... */,
|
'98evnbbe' /* Qual o período de validade da ... */,
|
||||||
|
@ -1079,6 +791,294 @@ Widget scheduleVisit(
|
||||||
]
|
]
|
||||||
// .divide(const SizedBox(height: 0.0)),
|
// .divide(const SizedBox(height: 0.0)),
|
||||||
),
|
),
|
||||||
|
Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
20.0, 24.0, 0.0, 30.0),
|
||||||
|
child: Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'u0jocx7e' /* Quais visitantes você deseja c... */,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (_model.visitorJsonList.isNotEmpty)
|
||||||
|
Builder(
|
||||||
|
builder: (context) {
|
||||||
|
final visitorListView =
|
||||||
|
_model.visitorJsonList.map((e) => e).toList();
|
||||||
|
return ListView.separated(
|
||||||
|
padding: const EdgeInsets.fromLTRB(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
20,
|
||||||
|
20,
|
||||||
|
),
|
||||||
|
shrinkWrap: true,
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
itemCount: visitorListView.length,
|
||||||
|
separatorBuilder: (_, __) =>
|
||||||
|
const SizedBox(height: 5.0),
|
||||||
|
itemBuilder: (context, visitorListViewIndex) {
|
||||||
|
final visitorListViewItem =
|
||||||
|
visitorListView[visitorListViewIndex];
|
||||||
|
return InkWell(
|
||||||
|
splashColor: Colors.transparent,
|
||||||
|
focusColor: Colors.transparent,
|
||||||
|
hoverColor: Colors.transparent,
|
||||||
|
highlightColor: Colors.transparent,
|
||||||
|
onTap: () async {
|
||||||
|
// await showModalBottomSheet(
|
||||||
|
// isScrollControlled: true,
|
||||||
|
// backgroundColor: Colors.transparent,
|
||||||
|
// enableDrag: false,
|
||||||
|
// context: context,
|
||||||
|
// builder: (context) {
|
||||||
|
// return GestureDetector(
|
||||||
|
// onTap: () => _model
|
||||||
|
// .unfocusNode.canRequestFocus
|
||||||
|
// ? FocusScope.of(context)
|
||||||
|
// .requestFocus(_model.unfocusNode)
|
||||||
|
// : FocusScope.of(context).unfocus(),
|
||||||
|
// child: Padding(
|
||||||
|
// padding:
|
||||||
|
// MediaQuery.viewInsetsOf(context),
|
||||||
|
// child:
|
||||||
|
// const VisitorDetailsModalTemplateComponentWidget(
|
||||||
|
// visitorImageURL: '',
|
||||||
|
// visitorEmail: '',
|
||||||
|
// visitorName: '',
|
||||||
|
// visitorPhone: '',
|
||||||
|
// visitorType: '',
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// ).then((value) => safeSetState(() {}));
|
||||||
|
},
|
||||||
|
onLongPress: () async {
|
||||||
|
// _model.removeFromVisitorJsonList(
|
||||||
|
// visitorListViewItem);
|
||||||
|
// setState(() {});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
height: 70.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 50.0,
|
||||||
|
height: 50.0,
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
|
child: CachedNetworkImage(
|
||||||
|
fadeInDuration:
|
||||||
|
const Duration(milliseconds: 500),
|
||||||
|
fadeOutDuration:
|
||||||
|
const Duration(milliseconds: 500),
|
||||||
|
imageUrl:
|
||||||
|
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||||
|
visitorListViewItem,
|
||||||
|
r'''$.VTE_DOCUMENTO''',
|
||||||
|
).toString()}&tipo=E",
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
getJsonField(
|
||||||
|
visitorListViewItem,
|
||||||
|
r'''$.VTE_NOME''',
|
||||||
|
).toString(),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: () async {
|
||||||
|
_model
|
||||||
|
.removeFromVisitorJsonList(
|
||||||
|
visitorListViewItem);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.close)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
.divide(const SizedBox(width: 30.0))
|
||||||
|
.addToStart(const SizedBox(width: 30.0)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Stack(
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment: const AlignmentDirectional(0.01, 0.0),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 0.0, 0.0, 20.0),
|
||||||
|
child: FFButtonWidget(
|
||||||
|
onPressed: () async {
|
||||||
|
await showModalBottomSheet(
|
||||||
|
isScrollControlled: true,
|
||||||
|
isDismissible: true,
|
||||||
|
backgroundColor: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground,
|
||||||
|
enableDrag: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () => _model
|
||||||
|
.unfocusNode.canRequestFocus
|
||||||
|
? FocusScope.of(context)
|
||||||
|
.requestFocus(_model.unfocusNode)
|
||||||
|
: FocusScope.of(context).unfocus(),
|
||||||
|
child: SizedBox(
|
||||||
|
height:
|
||||||
|
MediaQuery.of(context).size.height *
|
||||||
|
0.7,
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
MediaQuery.viewInsetsOf(context),
|
||||||
|
child:
|
||||||
|
VisitorSearchModalTemplateComponentWidget(
|
||||||
|
getVisitors: (visitorsParam) async {
|
||||||
|
_model.visitorJsonList =
|
||||||
|
visitorsParam!
|
||||||
|
.toList()
|
||||||
|
.cast<dynamic>();
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
getDocs: (docsParam) async {
|
||||||
|
_model.visitorStrList =
|
||||||
|
strListToStr(
|
||||||
|
docsParam!.toList());
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
).then((value) => safeSetState(() {}));
|
||||||
|
},
|
||||||
|
text: '',
|
||||||
|
icon: Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
size: 30.0,
|
||||||
|
),
|
||||||
|
options: FFButtonOptions(
|
||||||
|
width: MediaQuery.sizeOf(context).width * 0.8,
|
||||||
|
height: 80.0,
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 0.0, 0.0, 0.0),
|
||||||
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
14.0, 0.0, 0.0, 20.0),
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground,
|
||||||
|
textStyle: FlutterFlowTheme.of(context)
|
||||||
|
.titleSmall
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.titleSmallFamily,
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryText,
|
||||||
|
fontSize: 16.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.titleSmallFamily),
|
||||||
|
),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).accent4,
|
||||||
|
width: 1.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 50.0, 0.0, 0.0),
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width * 0.8,
|
||||||
|
height: 20.0,
|
||||||
|
decoration: const BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
|
child: AutoSizeText(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'r8soavtz' /* Clique para adicionar um visit... */,
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
Column(
|
Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
|
@ -1146,6 +1146,8 @@ Widget scheduleVisit(
|
||||||
dropDownGetDadosResponse.jsonBody,
|
dropDownGetDadosResponse.jsonBody,
|
||||||
);
|
);
|
||||||
return FlutterFlowDropDown<String>(
|
return FlutterFlowDropDown<String>(
|
||||||
|
fillColor: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground,
|
||||||
controller:
|
controller:
|
||||||
_model.dropDownValueController1 ??=
|
_model.dropDownValueController1 ??=
|
||||||
FormFieldController<String>(
|
FormFieldController<String>(
|
||||||
|
@ -1326,6 +1328,8 @@ Widget scheduleVisit(
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
const EdgeInsetsDirectional.fromSTEB(
|
||||||
16.0, 0.0, 16.0, 0.0),
|
16.0, 0.0, 16.0, 0.0),
|
||||||
hidesUnderline: true,
|
hidesUnderline: true,
|
||||||
|
fillColor: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground,
|
||||||
isOverButton: true,
|
isOverButton: true,
|
||||||
isSearchable: false,
|
isSearchable: false,
|
||||||
isMultiSelect: false,
|
isMultiSelect: false,
|
||||||
|
@ -1602,13 +1606,13 @@ Widget scheduleVisit(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
FFButtonWidget(
|
FFButtonWidget(
|
||||||
text: 'Schedule',
|
text: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Schedule',
|
||||||
|
ptText: 'Agendar',
|
||||||
|
),
|
||||||
onPressed: _model.isValid()
|
onPressed: _model.isValid()
|
||||||
? () async {
|
? () async {
|
||||||
await showDialog(
|
await showDialog(
|
||||||
// isScrollControlled: true,
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// enableDrag: false,
|
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
|
@ -1619,8 +1623,8 @@ Widget scheduleVisit(
|
||||||
child: Dialog(
|
child: Dialog(
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.topCenter,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: MediaQuery.of(context).size.width,
|
// width: MediaQuery.of(context).size.width,
|
||||||
height: MediaQuery.of(context).size.height * 0.5,
|
// height: MediaQuery.of(context).size.height * 0.7,
|
||||||
child: VisitDetailsModalTemplateComponentWidget(
|
child: VisitDetailsModalTemplateComponentWidget(
|
||||||
visitStartDateStr: _model.textController1.text,
|
visitStartDateStr: _model.textController1.text,
|
||||||
visitEndDateStr: _model.textController2.text,
|
visitEndDateStr: _model.textController2.text,
|
||||||
|
@ -1645,6 +1649,12 @@ Widget scheduleVisit(
|
||||||
height: MediaQuery.of(context).size.height * 0.05,
|
height: MediaQuery.of(context).size.height * 0.05,
|
||||||
width: MediaQuery.of(context).size.height * 0.2,
|
width: MediaQuery.of(context).size.height * 0.2,
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(15.0),
|
||||||
|
bottomRight: Radius.circular(15.0),
|
||||||
|
topLeft: Radius.circular(15.0),
|
||||||
|
topRight: Radius.circular(15.0),
|
||||||
|
),
|
||||||
disabledColor: FlutterFlowTheme.of(context).customColor5),
|
disabledColor: FlutterFlowTheme.of(context).customColor5),
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator: true,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue