Skip to content

Commit

Permalink
update routename when using suggested name
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmajh committed Nov 13, 2023
1 parent e9a07d8 commit b63fa03
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/admin/pm_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ class _PMDetailsState extends State<PMDetails> {
suffixIcon: IconButton(
onPressed: () {
templateNotifier.setRouteName(
pmNameFieldController.text,
routeNameFieldController.text,
selected.selectedFile!,
selected.selectedTemplate!,
// hasRouteCode,
Expand Down Expand Up @@ -520,10 +520,20 @@ class _PMDetailsState extends State<PMDetails> {
if (suggestNameFieldController.text != '') {
pmNameFieldController.text =
suggestNameFieldController.text;
if (routeNameFieldController.text.isNotEmpty) {
routeNameFieldController.text =
suggestNameFieldController.text;
}
templateNotifier.setPMName(
pmNameFieldController.text,
selected.selectedFile!,
selected.selectedTemplate!);
templateNotifier.setRouteName(
routeNameFieldController.text,
selected.selectedFile!,
selected.selectedTemplate!,
// hasRouteCode,
);
}
},
icon: const Icon(Icons.eject),
Expand Down

0 comments on commit b63fa03

Please sign in to comment.