feat: 결재·마스터 실연동 업데이트
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:superport_v2/core/common/models/paginated_result.dart';
|
||||
import 'package:superport_v2/core/network/failure.dart';
|
||||
|
||||
import '../../domain/entities/approval_step_input.dart';
|
||||
import '../../domain/entities/approval_step_record.dart';
|
||||
@@ -49,8 +50,9 @@ class ApprovalStepController extends ChangeNotifier {
|
||||
approverId: _approverId,
|
||||
);
|
||||
_result = response;
|
||||
} catch (e) {
|
||||
_errorMessage = e.toString();
|
||||
} catch (error) {
|
||||
final failure = Failure.from(error);
|
||||
_errorMessage = failure.describe();
|
||||
} finally {
|
||||
_isLoading = false;
|
||||
notifyListeners();
|
||||
@@ -86,8 +88,9 @@ class ApprovalStepController extends ChangeNotifier {
|
||||
final detail = await _repository.fetchDetail(id);
|
||||
_selected = detail;
|
||||
return detail;
|
||||
} catch (e) {
|
||||
_errorMessage = e.toString();
|
||||
} catch (error) {
|
||||
final failure = Failure.from(error);
|
||||
_errorMessage = failure.describe();
|
||||
return null;
|
||||
} finally {
|
||||
_isLoadingDetail = false;
|
||||
@@ -128,8 +131,9 @@ class ApprovalStepController extends ChangeNotifier {
|
||||
final nextPage = _result?.page ?? 1;
|
||||
await fetch(page: nextPage);
|
||||
return created;
|
||||
} catch (e) {
|
||||
_errorMessage = e.toString();
|
||||
} catch (error) {
|
||||
final failure = Failure.from(error);
|
||||
_errorMessage = failure.describe();
|
||||
return null;
|
||||
} finally {
|
||||
_isSaving = false;
|
||||
@@ -150,8 +154,9 @@ class ApprovalStepController extends ChangeNotifier {
|
||||
final nextPage = _result?.page ?? 1;
|
||||
await fetch(page: nextPage);
|
||||
return updated;
|
||||
} catch (e) {
|
||||
_errorMessage = e.toString();
|
||||
} catch (error) {
|
||||
final failure = Failure.from(error);
|
||||
_errorMessage = failure.describe();
|
||||
return null;
|
||||
} finally {
|
||||
_isSaving = false;
|
||||
@@ -181,8 +186,9 @@ class ApprovalStepController extends ChangeNotifier {
|
||||
_result = _result!.copyWith(items: items);
|
||||
}
|
||||
return true;
|
||||
} catch (e) {
|
||||
_errorMessage = e.toString();
|
||||
} catch (error) {
|
||||
final failure = Failure.from(error);
|
||||
_errorMessage = failure.describe();
|
||||
return false;
|
||||
} finally {
|
||||
_isSaving = false;
|
||||
@@ -210,8 +216,9 @@ class ApprovalStepController extends ChangeNotifier {
|
||||
_result = _result!.copyWith(items: items);
|
||||
}
|
||||
return record;
|
||||
} catch (e) {
|
||||
_errorMessage = e.toString();
|
||||
} catch (error) {
|
||||
final failure = Failure.from(error);
|
||||
_errorMessage = failure.describe();
|
||||
return null;
|
||||
} finally {
|
||||
_isSaving = false;
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
import '../../../../../core/config/environment.dart';
|
||||
import '../../../../../core/constants/app_sections.dart';
|
||||
import '../../../../../core/permissions/permission_manager.dart';
|
||||
import '../../../../../core/permissions/permission_resources.dart';
|
||||
import '../../../../../widgets/app_layout.dart';
|
||||
import '../../../../../widgets/components/filter_bar.dart';
|
||||
import '../../../../../widgets/components/superport_dialog.dart';
|
||||
@@ -15,7 +16,7 @@ import '../../domain/entities/approval_step_input.dart';
|
||||
import '../../domain/entities/approval_step_record.dart';
|
||||
import '../../domain/repositories/approval_step_repository.dart';
|
||||
|
||||
const String _stepResourcePath = '/approvals/steps';
|
||||
const String _stepResourcePath = PermissionResources.approvalSteps;
|
||||
|
||||
/// 결재 단계 관리 진입 페이지. 기능 플래그에 따라 실제 화면 또는 준비중 화면을 노출한다.
|
||||
class ApprovalStepPage extends StatelessWidget {
|
||||
|
||||
Reference in New Issue
Block a user