group(function () { Route::prefix('order')->group(function () { Route::get('history/{service_category_id}/{customer_id}', [ OrderController::class, 'history' ]); }); Route::prefix('project')->group(function () { Route::get('history/{service_category_id}/{customer_id}', [ ProjectController::class, 'history' ]); Route::get('select2', [ ProjectController::class, 'select2' ]); }); Route::group(['prefix' => 'customer_chat'], function () { Route::get('/by_customer/{customer_id}', 'API\CustomerChatController@paginateByCustomerId'); Route::get('/total_unread', 'API\CustomerChatController@countTotalUnreadChatByUserId'); }); Route::resource('customer_chat', 'API\CustomerChatController', [ 'only' => ['store'] ]); Route::group(['prefix' => 'role_level'], function () { Route::get('/select2', 'API\RoleLevelController@select2'); Route::get('/all', 'API\RoleLevelController@getAll'); }); Route::prefix('menu')->group(function () { Route::get('all', 'API\MenuController@all'); Route::get('available', 'API\MenuController@available'); }); Route::group(['prefix' => 'service_category'], function () { Route::get('/', 'API\ServiceCategoryController@index'); Route::post('/set_current/{id}', 'API\ServiceCategoryController@setCurrentService'); Route::get('/get_current', 'API\ServiceCategoryController@getCurrentService'); Route::get('/all', 'API\ServiceCategoryController@getListServiceCategories'); Route::get('/by_role', 'API\ServiceCategoryController@byRole'); }); Route::group(['prefix' => 'city_branch'], function () { Route::get('/select2_by_service_category/{id}', 'API\CityBranchController@select2ByServiceCategory'); Route::post('/set_current/{id}', 'API\CityBranchController@setCurrentCityBranch'); Route::get('/get_current', 'API\CityBranchController@getCurrentCityBranch'); Route::post('/remove_current', 'API\CityBranchController@removeCurrentCityBranch'); Route::get('/select2_where_not_active', 'API\CityBranchController@select2WhereNotActive'); Route::get('/list_by_service_category/{id}', 'API\CityBranchController@listByServiceCategory'); }); Route::group(['prefix' => 'site_project'], function () { Route::get('/select2', 'API\SiteProjectController@select2'); Route::get('/all', 'API\SiteProjectController@all'); Route::get('/by_service_category/{id}', 'API\SiteProjectController@indexByServiceCategory'); Route::post('/set_current/{id}', 'API\SiteProjectController@setCurrentSiteProject'); Route::get('/get_current', 'API\SiteProjectController@getCurrentSiteProject'); Route::post('/remove_current', 'API\SiteProjectController@removeCurrentSiteProject'); Route::get('/by_city_branch/{city_branch_id}', 'API\SiteProjectController@select2ByCityBranch'); Route::get('/by_array_city_branch/{city_branch_id}', 'API\SiteProjectController@select2ByCityBranchArray'); Route::get('/select2_where_not_active/{city_branch_id}', 'API\SiteProjectController@select2WhereNotActive'); Route::get('/by_service_category', 'API\SiteProjectController@paginateByServiceCategory'); Route::get('/fetch_by_service_category/{id}', 'API\SiteProjectController@showByServiceCategory'); Route::get('/list_by_city_branches/{city_branches}', 'API\SiteProjectController@listByCityBranchArray'); }); Route::resource('site_project', 'API\SiteProjectController', [ 'only' => ['index', 'show', 'store', 'update', 'destroy'] ]); Route::get('auth', 'API\AuthController@getUserData'); Route::post('update_profile', 'API\AuthController@updateUserData'); Route::post('change_password', 'API\AuthController@changePassword'); Route::group(['prefix' => 'customization'], function () { Route::get('/', 'API\CustomizationController@index'); Route::post('/', 'API\CustomizationController@save'); }); Route::group(['prefix' => 'user'], function () { Route::post('/update-role/{id}', 'API\UserController@updateRole'); Route::get('/auth', 'API\UserController@auth'); Route::get('select2', 'API\UserController@select2'); Route::get('def', 'API\UserController@test'); }); Route::group(['prefix' => 'customer'], function () { Route::post('import', 'API\CustomerController@import'); Route::get('export', 'API\CustomerController@export'); Route::get('select2', 'API\CustomerController@select2'); }); Route::prefix('user')->group(function () { Route::get('select2', 'API\UserController@select2'); }); Route::group(['prefix' => 'role'], function () { Route::get('select2', 'API\RoleController@select2'); }); // resource Route::resource("role", "API\RoleController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("user", "API\UserController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("customer", "API\CustomerController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::group(['prefix' => 'service_center'], function () { Route::get('select2', 'API\ServiceCenterController@select2'); }); Route::resource("service_center", "API\ServiceCenterController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::group(['prefix' => 'withdrawal'], function () { Route::post('update_status/{kode_transaksi}', 'API\WithdrawalController@updateStatus'); Route::post('upload_tax_invoice/{kode_transaksi}', 'API\WithdrawalController@uploadTaxInvoice'); Route::get('download_tax_invoice/{kode_transaksi}', 'API\WithdrawalController@downloadTaxInvoice'); Route::get('pdf', 'API\WithdrawalController@withdrawalPdf'); Route::get('pdf/{kode_transaksi}', 'API\WithdrawalController@withdrawalDetailPdf'); }); Route::group(['prefix' => 'withdrawal_report'], function () { Route::get('', 'API\WithdrawalController@listReport'); Route::get('unpaid_total', 'API\WithdrawalController@unpaidTotal'); Route::get('/{id}', 'API\WithdrawalController@reportDetail'); Route::get('pdf/{user_kafdig_id}', 'API\WithdrawalController@reportDetailPdf'); }); Route::resource("withdrawal", "API\WithdrawalController", [ "only" => ["index", "show"] ]); // sync with current service Route::middleware(['App\Http\Middleware\CurrentServiceMiddleware'])->group(function () { Route::group(['middleware' => 'App\Http\Middleware\RoleAccess'], function () { Route::group(['prefix' => 'customer_address'], function () { Route::get('/select2/{customer_id}', 'API\CustomerAddressController@select2'); Route::get('/paginate/{customer_id}', 'API\CustomerAddressController@index'); Route::get('/index', 'API\CustomerAddressController@indexByCurrentCustomer'); Route::get('/select2', 'API\CustomerAddressController@select2Mobile'); }); Route::resource('customer_address', 'API\CustomerAddressController', [ 'only' => ['show', 'store', 'update', 'destroy'] ]); // group Route::group(['prefix' => 'company'], function () { Route::get('/', 'API\CompanyController@index'); Route::post('/', 'API\CompanyController@save'); }); Route::group(['prefix' => 'tax'], function () { Route::get('select2', 'API\TaxController@select2'); Route::get('summary', 'API\TaxController@summary'); Route::get('show_pdf/{id}', 'API\TaxController@showPDF'); }); Route::group(['prefix' => 'master_coa'], function () { Route::get('select', 'API\MasterCoaController@select'); Route::get('select2', 'API\MasterCoaController@select2'); }); Route::group(['prefix' => 'warehouse'], function () { Route::get('select2', 'API\WarehouseController@select2'); }); Route::group(['prefix' => 'chart_of_account'], function () { Route::post('import', 'API\ChartOfAccountController@import'); Route::get('export', 'API\ChartOfAccountController@export'); Route::get('types', 'API\ChartOfAccountController@types'); Route::get('select', 'API\ChartOfAccountController@select'); Route::get('select2', 'API\ChartOfAccountController@select2'); }); Route::group(['prefix' => 'cash_in'], function () { Route::get('actual', 'API\CashInController@actual'); Route::get('select2', 'API\CashInController@select2'); }); Route::group(['prefix' => 'cash_out'], function () { Route::get('actual', 'API\CashOutController@actual'); Route::get('select2', 'API\CashOutController@select2'); }); Route::group(['prefix' => 'manual_journal'], function () { Route::post('import', 'API\ManualJournalController@import'); Route::get('export', 'API\ManualJournalController@export'); }); Route::group(['prefix' => 'expense'], function () { Route::post('bulk', 'API\ExpenseController@bulk'); Route::post('import', 'API\ExpenseController@import'); Route::get('export', 'API\ExpenseController@export'); }); Route::group(['prefix' => 'supplier'], function () { Route::get('select2', 'API\SupplierController@select2'); }); Route::group(['prefix' => 'item_category'], function () { Route::get('select2', 'API\ItemCategoryController@select2'); }); Route::group(['prefix' => 'item'], function () { Route::post('import', 'API\ItemController@import'); Route::get('export', 'API\ItemController@export'); Route::get('select2', 'API\ItemController@select2'); Route::get('adjustments/{itemId}', 'API\ItemController@paginateAdjustment'); Route::get('bundles/{itemId}', 'API\ItemController@paginateBundle'); Route::get('transfer_orders/{itemId}', 'API\ItemController@paginateTransferOrder'); Route::get('sale_orders/{itemId}', 'API\ItemController@paginateSaleOrder'); Route::get('purchase_orders/{itemId}', 'API\ItemController@paginatePurchaseOrder'); }); Route::group(['prefix' => 'composite_item'], function () { Route::get('/', 'API\ItemController@paginateComposite'); }); Route::group(['prefix' => 'transfer_order'], function () { Route::post('update_status/{id}/{status}', 'API\TransferOrderController@updateStatus'); }); Route::group(['prefix' => 'adjustment'], function () {}); Route::group(['prefix' => 'bundle'], function () {}); Route::group(['prefix' => 'price_list'], function () { Route::get('select2', 'API\PriceListController@select2'); }); Route::group(['prefix' => 'sale_order'], function () { Route::post('import', 'API\SaleOrderController@import'); Route::get('export', 'API\SaleOrderController@export'); Route::get('all', 'API\SaleOrderController@all'); Route::get('no_sale_order', 'API\SaleOrderController@noSaleOrder'); Route::get('select2', 'API\SaleOrderController@select2'); Route::post('mark_as_sent/{id}', 'API\SaleOrderController@markAsSent'); Route::get("receivables", 'API\SaleOrderController@receivables'); Route::get("amount", 'API\SaleOrderController@amount'); }); Route::group(['prefix' => 'retainer_invoice'], function () { Route::get('has_customer/{customerId}', 'API\RetainerInvoiceController@paginateByCustomerId'); Route::get('no_invoice', 'API\RetainerInvoiceController@noRetainerInvoice'); Route::get('select2', 'API\RetainerInvoiceController@select2'); Route::post('mark_as_sent/{id}', 'API\RetainerInvoiceController@markAsSent'); }); Route::get('all', 'API\InvoiceController@all'); Route::group(['prefix' => 'invoice'], function () { Route::get('show_pdf/{id}', 'API\InvoiceController@showPDF'); Route::get('no_invoice', 'API\InvoiceController@noInvoice'); Route::get('select2', 'API\InvoiceController@select2'); Route::post('mark_as_sent/{id}', 'API\InvoiceController@markAsSent'); Route::get('paginate_by_tax/{tax_id}', 'API\InvoiceController@paginateByTax'); Route::get('export/{id}', 'API\InvoiceController@export'); Route::get('billed_amount/{type}/{deal_id}/{invoice_id}', 'API\InvoiceController@getBilledAmount'); Route::get('all', 'API\InvoiceController@all'); }); Route::group(['prefix' => 'labour_order'], function () { Route::post('/', 'API\LabourOrderController@store'); Route::put('update_status/{id}', 'API\LabourOrderController@updateStatus'); Route::put('/{id}', 'API\LabourOrderController@update'); Route::delete('/{id}', 'API\LabourOrderController@destroy'); Route::get('/', 'API\LabourOrderController@index'); Route::get('generate_lo_number', 'API\LabourOrderController@generateLoNumber'); Route::get('/select2', 'API\LabourOrderController@select2'); Route::get('/select2_ref', 'API\LabourOrderController@select2LabourOrder'); Route::get('select2_subcon', 'API\LabourOrderController@select2SubCon'); // Route::post('total_wages_not_overtime/{id}', 'API\LabourOrderController@totalWagesNotOvertime'); // Route::post('total_wages_with_overtime/{id}', 'API\LabourOrderController@totalWagesWithOvertime'); Route::get('/select2_foreman', 'API\LabourOrderController@select2Foreman'); Route::get('/total_week/{project_id}/{week}', 'API\labourOrderController@totalWeek'); Route::get('/total_week_sum/{project_id}/{week}', 'API\LabourOrderController@totalWeekSum'); Route::get('/get_whole_sale/{project_id}', 'API\LabourOrderController@getWholeSaleWeek'); Route::get('/{id}', 'API\LabourOrderController@show'); }); Route::group(['prefix' => 'purchase_order'], function () { Route::get('export', 'API\PurchaseOrderController@export'); Route::get('all', 'API\PurchaseOrderController@all'); Route::get('no_purchase_order', 'API\PurchaseOrderController@noPurchaseOrder'); Route::get('select2', 'API\PurchaseOrderController@select2'); Route::post('mark_as_received/{id}', 'API\PurchaseOrderController@markAsReceived'); Route::get("payables", 'API\PurchaseOrderController@payables'); Route::get("amount", 'API\PurchaseOrderController@amount'); Route::get("select2_no_purchase_request/{project_id}", 'API\PurchaseOrderController@select2PaginatePurchaseRequestNo'); Route::get('get_purchase_request_manual/{purchase_request_id}', 'API\PurchaseOrderController@getManualPurchaseRequest'); Route::get('get_vendor_manual_for_purchase_request/{purchase_request_id}', 'API\PurchaseRequestVendorManualController@getVendorManualForPurchaseRequest'); Route::get('get_machine_manual_for_purchase_request/{purchase_request_id}', 'API\PurchaseRequestMachineManualController@getMachineManualPurchaseRequest'); Route::get('get_other_cost_manual_for_purchase_request/{purchase_request_id}', 'API\PurchaseRequestOtherCostManualController@getOtherCostManualPurchaseRequest'); Route::put('approved/{id}', 'API\PurchaseOrderController@approved'); }); Route::group(['prefix' => 'bill_labour_order'], function () { Route::get('select2_no_ref', 'API\BillLabourOrderController@select2NoRef'); }); Route::group(['prefix' => 'bill'], function () { Route::get('all', 'API\BillController@all'); Route::get('no_bill', 'API\BillController@noBill'); Route::get('select2', 'API\BillController@select2'); Route::post('mark_as_open/{id}', 'API\BillController@markAsOpen'); }); Route::group(['prefix' => 'expense'], function () { Route::get('all', 'API\ExpenseController@all'); Route::get('no_expense', 'API\ExpenseController@noExpense'); }); Route::group(['prefix' => 'chart_of_account_transaction'], function () { Route::get('running_balance/{chartOfAccountId}', 'API\ChartOfAccountTransactionController@runningBalancePaginate'); Route::get('recap_last_balance', 'API\ChartOfAccountTransactionController@recapLastBalance'); }); Route::prefix('report')->group(function () { Route::get('coa', 'API\ReportController@coaMonitoringReport'); Route::get('profit_loss', 'API\ReportController@plReport'); Route::get('balance_sheet', 'API\ReportController@balanceSheet'); Route::get('profit_and_loss', 'API\ReportController@profitAndLoss'); Route::get('cash_flow', 'API\ReportController@cashFlow'); Route::get('work_sheet', 'API\ReportController@workSheet'); }); Route::prefix('requirement')->group(function () { Route::get('paginate/{code}', 'API\RequirementController@paginate'); Route::get('select2/{code}', 'API\RequirementController@select2'); }); Route::group(['prefix' => 'unit_price_category'], function () { Route::get('/has_budget_plan/{budgetPlanId}', 'API\UnitPriceCategoryController@hasBudgetPlan'); }); Route::group(['prefix' => 'unit_price'], function () { Route::get('/by_subcategory/{unit_price_subcategory_id}/{budget_plan?}', 'API\UnitPriceController@unitPriceBySubcategory'); }); Route::group(['prefix' => 'craft_man_absent'], function () { Route::get('/get_craft_man/{project_id}/{supplier_id}/{ref_foreman}', 'API\CraftManAbsentController@getCraftMan'); Route::get('/get_detail/{project_id}/{supplier_id}/{ref_foreman}', 'API\CraftManAbsentController@getDetail'); }); Route::resource("master_coa", "API\MasterCoaController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("warehouse", "API\WarehouseController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::prefix('term')->group(function () { Route::get('select2', 'API\TermController@select2'); }); Route::resource("term", "API\TermController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("tax", "API\TaxController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("cash_and_bank", "API\CashAndBankController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("supplier", "API\SupplierController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("chart_of_account", "API\ChartOfAccountController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("cash_in", "API\CashInController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("cash_out", "API\CashOutController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("manual_journal", "API\ManualJournalController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("item_category", "API\ItemCategoryController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("item", "API\ItemController", [ "only" => ["show", "store", "update", "destroy"] ]); Route::resource("composite_item", "API\ItemController", [ "only" => ["show", "store", "update", "destroy"] ]); Route::resource("bundle", "API\BundleController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("price_list", "API\PriceListController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("adjustment", "API\AdjustmentController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("transfer_order", "API\TransferOrderController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("sale_order", "API\SaleOrderController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("retainer_invoice", "API\RetainerInvoiceController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("invoice", "API\InvoiceController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("invoice_ret_invoice", "API\InvoiceRetInvoiceController", [ "only" => ["store"] ]); Route::prefix("payment_receive")->group(function () { Route::get('fee', 'API\PaymentReceiveController@fee'); Route::get('pdf/{id}', 'API\PaymentReceiveController@printPdf'); }); Route::resource("payment_receive", "API\PaymentReceiveController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("purchase_order", "API\PurchaseOrderController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("bill", "API\BillController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("bill_labour_order", "API\BillLabourOrderController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("expense", "API\ExpenseController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("payment_made", "API\PaymentMadeController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::resource("requirement", "API\RequirementController", [ "only" => ["show", "store", "update", "destroy"] ]); Route::group(['prefix' => 'supplier_material'], function () { Route::get('select2', 'API\SupplierMaterialController@select2'); Route::get('select2_with_material/{material_id}', 'API\SupplierMaterialController@select2SupplierWithMaterial'); }); Route::resource("supplier_material", "API\SupplierMaterialController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::group(['prefix' => 'supplier_product'], function () { Route::get('select2', 'API\SupplierProductController@select2'); Route::get('select2_with_vendor/{vendor_product_id}', 'API\SupplierProductController@select2SupplierWithVendor'); }); Route::resource("supplier_product", "API\SupplierProductController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::group(['prefix' => 'asset'], function () { Route::get('select2', 'API\AssetController@select2'); }); Route::group(['prefix' => 'material'], function () { Route::get('select2', 'API\MaterialController@select2'); Route::get('select_material/{updateOrCreate}/{purchase_request_id}/{budget_plan_id}', 'API\MaterialController@selectMaterialForPurchaseOrder'); }); Route::group(['prefix' => 'vendor_product'], function () { Route::get('select2', 'API\VendorProductController@select2'); Route::get('select_vendor/{purchase_request_id}/{budget_plan_id}', 'API\VendorProductController@selectVendorProductForPurchaseOrder'); }); Route::group(['prefix' => 'deal'], function () { Route::get('deal_kafdig', 'API\DealController@dealKafdig'); Route::get('select2', 'API\DealController@select2'); Route::get('select2_by_customer/{customer_id}', 'API\DealController@select2ByCustomer'); }); Route::resource("deal", "API\DealController", [ "only" => ["index", "show"] ]); Route::group(['prefix' => 'service'], function () { Route::post('update_coa/{id}', 'API\ServiceController@updateCoa'); Route::get('select2_invoice_service', 'API\ServiceController@select2InvoiceService'); }); Route::resource("service", "API\ServiceController", [ "only" => ["index", "show"] ]); Route::group(['prefix' => 'filter_invoice'], function () { Route::get('/current_active', 'API\FilterInvoiceController@getCurrentActive'); Route::post('/set_current_active/{id}', 'API\FilterInvoiceController@setCurrentActive'); Route::post('/forget_current_active', 'API\FilterInvoiceController@forgetCurrentActive'); }); Route::resource("filter_invoice", "API\FilterInvoiceController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::prefix('bill_lo')->group(function () { Route::get('select2', 'API\BillLabourOrderController@select2'); Route::get('/', "API\V2\BillLabourOrderController@index"); Route::post('/', "API\V2\BillLabourOrderController@store"); Route::get('/{billLoId}', "API\V2\BillLabourOrderController@show"); Route::put('/{billLoId}', "API\V2\BillLabourOrderController@update"); Route::delete('/{billLoId}', "API\V2\BillLabourOrderController@destroy"); Route::get('/generate_bill/generate', "API\V2\BillLabourOrderController@generateBillNo"); }); Route::prefix('additional_cost')->group(function () { Route::get('/select2', "API\V2\AdditionalCostController@select2"); }); Route::resource("additional_cost", "API\V2\AdditionalCostController", [ "only" => ["index", "show", "store", "update", "destroy"] ]); Route::group(['prefix' => 'other_cost'], function () { Route::get('/get_other_cost_for_purchase_request/{purchase_request_id}', 'API\PurchaseRequestOtherCostController@getOtherCostForPurchaseRequest'); }); // Route::group(['prefix' => 'other_cost_manual'], function () { // Route::get('/get_other_cost_manual_for_purchase_request/{purchase_request_id}', 'API\PurchaseRequestOtherCostManualController@getOtherCostManualPurchaseRequest'); // }); Route::group(['prefix' => 'machine'], function () { Route::get('/get_machine_for_purchase_request/{purchase_request_id}', 'API\PurchaseRequestMachineController@getMachineForPurchaseRequest'); }); // Route::group(['prefix' => 'machine_manual'], function () { // Route::get('/get_machine_manual_for_purchase_request/{purchase_request_id}', 'API\PurchaseRequestMachineManualController@getMachineManualPurchaseRequest'); // }); // Route::group(['prefix' => 'vendor_manual'], function () { // Route::get('/get_vendor_manual_for_purchase_request/{purchase_request_id}', 'API\PurchaseRequestVendorManualController@getVendorManualForPurchaseRequest'); // }); }); }); });