feat: 계좌관리 추가
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/AdminController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/AdminController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/ApiController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/ApiController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/BillController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/BillController.php:Zone.Identifier
Normal file
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/BoardController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/BoardController.php:Zone.Identifier
Normal file
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/CardController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/CardController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/ClientController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/ClientController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/CommonController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/CommonController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/FolderController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/FolderController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/ItemsController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/ItemsController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/LeaveController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/LeaveController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/LoanController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/LoanController.php:Zone.Identifier
Normal file
Binary file not shown.
52
app/Http/Controllers/Api/V1/MaterialController.php
Normal file
52
app/Http/Controllers/Api/V1/MaterialController.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1;
|
||||
|
||||
use App\Helpers\ApiResponse;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\Material\MaterialStoreRequest;
|
||||
use App\Http\Requests\Material\MaterialUpdateRequest;
|
||||
use App\Services\MaterialService;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class MaterialController extends Controller
|
||||
{
|
||||
public function __construct(private MaterialService $service) {}
|
||||
|
||||
public function index(Request $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($request) {
|
||||
return $this->service->getMaterials($request->all());
|
||||
}, __('message.material.fetched'));
|
||||
}
|
||||
|
||||
public function store(MaterialStoreRequest $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($request) {
|
||||
// 동적 필드 지원을 위해 전체 입력값 전달 (Service에서 검증)
|
||||
return $this->service->setMaterial($request->all());
|
||||
}, __('message.material.created'));
|
||||
}
|
||||
|
||||
public function show(int $id)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id) {
|
||||
return $this->service->getMaterial($id);
|
||||
}, __('message.material.fetched'));
|
||||
}
|
||||
|
||||
public function update(MaterialUpdateRequest $request, int $id)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($request, $id) {
|
||||
// 동적 필드 지원을 위해 전체 입력값 전달 (Service에서 검증)
|
||||
return $this->service->updateMaterial($id, $request->all());
|
||||
}, __('message.material.updated'));
|
||||
}
|
||||
|
||||
public function destroy(int $id)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id) {
|
||||
return $this->service->destroyMaterial($id);
|
||||
}, __('message.material.deleted'));
|
||||
}
|
||||
}
|
||||
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/MenuController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/MenuController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/OrderController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/OrderController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/PlanController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/PlanController.php:Zone.Identifier
Normal file
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/PopupController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/PopupController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/PostController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/PostController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
114
app/Http/Controllers/Api/V1/ProductBomItemController.php
Normal file
114
app/Http/Controllers/Api/V1/ProductBomItemController.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1;
|
||||
|
||||
use App\Helpers\ApiResponse;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\ProductBomService;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ProductBomItemController extends Controller
|
||||
{
|
||||
public function __construct(private ProductBomService $service) {}
|
||||
|
||||
// GET /products/{id}/bom/items
|
||||
public function index(int $id, Request $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id, $request) {
|
||||
return $this->service->index($id, $request->all());
|
||||
}, 'BOM 항목 목록');
|
||||
}
|
||||
|
||||
// POST /products/{id}/bom/items/bulk
|
||||
public function bulkUpsert(int $id, Request $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id, $request) {
|
||||
return $this->service->bulkUpsert($id, $request->input('items', []));
|
||||
}, 'BOM 일괄 업서트');
|
||||
}
|
||||
|
||||
// PATCH /products/{id}/bom/items/{item}
|
||||
public function update(int $id, int $item, Request $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id, $item, $request) {
|
||||
return $this->service->update($id, $item, $request->all());
|
||||
}, 'BOM 항목 수정');
|
||||
}
|
||||
|
||||
// DELETE /products/{id}/bom/items/{item}
|
||||
public function destroy(int $id, int $item)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id, $item) {
|
||||
$this->service->destroy($id, $item);
|
||||
|
||||
return 'success';
|
||||
}, 'BOM 항목 삭제');
|
||||
}
|
||||
|
||||
// POST /products/{id}/bom/items/reorder
|
||||
public function reorder(int $id, Request $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id, $request) {
|
||||
$this->service->reorder($id, $request->input('items', []));
|
||||
|
||||
return 'success';
|
||||
}, 'BOM 정렬 변경');
|
||||
}
|
||||
|
||||
// GET /products/{id}/bom/summary
|
||||
public function summary(int $id)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id) {
|
||||
return $this->service->summary($id);
|
||||
}, 'BOM 요약');
|
||||
}
|
||||
|
||||
// GET /products/{id}/bom/validate
|
||||
public function validateBom(int $id)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id) {
|
||||
return $this->service->validateBom($id);
|
||||
}, 'BOM 유효성 검사');
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /api/v1/products/{id}/bom
|
||||
* BOM 구성 저장 (기존 전체 삭제 후 재등록)
|
||||
*/
|
||||
public function replace(Request $request, int $id)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($request, $id) {
|
||||
// 서비스에서 트랜잭션 처리 + 예외는 글로벌 핸들러로
|
||||
return $this->service->replaceBom($id, $request->all());
|
||||
}, __('message.bom.creat'));
|
||||
}
|
||||
|
||||
/** 특정 제품 BOM에서 사용 중인 카테고리 목록 */
|
||||
public function listCategories(int $id)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id) {
|
||||
return $this->service->listCategoriesForProduct($id);
|
||||
}, __('message.bom.fetch'));
|
||||
}
|
||||
|
||||
/** 테넌트 전역 카테고리 추천(히스토리) */
|
||||
public function suggestCategories(Request $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($request) {
|
||||
$q = $request->query('q');
|
||||
$limit = (int) ($request->query('limit', 20));
|
||||
|
||||
return $this->service->listCategoriesForTenant($q, $limit);
|
||||
}, __('message.bom.fetch'));
|
||||
}
|
||||
|
||||
/** Bom Tree */
|
||||
public function tree(Request $request, int $id)
|
||||
{
|
||||
return ApiResponse::handle(
|
||||
function () use ($request, $id) {
|
||||
return $this->service->tree($request, $id);
|
||||
}, __('message.bom.fetch')
|
||||
);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
82
app/Http/Controllers/Api/V1/ProductController.php
Normal file
82
app/Http/Controllers/Api/V1/ProductController.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1;
|
||||
|
||||
use App\Helpers\ApiResponse;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\Product\ProductStoreRequest;
|
||||
use App\Http\Requests\Product\ProductUpdateRequest;
|
||||
use App\Services\ProductService;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ProductController extends Controller
|
||||
{
|
||||
public function __construct(private ProductService $service) {}
|
||||
|
||||
public function getCategory(Request $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($request) {
|
||||
return $this->service->getCategory($request);
|
||||
}, __('message.product.category_fetched'));
|
||||
}
|
||||
|
||||
// GET /products
|
||||
public function index(Request $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($request) {
|
||||
return $this->service->index($request->all());
|
||||
}, __('message.product.fetched'));
|
||||
}
|
||||
|
||||
// POST /products
|
||||
public function store(ProductStoreRequest $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($request) {
|
||||
return $this->service->store($request->validated());
|
||||
}, __('message.product.created'));
|
||||
}
|
||||
|
||||
// GET /products/{id}
|
||||
public function show(int $id)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id) {
|
||||
return $this->service->show($id);
|
||||
}, __('message.product.fetched'));
|
||||
}
|
||||
|
||||
// PATCH /products/{id}
|
||||
public function update(int $id, ProductUpdateRequest $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id, $request) {
|
||||
return $this->service->update($id, $request->validated());
|
||||
}, __('message.product.updated'));
|
||||
}
|
||||
|
||||
// DELETE /products/{id}
|
||||
public function destroy(int $id)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($id) {
|
||||
$this->service->destroy($id);
|
||||
|
||||
return 'success';
|
||||
}, __('message.product.deleted'));
|
||||
}
|
||||
|
||||
// GET /products/search
|
||||
public function search(Request $request)
|
||||
{
|
||||
return ApiResponse::handle(function () use ($request) {
|
||||
return $this->service->search($request->all());
|
||||
}, __('message.product.searched'));
|
||||
}
|
||||
|
||||
// Note: toggle 메서드는 is_active 필드 제거로 인해 비활성화됨
|
||||
// 필요시 attributes JSON이나 별도 필드로 구현
|
||||
// POST /products/{id}/toggle
|
||||
// public function toggle(int $id)
|
||||
// {
|
||||
// return ApiResponse::handle(function () use ($id) {
|
||||
// return $this->service->toggle($id);
|
||||
// }, __('message.product.toggled'));
|
||||
// }
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/QuoteController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/QuoteController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/ReportController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/ReportController.php:Zone.Identifier
Normal file
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/RoleController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/RoleController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/SalaryController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/SalaryController.php:Zone.Identifier
Normal file
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/SaleController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/SaleController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/SiteController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/SiteController.php:Zone.Identifier
Normal file
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/StockController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/StockController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/Http/Controllers/Api/V1/TenantController.php:Zone.Identifier
Normal file
BIN
app/Http/Controllers/Api/V1/TenantController.php:Zone.Identifier
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user