update invoice
This commit is contained in:
@@ -283,6 +283,18 @@ class ApiConstants {
|
||||
static const String getPaymentDetail =
|
||||
'/building_material.building_material.api.payment.get_detail';
|
||||
|
||||
/// Get invoice list (Frappe API)
|
||||
/// POST /api/method/building_material.building_material.api.invoice.get_list
|
||||
/// Body: { "limit_start": 0, "limit_page_length": 0 }
|
||||
static const String getInvoiceList =
|
||||
'/building_material.building_material.api.invoice.get_list';
|
||||
|
||||
/// Get invoice detail (Frappe API)
|
||||
/// POST /api/method/building_material.building_material.api.invoice.get_detail
|
||||
/// Body: { "name": "ACC-SINV-2025-00041" }
|
||||
static const String getInvoiceDetail =
|
||||
'/building_material.building_material.api.invoice.get_detail';
|
||||
|
||||
// ============================================================================
|
||||
// Project Endpoints (Frappe ERPNext)
|
||||
// ============================================================================
|
||||
|
||||
@@ -52,6 +52,8 @@ import 'package:worker/features/showrooms/presentation/pages/design_request_deta
|
||||
import 'package:worker/features/showrooms/presentation/pages/model_house_detail_page.dart';
|
||||
import 'package:worker/features/showrooms/presentation/pages/model_houses_page.dart';
|
||||
import 'package:worker/features/account/presentation/pages/theme_settings_page.dart';
|
||||
import 'package:worker/features/invoices/presentation/pages/invoices_page.dart';
|
||||
import 'package:worker/features/invoices/presentation/pages/invoice_detail_page.dart';
|
||||
|
||||
/// Router Provider
|
||||
///
|
||||
@@ -488,6 +490,27 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
MaterialPage(key: state.pageKey, child: const ThemeSettingsPage()),
|
||||
),
|
||||
|
||||
// Invoices Route
|
||||
GoRoute(
|
||||
path: RouteNames.invoices,
|
||||
name: RouteNames.invoices,
|
||||
pageBuilder: (context, state) =>
|
||||
MaterialPage(key: state.pageKey, child: const InvoicesPage()),
|
||||
),
|
||||
|
||||
// Invoice Detail Route
|
||||
GoRoute(
|
||||
path: RouteNames.invoiceDetail,
|
||||
name: RouteNames.invoiceDetail,
|
||||
pageBuilder: (context, state) {
|
||||
final invoiceId = state.pathParameters['id'];
|
||||
return MaterialPage(
|
||||
key: state.pageKey,
|
||||
child: InvoiceDetailPage(invoiceId: invoiceId ?? ''),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
// Chat List Route
|
||||
GoRoute(
|
||||
path: RouteNames.chat,
|
||||
@@ -638,6 +661,10 @@ class RouteNames {
|
||||
static const String themeSettings = '$account/theme-settings';
|
||||
static const String settings = '$account/settings';
|
||||
|
||||
// Invoice Routes
|
||||
static const String invoices = '/invoices';
|
||||
static const String invoiceDetail = '$invoices/:id';
|
||||
|
||||
// Promotions & Notifications Routes
|
||||
static const String promotions = '/promotions';
|
||||
static const String promotionDetail = '$promotions/:id';
|
||||
|
||||
Reference in New Issue
Block a user