계정 정보 다이얼로그 추가 및 전체 목록 페치 개선
This commit is contained in:
@@ -135,7 +135,7 @@ class _ApprovalEnabledPageState extends State<_ApprovalEnabledPage> {
|
||||
final currentPage = result?.page ?? 1;
|
||||
final totalPages = result == null || result.pageSize == 0
|
||||
? 1
|
||||
: (result.total / result.pageSize).ceil().clamp(1, 9999);
|
||||
: (result.total / result.pageSize).ceil().clamp(1, 9999) as int;
|
||||
final hasNext = result == null
|
||||
? false
|
||||
: (result.page * result.pageSize) < result.total;
|
||||
@@ -275,6 +275,15 @@ class _ApprovalEnabledPageState extends State<_ApprovalEnabledPage> {
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
ShadButton.outline(
|
||||
size: ShadButtonSize.sm,
|
||||
onPressed:
|
||||
_controller.isLoadingList || currentPage <= 1
|
||||
? null
|
||||
: () => _controller.fetch(page: 1),
|
||||
child: const Text('처음'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
ShadButton.outline(
|
||||
size: ShadButtonSize.sm,
|
||||
onPressed:
|
||||
@@ -291,6 +300,15 @@ class _ApprovalEnabledPageState extends State<_ApprovalEnabledPage> {
|
||||
: () => _controller.fetch(page: currentPage + 1),
|
||||
child: const Text('다음'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
ShadButton.outline(
|
||||
size: ShadButtonSize.sm,
|
||||
onPressed:
|
||||
_controller.isLoadingList || currentPage >= totalPages
|
||||
? null
|
||||
: () => _controller.fetch(page: totalPages),
|
||||
child: const Text('마지막'),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -393,7 +411,10 @@ class _ApprovalEnabledPageState extends State<_ApprovalEnabledPage> {
|
||||
ShadButton.ghost(
|
||||
onPressed: isSubmitting
|
||||
? null
|
||||
: () => Navigator.of(context).pop(false),
|
||||
: () => Navigator.of(
|
||||
context,
|
||||
rootNavigator: true,
|
||||
).pop(false),
|
||||
child: const Text('취소'),
|
||||
),
|
||||
ShadButton(
|
||||
@@ -449,7 +470,10 @@ class _ApprovalEnabledPageState extends State<_ApprovalEnabledPage> {
|
||||
return;
|
||||
}
|
||||
if (result != null) {
|
||||
Navigator.of(context).pop(true);
|
||||
Navigator.of(
|
||||
context,
|
||||
rootNavigator: true,
|
||||
).pop(true);
|
||||
}
|
||||
},
|
||||
child: isSubmitting
|
||||
@@ -788,7 +812,10 @@ class _ApprovalEnabledPageState extends State<_ApprovalEnabledPage> {
|
||||
constraints: const BoxConstraints(maxWidth: 420),
|
||||
actions: [
|
||||
ShadButton.ghost(
|
||||
onPressed: () => Navigator.of(dialogContext).pop(),
|
||||
onPressed: () => Navigator.of(
|
||||
dialogContext,
|
||||
rootNavigator: true,
|
||||
).pop(),
|
||||
child: const Text('취소'),
|
||||
),
|
||||
ShadButton(
|
||||
@@ -798,7 +825,10 @@ class _ApprovalEnabledPageState extends State<_ApprovalEnabledPage> {
|
||||
setState(() => errorText = '비고를 입력하세요.');
|
||||
return;
|
||||
}
|
||||
Navigator.of(dialogContext).pop(
|
||||
Navigator.of(
|
||||
dialogContext,
|
||||
rootNavigator: true,
|
||||
).pop(
|
||||
_StepActionDialogResult(note: note.isEmpty ? null : note),
|
||||
);
|
||||
},
|
||||
@@ -877,11 +907,13 @@ class _ApprovalEnabledPageState extends State<_ApprovalEnabledPage> {
|
||||
title: '템플릿 적용 확인',
|
||||
actions: [
|
||||
ShadButton.ghost(
|
||||
onPressed: () => Navigator.of(context).pop(false),
|
||||
onPressed: () =>
|
||||
Navigator.of(context, rootNavigator: true).pop(false),
|
||||
child: const Text('취소'),
|
||||
),
|
||||
ShadButton(
|
||||
onPressed: () => Navigator.of(context).pop(true),
|
||||
onPressed: () =>
|
||||
Navigator.of(context, rootNavigator: true).pop(true),
|
||||
child: const Text('적용'),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user