main_sou #9
3
.env
3
.env
@ -2,8 +2,7 @@ APP_NAME=so-manager
|
|||||||
APP_ENV=local
|
APP_ENV=local
|
||||||
APP_KEY=base64:ejLwJbt2bEXY9emPUmsurG+X1hzkjTxQQvq2/FO14RY=
|
APP_KEY=base64:ejLwJbt2bEXY9emPUmsurG+X1hzkjTxQQvq2/FO14RY=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_URL=https://krgm.so-manager-dev.com/
|
APP_URL=https://main-sou.so-manager-dev.com/
|
||||||
|
|
||||||
APP_LOCALE=ja
|
APP_LOCALE=ja
|
||||||
APP_FALLBACK_LOCALE=ja
|
APP_FALLBACK_LOCALE=ja
|
||||||
APP_FAKER_LOCALE=ja_JP
|
APP_FAKER_LOCALE=ja_JP
|
||||||
|
|||||||
20
.gitea/workflows/deploy-preview.yml
Normal file
20
.gitea/workflows/deploy-preview.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: Deploy preview (main_sou)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main_sou"]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: deploy-main_sou
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ["native"]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Deploy to preview (main_sou)
|
||||||
|
env:
|
||||||
|
BRANCH: main_sou
|
||||||
|
run: /usr/local/bin/deploy_branch_simple.sh
|
||||||
@ -1,14 +0,0 @@
|
|||||||
name: Deploy krgm (auto)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: [ "native" ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Deploy to server
|
|
||||||
run: /usr/local/bin/deploy_krgm.sh
|
|
||||||
175
app/Http/Controllers/Admin/PplaceController.php
Normal file
175
app/Http/Controllers/Admin/PplaceController.php
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Admin;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models\Pplace;
|
||||||
|
use App\Models\Ope;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Response;
|
||||||
|
|
||||||
|
class PplaceController extends Controller
|
||||||
|
{
|
||||||
|
public function list(Request $request)
|
||||||
|
{
|
||||||
|
$inputs = [
|
||||||
|
'isExport' => 0,
|
||||||
|
'sort' => $request->input('sort', ''),
|
||||||
|
'sort_type' => $request->input('sort_type', ''),
|
||||||
|
'page' => $request->get('page', 1),
|
||||||
|
];
|
||||||
|
|
||||||
|
$inputs['list'] = Pplace::search($inputs);
|
||||||
|
|
||||||
|
if ($inputs['list']->total() > 0 && $inputs['page'] > $inputs['list']->lastPage()) {
|
||||||
|
return redirect()->route('pplace');
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('admin.Pplace.list', $inputs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function add(Request $request)
|
||||||
|
{
|
||||||
|
$inputs = [
|
||||||
|
'pplace_number' => $request->input('pplace_number'),
|
||||||
|
'pplace_remarks' => $request->input('pplace_remarks'),
|
||||||
|
'operator_id' => $request->input('operator_id'),
|
||||||
|
];
|
||||||
|
|
||||||
|
$inputs['operators'] = Ope::getList(); //
|
||||||
|
|
||||||
|
if ($request->isMethod('POST')) {
|
||||||
|
$validator = Validator::make($inputs, [
|
||||||
|
'pplace_number' => 'required|string|max:255',
|
||||||
|
'pplace_remarks' => 'nullable|string|max:255',
|
||||||
|
'operator_id' => 'nullable|integer',
|
||||||
|
]);
|
||||||
|
|
||||||
|
if (!$validator->fails()) {
|
||||||
|
DB::transaction(function () use ($inputs) {
|
||||||
|
$pplace = new Pplace();
|
||||||
|
$pplace->fill($inputs);
|
||||||
|
$pplace->save();
|
||||||
|
});
|
||||||
|
return redirect()->route('pplace')->with('success', '登録成功');
|
||||||
|
} else {
|
||||||
|
$inputs['errorMsg'] = $this->__buildErrorMessasges($validator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('admin.Pplace.add', $inputs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit(Request $request, $id, $view = '')
|
||||||
|
{
|
||||||
|
|
||||||
|
$record = Pplace::find($id);
|
||||||
|
|
||||||
|
if (!$record) abort(404);
|
||||||
|
|
||||||
|
$data = $record->toArray();
|
||||||
|
$data['operators'] = Ope::getList();
|
||||||
|
|
||||||
|
|
||||||
|
if ($request->isMethod('POST')) {
|
||||||
|
$inputs = $request->all();
|
||||||
|
$validator = Validator::make($inputs, [
|
||||||
|
'pplace_number' => 'required|string|max:255',
|
||||||
|
'pplace_remarks' => 'nullable|string|max:255',
|
||||||
|
'operator_id' => 'nullable|integer',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$data = array_merge($data, $inputs);
|
||||||
|
|
||||||
|
if (!$validator->fails()) {
|
||||||
|
DB::transaction(function () use ($record, $inputs) {
|
||||||
|
$record->fill($inputs);
|
||||||
|
$record->save();
|
||||||
|
});
|
||||||
|
return redirect()->route('pplace')->with('success', '更新成功');
|
||||||
|
} else {
|
||||||
|
$data['errorMsg'] = $this->__buildErrorMessasges($validator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return view($view ?: 'admin.Pplace.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function info(Request $request, $id)
|
||||||
|
{
|
||||||
|
return $this->edit($request, $id, 'admin.Pplace.info');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete(Request $request)
|
||||||
|
{
|
||||||
|
$pk = $request->get('pk');
|
||||||
|
if ($pk && Pplace::destroy($pk)) {
|
||||||
|
return redirect()->route('pplace')->with('success', '削除成功');
|
||||||
|
}
|
||||||
|
return redirect()->route('pplace')->with('error', '削除失敗');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function export()
|
||||||
|
{
|
||||||
|
$headers = [
|
||||||
|
"Content-type" => "text/csv;charset=UTF-8",
|
||||||
|
"Content-Disposition" => "attachment; filename=Pplace.csv",
|
||||||
|
];
|
||||||
|
|
||||||
|
$data = Pplace::all();
|
||||||
|
$columns = ['ID', '番号', '備考', 'オペレータID'];
|
||||||
|
|
||||||
|
$filename = "Pplace.csv";
|
||||||
|
$file = fopen($filename, 'w+');
|
||||||
|
fputcsv($file, $columns);
|
||||||
|
|
||||||
|
foreach ($data as $item) {
|
||||||
|
fputcsv($file, [
|
||||||
|
$item->pplace_id,
|
||||||
|
$item->pplace_number,
|
||||||
|
$item->pplace_remarks,
|
||||||
|
$item->operator_id,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose($file);
|
||||||
|
return Response::download($filename, $filename, $headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function import(Request $request)
|
||||||
|
{
|
||||||
|
$file = $request->file('file');
|
||||||
|
if (!$file) {
|
||||||
|
return redirect()->route('pplace')->with('error', 'CSVファイルを選択してください');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = \App\Utils::csvToArray($file);
|
||||||
|
$record = 0;
|
||||||
|
|
||||||
|
DB::beginTransaction();
|
||||||
|
try {
|
||||||
|
foreach ($data as $key => $row) {
|
||||||
|
$record = $key + 2;
|
||||||
|
if (count($row) < 3) throw new \Exception('列数が不正です');
|
||||||
|
|
||||||
|
Pplace::create([
|
||||||
|
'pplace_number' => $row[0],
|
||||||
|
'pplace_remarks' => $row[1],
|
||||||
|
'operator_id' => $row[2],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
DB::commit();
|
||||||
|
return redirect()->route('pplace')->with('success', 'インポート成功');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
DB::rollBack();
|
||||||
|
return redirect()->route('pplace')->with('error', "行 {$record} : " . $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function __buildErrorMessasges($validator)
|
||||||
|
{
|
||||||
|
return implode("\n", $validator->errors()->all());
|
||||||
|
}
|
||||||
|
}
|
||||||
408
app/Http/Controllers/Admin/RegularContractController.php
Normal file
408
app/Http/Controllers/Admin/RegularContractController.php
Normal file
@ -0,0 +1,408 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Admin;
|
||||||
|
|
||||||
|
use App\Http\Requests\RegularContractRequest;
|
||||||
|
use App\Models\Park;
|
||||||
|
use App\Models\RegularContract;
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Models\Usertype;
|
||||||
|
use App\Utils;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Response;
|
||||||
|
|
||||||
|
class RegularContractController extends Controller
|
||||||
|
{
|
||||||
|
public function list(Request $request)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
$inputs = [
|
||||||
|
'isExport' => 0,
|
||||||
|
'sort' => $request->input('sort', ''),
|
||||||
|
'sort_type' => $request->input('sort_type', ''),
|
||||||
|
'page' => $request->get('page', 1),
|
||||||
|
];
|
||||||
|
$inputs['list'] = RegularContract::search($inputs);
|
||||||
|
//dd($inputs['list']->items());
|
||||||
|
|
||||||
|
// dd($inputs);
|
||||||
|
if ($inputs['list']->total() > 0 && $inputs['page'] > $inputs['list']->lastPage()) {
|
||||||
|
return redirect()->route('regular_contracts');
|
||||||
|
}
|
||||||
|
return view('admin.regular_contracts.list', $inputs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function add(Request $request)
|
||||||
|
{
|
||||||
|
$inputs = [
|
||||||
|
'contract_qr_id' => $request->input('contract_qr_id'), // 定期契約QRID
|
||||||
|
'user_id' => $request->input('user_id'), // 利用者ID
|
||||||
|
'user_categoryid' => $request->input('user_categoryid'), // 利用者分類ID
|
||||||
|
'reserve_id' => $request->input('reserve_id'), // 定期予約ID
|
||||||
|
'park_id' => $request->input('park_id'), // 駐輪場ID
|
||||||
|
'price_parkplaceid' => $request->input('price_parkplaceid'), // 駐輪場所ID
|
||||||
|
'user_securitynum' => $request->input('user_securitynum'), // 防犯登録番号
|
||||||
|
'reserve_date' => $request->input('reserve_date'), // 予約日時
|
||||||
|
'contract_reserve' => $request->input('contract_reserve'), // 予約移行フラグ
|
||||||
|
'contract_created_at' => $request->input('contract_created_at'), // 契約日時
|
||||||
|
'contract_updated_at' => $request->input('contract_updated_at'), // 更新可能日
|
||||||
|
'contract_cancelday' => $request->input('contract_cancelday'), // 解約日時
|
||||||
|
'contract_reduction' => $request->input('contract_reduction'), // 減免措置
|
||||||
|
'contract_periods' => $request->input('contract_periods'), // 有効期間S
|
||||||
|
'contract_periode' => $request->input('contract_periode'), // 有効期間E
|
||||||
|
'contract_taxid' => $request->input('contract_taxid'), // 消費税ID
|
||||||
|
'billing_amount' => $request->input('billing_amount'), // 請求金額
|
||||||
|
'contract_payment_day' => $request->input('contract_payment_day'), // 授受日時
|
||||||
|
'contract_money' => $request->input('contract_money'), // 授受金額
|
||||||
|
'refunds' => $request->input('refunds'), // 解約時返戻金
|
||||||
|
'refunds_comment' => $request->input('refunds_comment'), // 返戻金付随情報
|
||||||
|
'repayment_at' => $request->input('repayment_at'), // 返金日
|
||||||
|
'contact_guid' => $request->input('contact_guid'), // 決済コード
|
||||||
|
'contact_shop_code' => $request->input('contact_shop_code'), // 店舗コード
|
||||||
|
'contract_cvs_class' => $request->input('contract_cvs_class'), // 授受種別
|
||||||
|
'contract_flag' => $request->input('contract_flag'), // 授受フラグ
|
||||||
|
'settlement_transaction_id' => $request->input('settlement_transaction_id'), // 決済トランザクションID
|
||||||
|
'contract_seal_issue' => $request->input('contract_seal_issue'), // シール発行数
|
||||||
|
'seal_reissue_request' => $request->input('seal_reissue_request'), // シール再発行リクエスト
|
||||||
|
'contract_permission' => $request->input('contract_permission'), // シール発行許可
|
||||||
|
'contract_cancel_flag' => $request->input('contract_cancel_flag'), // 解約フラグ
|
||||||
|
'tag_qr_flag' => $request->input('tag_qr_flag'), // タグ/QRフラグ
|
||||||
|
'tag_change_flag' => $request->input('tag_change_flag'), // オペレータータグ変更フラグ
|
||||||
|
'park_position' => $request->input('park_position'), // 駐輪位置番号
|
||||||
|
'ope_id' => $request->input('ope_id'), // オペレータID
|
||||||
|
'contract_manual' => $request->input('contract_manual'), // 手動通知
|
||||||
|
'contract_notice' => $request->input('contract_notice'), // 通知方法
|
||||||
|
'contract_payment_number' => $request->input('contract_payment_number'), // 受付番号
|
||||||
|
'created_at' => $request->input('created_at'),
|
||||||
|
'updated_at' => $request->input('updated_at'),
|
||||||
|
];
|
||||||
|
$dataList = $this->getDataDropList();
|
||||||
|
$inputs = array_merge($inputs, $dataList);
|
||||||
|
if ($request->isMethod('POST')) {
|
||||||
|
$type = false;
|
||||||
|
$validation = new RegularContractRequest();
|
||||||
|
$rules = $validation->rules();
|
||||||
|
if(!empty($inputs['billing_amount']) ){
|
||||||
|
$rules['billing_amount'] = 'numeric|between:0,999999999999.99';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['contract_money']) ){
|
||||||
|
$rules['contract_money'] = 'numeric|between:0,999999999999.99';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['user_aid']) ){
|
||||||
|
$rules['refunds'] ='numeric|between:0,999999999999.99';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['settlement_transaction_id']) ){
|
||||||
|
$rules['settlement_transaction_id'] = 'integer';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['contract_seal_issue']) ){
|
||||||
|
$rules['contract_seal_issue'] = 'integer';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['ope_id']) ){
|
||||||
|
$rules['ope_id'] = 'integer';
|
||||||
|
}
|
||||||
|
$validator = Validator::make($request->all(), $rules, $validation->messages());
|
||||||
|
if (!$validator->fails()) {
|
||||||
|
\DB::transaction(function () use ($inputs, &$type) {
|
||||||
|
$new = new RegularContract();
|
||||||
|
$new->fill($inputs);
|
||||||
|
if ($new->save()) {
|
||||||
|
$type = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
if ($type) {
|
||||||
|
$request->session()->flash('success', __('新しい成功を創造する。'));
|
||||||
|
return redirect()->route('regular_contracts');
|
||||||
|
} else {
|
||||||
|
$request->session()->flash('error', __('新しい作成に失敗しました'));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$inputs['errorMsg'] = $this->__buildErrorMessasges($validator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('admin.regular_contracts.add', $inputs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit(Request $request, $contract_id, $view = '')
|
||||||
|
{
|
||||||
|
$regular_contract = RegularContract::getByPk($contract_id);
|
||||||
|
if (empty($contract_id) || empty($regular_contract)) {
|
||||||
|
abort('404');
|
||||||
|
}
|
||||||
|
$data = $regular_contract->getAttributes();
|
||||||
|
$dataList = $this->getDataDropList();
|
||||||
|
$data = array_merge($data, $dataList);
|
||||||
|
if ($request->isMethod('POST')) {
|
||||||
|
$type = false;
|
||||||
|
$inputs = $request->all();
|
||||||
|
$validation = new RegularContractRequest();
|
||||||
|
$rules = $validation->rules();
|
||||||
|
if(!empty($inputs['billing_amount']) ){
|
||||||
|
$rules['billing_amount'] = 'numeric|between:0,999999999999.99';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['contract_money']) ){
|
||||||
|
$rules['contract_money'] = 'numeric|between:0,999999999999.99';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['user_aid']) ){
|
||||||
|
$rules['refunds'] ='numeric|between:0,999999999999.99';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['settlement_transaction_id']) ){
|
||||||
|
$rules['settlement_transaction_id'] = 'integer';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['contract_seal_issue']) ){
|
||||||
|
$rules['contract_seal_issue'] = 'integer';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['ope_id']) ){
|
||||||
|
$rules['ope_id'] = 'integer';
|
||||||
|
}
|
||||||
|
$validator = Validator::make($inputs, $rules, $validation->messages());
|
||||||
|
$data = array_merge($data, $inputs);
|
||||||
|
if (!$validator->fails()) {
|
||||||
|
\DB::transaction(function () use ($data, &$type, $regular_contract) {
|
||||||
|
$regular_contract->fill($data);
|
||||||
|
$regular_contract->save();
|
||||||
|
$type = true;
|
||||||
|
});
|
||||||
|
if ($type) {
|
||||||
|
$request->session()->flash('success', __('更新に成功しました'));
|
||||||
|
return redirect()->route('regular_contracts');
|
||||||
|
} else {
|
||||||
|
$request->session()->flash('error', __('更新に失敗しました'));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$data['errorMsg'] = $this->__buildErrorMessasges($validator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($view != '') {
|
||||||
|
return view($view, $data);
|
||||||
|
}
|
||||||
|
return view('admin.regular_contracts.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete(Request $request)
|
||||||
|
{
|
||||||
|
$arr_pk = $request->get('pk');
|
||||||
|
if ($arr_pk) {
|
||||||
|
if (RegularContract::deleteByPk($arr_pk)) {
|
||||||
|
return redirect()->route('regular_contracts')->with('success', __("削除が完了しました。"));
|
||||||
|
} else {
|
||||||
|
return redirect()->route('regular_contracts')->with('error', __('削除に失敗しました。'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return redirect()->route('regular_contracts')->with('error', __('削除するユーザーを選択してください。'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function info(Request $request, $contract_id)
|
||||||
|
{
|
||||||
|
return $this->edit($request, $contract_id, 'admin.regular_contracts.info');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDataDropList()
|
||||||
|
{
|
||||||
|
$data['users'] = User::getList();
|
||||||
|
$data['listUserType'] = Usertype::getList();
|
||||||
|
$data['park'] = Park::getList();
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function export(Request $request)
|
||||||
|
{
|
||||||
|
|
||||||
|
$headers = array(
|
||||||
|
"Content-type" => "text/csv;charset=UTF-8",
|
||||||
|
'Content-Encoding: UTF-8',
|
||||||
|
"Content-Disposition" => "attachment; filename=file.csv",
|
||||||
|
"Pragma" => "no-cache",
|
||||||
|
"Cache-Control" => "must-revalidate, post-check=0, pre-check=0",
|
||||||
|
"Expires" => "0"
|
||||||
|
);
|
||||||
|
$inputs = [
|
||||||
|
'isMethodPost' => 0,
|
||||||
|
'isExport' => 1,
|
||||||
|
'sort' => $request->input('sort', ''),
|
||||||
|
'sort_type' => $request->input('sort_type', ''),
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
$dataExport = RegularContract::search($inputs);
|
||||||
|
$columns = array(
|
||||||
|
__('定期契約ID'),
|
||||||
|
__('定期契約QRID'),// 1
|
||||||
|
__('利用者ID'),// 2
|
||||||
|
__('利用者分類ID'),// 3
|
||||||
|
__('定期予約ID'),// 4
|
||||||
|
__('駐輪場ID'),// 5
|
||||||
|
__('駐輪場所ID'),// 6
|
||||||
|
__('防犯登録番号'),// 7
|
||||||
|
__('予約日時'),// 8
|
||||||
|
__('予約移行フラグ'),// 9
|
||||||
|
__('契約日時'),// 10
|
||||||
|
__('更新可能日'),// 11
|
||||||
|
__('解約日時'),// 12
|
||||||
|
__('減免措置'),// 13
|
||||||
|
__('有効期間S'),// 14
|
||||||
|
__('有効期間E'),// 15
|
||||||
|
__('消費税ID'),// 16
|
||||||
|
__('請求金額'),// 17
|
||||||
|
__('授受日時'),// 18
|
||||||
|
__('授受金額'),// 19
|
||||||
|
__('解約時返戻金'),// 20
|
||||||
|
__('返戻金付随情報'),// 21
|
||||||
|
__('返金日'),// 22
|
||||||
|
__('決済コード'),// 23
|
||||||
|
__('店舗コード'),// 24
|
||||||
|
__('授受種別'),// 25
|
||||||
|
__('授受フラグ'),// 26
|
||||||
|
__('決済トランザクションID'),// 27
|
||||||
|
__('シール発行数'),// 28
|
||||||
|
__('シール再発行リクエスト'),// 29
|
||||||
|
__('シール発行許可'),// 30
|
||||||
|
__('解約フラグ'),// 31
|
||||||
|
__('タグ/QRフラグ'),// 32
|
||||||
|
__('オペレータータグ変更フラグ'),// 33
|
||||||
|
__('駐輪位置番号'),// 34
|
||||||
|
__('オペレータID'),// 35
|
||||||
|
__('手動通知'),// 36
|
||||||
|
__('通知方法'),// 37
|
||||||
|
__('受付番号'),// 38
|
||||||
|
);
|
||||||
|
$filename = "定期契約マスタ.csv";
|
||||||
|
$file = fopen($filename, 'w+');
|
||||||
|
fputcsv($file, $columns);
|
||||||
|
foreach ($dataExport as $items) {
|
||||||
|
fputcsv($file, array(
|
||||||
|
$items->contract_id, // 0
|
||||||
|
$items->contract_qr_id, // 1
|
||||||
|
$items->user_id, // 2
|
||||||
|
$items->user_categoryid, // 3
|
||||||
|
$items->reserve_id, // 4
|
||||||
|
$items->park_id, // 5
|
||||||
|
$items->price_parkplaceid, // 6
|
||||||
|
$items->user_securitynum, // 7
|
||||||
|
$items->reserve_date, // 8
|
||||||
|
$items->contract_reserve, // 9
|
||||||
|
$items->contract_created_at, // 10
|
||||||
|
$items->contract_updated_at, // 11
|
||||||
|
$items->contract_cancelday, // 12
|
||||||
|
$items->contract_reduction, // 13
|
||||||
|
$items->contract_periods, // 14
|
||||||
|
$items->contract_periode, // 15
|
||||||
|
$items->contract_taxid, // 16
|
||||||
|
$items->billing_amount, // 17
|
||||||
|
$items->contract_payment_day, // 18
|
||||||
|
$items->contract_money, // 19
|
||||||
|
$items->refunds, // 20
|
||||||
|
$items->refunds_comment, // 21
|
||||||
|
$items->repayment_at, // 22
|
||||||
|
$items->contact_guid, // 23
|
||||||
|
$items->contact_shop_code, // 24
|
||||||
|
$items->contract_cvs_class, // 25
|
||||||
|
$items->contract_flag, // 26
|
||||||
|
$items->settlement_transaction_id, // 27
|
||||||
|
$items->contract_seal_issue, // 28
|
||||||
|
$items->seal_reissue_request, // 29
|
||||||
|
$items->contract_permission, // 30
|
||||||
|
$items->contract_cancel_flag, // 31
|
||||||
|
$items->tag_qr_flag, // 32
|
||||||
|
$items->tag_change_flag, // 33
|
||||||
|
$items->park_position, // 34
|
||||||
|
$items->ope_id, // 35
|
||||||
|
$items->contract_manual, // 36
|
||||||
|
$items->contract_notice, // 37
|
||||||
|
$items->contract_payment_number, // 38
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
fclose($file);
|
||||||
|
return Response::download($filename, $filename, $headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function import(Request $request)
|
||||||
|
{
|
||||||
|
$file = $request->file('file');
|
||||||
|
if (!empty($file)) {
|
||||||
|
$data = Utils::csvToArray($file);
|
||||||
|
$type = 1;
|
||||||
|
$msg = '';
|
||||||
|
$record = 0;
|
||||||
|
DB::beginTransaction();
|
||||||
|
try {
|
||||||
|
RegularContract::query()->delete();
|
||||||
|
$col = 39;
|
||||||
|
foreach ($data as $key => $items) {
|
||||||
|
$record = $key + 2;
|
||||||
|
if (count($items) == $col) {
|
||||||
|
$row = new RegularContract();
|
||||||
|
$row->contract_id = $items[0];
|
||||||
|
$row->contract_qr_id = $items[1];
|
||||||
|
$row->user_id = $items[2];
|
||||||
|
$row->user_categoryid = $items[3];
|
||||||
|
$row->reserve_id = $items[4];
|
||||||
|
$row->park_id = $items[5];
|
||||||
|
$row->price_parkplaceid = $items[6];
|
||||||
|
$row->user_securitynum = $items[7];
|
||||||
|
$row->reserve_date = $items[8];
|
||||||
|
$row->contract_reserve = $items[9];
|
||||||
|
$row->contract_created_at = $items[10];
|
||||||
|
$row->contract_updated_at = $items[11];
|
||||||
|
$row->contract_cancelday = $items[12];
|
||||||
|
$row->contract_reduction = $items[13];
|
||||||
|
$row->contract_periods = $items[14];
|
||||||
|
$row->contract_periode = $items[15];
|
||||||
|
$row->contract_taxid = $items[16];
|
||||||
|
$row->billing_amount = $items[17];
|
||||||
|
$row->contract_payment_day = $items[18];
|
||||||
|
$row->contract_money = $items[19];
|
||||||
|
$row->refunds = $items[20];
|
||||||
|
$row->refunds_comment = $items[21];
|
||||||
|
$row->repayment_at = $items[22];
|
||||||
|
$row->contact_guid = $items[23];
|
||||||
|
$row->contact_shop_code = $items[24];
|
||||||
|
$row->contract_cvs_class = $items[25];
|
||||||
|
$row->contract_flag = $items[26];
|
||||||
|
$row->settlement_transaction_id = $items[27];
|
||||||
|
$row->contract_seal_issue = $items[28];
|
||||||
|
$row->seal_reissue_request = $items[29];
|
||||||
|
$row->contract_permission = $items[30];
|
||||||
|
$row->contract_cancel_flag = $items[31];
|
||||||
|
$row->tag_qr_flag = $items[32];
|
||||||
|
$row->tag_change_flag = $items[33];
|
||||||
|
$row->park_position = $items[34];
|
||||||
|
$row->ope_id = $items[35];
|
||||||
|
$row->contract_manual = $items[36];
|
||||||
|
$row->contract_notice = $items[37];
|
||||||
|
$row->contract_payment_number = $items[38];
|
||||||
|
if (!$row->save()) {
|
||||||
|
$type = 0;
|
||||||
|
$msg = '行:record型が一致しません。';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$type = 0;
|
||||||
|
$msg = '行:record列数が一致しません。';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
dd($e);
|
||||||
|
$msg = '行:record型が一致しません。';
|
||||||
|
$type = 0;
|
||||||
|
}
|
||||||
|
if ($type) {
|
||||||
|
DB::commit();
|
||||||
|
return redirect()->route('regular_contracts')->with('success', __('輸入成功'));
|
||||||
|
} else {
|
||||||
|
DB::rollBack();
|
||||||
|
return redirect()->route('regular_contracts')->with('error', __($msg, ['record' => $record]));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return redirect()->route('regular_contracts')->with('error', __('あなたはcsvファイルを選択していません。'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
496
app/Http/Controllers/Admin/UserController.php
Normal file
496
app/Http/Controllers/Admin/UserController.php
Normal file
@ -0,0 +1,496 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Admin;
|
||||||
|
|
||||||
|
use App\Models\City;
|
||||||
|
use App\Http\Requests\UserRequest;
|
||||||
|
use App\Models\Ope;
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Models\Usertype;
|
||||||
|
use App\Utils;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Response;
|
||||||
|
|
||||||
|
class UserController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the application dashboard.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function list(Request $request)
|
||||||
|
{
|
||||||
|
$inputs = [
|
||||||
|
'isMethodPost' => 0,
|
||||||
|
'isExport' => $request->input('isExport', 0) * 1,
|
||||||
|
'sort' => $request->input('sort', ''),
|
||||||
|
'sort_type' => $request->input('sort_type', ''),
|
||||||
|
'page' => $request->get('page', 1),
|
||||||
|
'user_id' => $request->input('user_id', ''),
|
||||||
|
'member_id' => $request->input('member_id', ''),
|
||||||
|
'user_tag_serial' => $request->input('user_tag_serial', ''),
|
||||||
|
'user_phonetic' => $request->input('user_phonetic', ''),
|
||||||
|
'phone' => $request->input('phone', ''),
|
||||||
|
'crime' => $request->input('crime', ''),
|
||||||
|
'black_list' => $request->input('black_list', ''),
|
||||||
|
'ward_residents' => $request->input('ward_residents', ''),
|
||||||
|
'user_tag_serial_64' => $request->input('user_tag_serial_64', ''),
|
||||||
|
'photo_filename1' => $request->file('photo_filename1'),
|
||||||
|
'photo_filename2' => $request->file('photo_filename2'),
|
||||||
|
];
|
||||||
|
$inputs['isMethodPost'] = $request->isMethod('post');
|
||||||
|
$inputs['list'] = User::search($inputs);
|
||||||
|
if ($inputs['list']->total() > 0 && $inputs['page'] > $inputs['list']->lastPage()) {
|
||||||
|
return redirect()->route('users');
|
||||||
|
}
|
||||||
|
return view('admin.users.list', $inputs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function add(Request $request)
|
||||||
|
{
|
||||||
|
$inputs = [
|
||||||
|
'user_id' => $request->input('user_id', ''),
|
||||||
|
'member_id' => $request->input('member_id', ''),
|
||||||
|
'user_pass' => $request->input('password', ''),
|
||||||
|
'user_manual_regist_flag' => $request->input('user_manual_regist_flag', 0),
|
||||||
|
'user_mailing_flag' => $request->input('user_mailing_flag', 0),
|
||||||
|
'contract_number' => $request->input('contract_number', ''),
|
||||||
|
'user_tag_serial' => $request->input('user_tag_serial', ''),
|
||||||
|
'user_tag_serial_64' => $request->input('user_tag_serial_64', ''),
|
||||||
|
'qr_code' => $request->input('qr_code', ''),
|
||||||
|
'tag_qr_flag' => $request->input('tag_qr_flag', ''),
|
||||||
|
'user_aid' => $request->input('user_aid', ''),
|
||||||
|
'user_park_number' => $request->input('user_park_number', ''),
|
||||||
|
'user_place_qrid' => $request->input('user_place_qrid', ''),
|
||||||
|
'user_categoryid' => $request->input('user_categoryid', ''),
|
||||||
|
'user_name' => $request->input('user_name', ''),
|
||||||
|
'user_phonetic' => $request->input('user_phonetic', ''),
|
||||||
|
'user_gender' => $request->input('user_gender', ''),
|
||||||
|
'user_birthdate' => $request->input('user_birthdate', ''),
|
||||||
|
'user_age' => $request->input('user_age', ''),
|
||||||
|
'ward_residents' => $request->input('ward_residents', ''),
|
||||||
|
'user_mobile' => $request->input('user_mobile', ''),
|
||||||
|
'user_homephone' => $request->input('user_homephone', ''),
|
||||||
|
'user_primemail' => $request->input('user_primemail', ''),
|
||||||
|
'user_submail' => $request->input('user_submail', ''),
|
||||||
|
'user_regident_zip' => $request->input('user_regident_zip', ''),
|
||||||
|
'user_regident_pre' => $request->input('user_regident_pre', ''),
|
||||||
|
'user_regident_city' => $request->input('user_regident_city', ''),
|
||||||
|
'user_regident_add' => $request->input('user_regident_add', ''),
|
||||||
|
'user_relate_zip' => $request->input('user_relate_zip', ''),
|
||||||
|
'user_relate_pre' => $request->input('user_relate_pre', ''),
|
||||||
|
'user_relate_city' => $request->input('user_relate_city', ''),
|
||||||
|
'user_relate_add' => $request->input('user_relate_add', ''),
|
||||||
|
'user_workplace' => $request->input('user_workplace', ''),
|
||||||
|
'user_school' => $request->input('user_school', ''),
|
||||||
|
'user_graduate' => $request->input('user_graduate', ''),
|
||||||
|
'user_reduction' => $request->input('user_reduction', ''),
|
||||||
|
'user_idcard' => $request->input('user_idcard', ''),
|
||||||
|
'user_idcard_chk_flag' => $request->input('user_idcard_chk_flag', 0),
|
||||||
|
'user_chk_day' => $request->input('user_chk_day', ''),
|
||||||
|
'user_chk_opeid' => $request->input('user_chk_opeid', ''),
|
||||||
|
'user_tag_issue' => $request->input('user_tag_issue', ''),
|
||||||
|
'issue_permission' => $request->input('issue_permission', 0),
|
||||||
|
'user_quit_flag' => $request->input('user_quit_flag', 0),
|
||||||
|
'user_quitday' => $request->input('user_quitday', ''),
|
||||||
|
'user_remarks' => $request->input('user_remarks', ''),
|
||||||
|
'photo_filename1' => $request->file('photo_filename1'),
|
||||||
|
'photo_filename2' => $request->file('photo_filename2'),
|
||||||
|
];
|
||||||
|
$dataList = $this->getDataDropList();
|
||||||
|
$inputs = array_merge($inputs, $dataList);
|
||||||
|
|
||||||
|
if ($request->isMethod('POST')) {
|
||||||
|
$type = false;
|
||||||
|
$validation = new UserRequest();
|
||||||
|
$rules = $validation->rules();
|
||||||
|
$rules['user_id'] = $rules['user_id'] . '|unique:user';
|
||||||
|
$rules['password'] = 'required|min:6|confirmed';
|
||||||
|
if(!empty($inputs['user_age']) ){
|
||||||
|
$rules['user_age'] = 'integer';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['user_aid']) ){
|
||||||
|
$rules['user_aid'] = 'integer';
|
||||||
|
}
|
||||||
|
$validator = Validator::make($request->all(), $rules, $validation->messages());
|
||||||
|
if (!$validator->fails()) {
|
||||||
|
if ($request->hasFile('photo_filename1') && $inputs['photo_filename1']->isValid()) {
|
||||||
|
$inputs['image1'] = Utils::uploadFile($inputs['photo_filename1']);
|
||||||
|
} else {
|
||||||
|
$inputs['image1'] = '';
|
||||||
|
}
|
||||||
|
if ($request->hasFile('photo_filename2') && $inputs['photo_filename2']->isValid()) {
|
||||||
|
$inputs['image2'] = Utils::uploadFile($inputs['photo_filename2']);
|
||||||
|
} else {
|
||||||
|
$inputs['image2'] = '';
|
||||||
|
}
|
||||||
|
\DB::transaction(function () use ($inputs, &$type) {
|
||||||
|
$new = new User();
|
||||||
|
$new->fill($inputs);
|
||||||
|
if ($inputs['image1'] && $inputs['image1'] != '') {
|
||||||
|
$new->photo_filename2 = $inputs['image1'];
|
||||||
|
}
|
||||||
|
if ($inputs['image2'] && $inputs['image2'] != '') {
|
||||||
|
$new->photo_filename2 = $inputs['image2'];
|
||||||
|
}
|
||||||
|
if ($new->save()) {
|
||||||
|
$new->user_pass = Utils::getHashPassword($inputs['user_pass'], $new->user_seq);
|
||||||
|
$new->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
$type = true;
|
||||||
|
});
|
||||||
|
if ($type) {
|
||||||
|
$request->session()->flash('success', __('新しい成功を創造する。'));
|
||||||
|
return redirect()->route('users');
|
||||||
|
} else {
|
||||||
|
$request->session()->flash('error', __('新しい作成に失敗しました'));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$inputs['errorMsg'] = $this->__buildErrorMessasges($validator);
|
||||||
|
$data['photo_filename1'] = '';
|
||||||
|
$data['photo_filename2'] = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('admin.users.add', $inputs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit(Request $request, $seq, $view = '')
|
||||||
|
{
|
||||||
|
$user = User::getUserBySeq($seq);
|
||||||
|
if (empty($seq) || empty($user)) {
|
||||||
|
abort('404');
|
||||||
|
}
|
||||||
|
$data = $user->getAttributes();
|
||||||
|
$filename1 = $data['photo_filename1'];
|
||||||
|
$filename2 = $data['photo_filename2'];
|
||||||
|
$dataList = $this->getDataDropList();
|
||||||
|
$data = array_merge($data, $dataList);
|
||||||
|
|
||||||
|
if ($request->isMethod('POST')) {
|
||||||
|
$type = false;
|
||||||
|
$validation = new UserRequest();
|
||||||
|
$inputs = $request->all();
|
||||||
|
$rules = $validation->rules();
|
||||||
|
if (!empty($inputs['password'])) {
|
||||||
|
$rules['password'] = 'required|min:6|confirmed';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['user_age']) ){
|
||||||
|
$rules['user_age'] = 'integer';
|
||||||
|
}
|
||||||
|
if(!empty($inputs['user_aid']) ){
|
||||||
|
$rules['user_aid'] = 'integer';
|
||||||
|
}
|
||||||
|
$validator = Validator::make($inputs, $rules, $validation->messages());
|
||||||
|
$data = array_merge($data, $inputs);
|
||||||
|
|
||||||
|
if (!$validator->fails()) {
|
||||||
|
|
||||||
|
if ($request->hasFile('photo_filename1') && $data['photo_filename1']->isValid()) {
|
||||||
|
$data['image1'] = Utils::uploadFile($data['photo_filename1']);
|
||||||
|
} else {
|
||||||
|
$data['image1'] = '';
|
||||||
|
}
|
||||||
|
if ($request->hasFile('photo_filename2') && $data['photo_filename2']->isValid()) {
|
||||||
|
$data['image2'] = Utils::uploadFile($data['photo_filename2']);
|
||||||
|
} else {
|
||||||
|
$data['image2'] = '';
|
||||||
|
}
|
||||||
|
\DB::transaction(function () use ($data, &$type, $user, $inputs) {
|
||||||
|
$user->fill($data);
|
||||||
|
if (!empty($inputs['password'])) {
|
||||||
|
$user->user_pass = Utils::getHashPassword($data['password'], $user->user_seq);
|
||||||
|
}
|
||||||
|
if ($data['image1'] && $data['image1'] != '') {
|
||||||
|
$user->photo_filename1 = $data['image1'];
|
||||||
|
}
|
||||||
|
if ($data['image2'] && $data['image2'] != '') {
|
||||||
|
$user->photo_filename2 = $data['image2'];
|
||||||
|
}
|
||||||
|
$user->save();
|
||||||
|
$type = true;
|
||||||
|
});
|
||||||
|
if ($type) {
|
||||||
|
$request->session()->flash('success', __('更新に成功しました'));
|
||||||
|
return redirect()->route('users');
|
||||||
|
} else {
|
||||||
|
$request->session()->flash('error', __('更新に失敗しました'));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$data['errorMsg'] = $this->__buildErrorMessasges($validator);
|
||||||
|
$data['photo_filename1'] = $filename1;
|
||||||
|
$data['photo_filename2'] = $filename2;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($view != '') {
|
||||||
|
return view($view, $data);
|
||||||
|
}
|
||||||
|
return view('admin.users.edit', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete(Request $request)
|
||||||
|
{
|
||||||
|
$arr_seq = $request->get('seq');
|
||||||
|
if ($arr_seq) {
|
||||||
|
if (User::deleteUsersBySeq($arr_seq)) {
|
||||||
|
return redirect()->route('users')->with('success', __("削除が完了しました。"));
|
||||||
|
} else {
|
||||||
|
return redirect()->route('users')->with('error', __('削除に失敗しました。'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return redirect()->route('users')->with('error', __('削除するユーザーを選択してください。'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function export(Request $request)
|
||||||
|
{
|
||||||
|
|
||||||
|
$headers = array(
|
||||||
|
"Content-type" => "text/csv;charset=UTF-8",
|
||||||
|
'Content-Encoding: UTF-8',
|
||||||
|
"Content-Disposition" => "attachment; filename=file.csv",
|
||||||
|
"Pragma" => "no-cache",
|
||||||
|
"Cache-Control" => "must-revalidate, post-check=0, pre-check=0",
|
||||||
|
"Expires" => "0"
|
||||||
|
);
|
||||||
|
$inputs = [
|
||||||
|
'isMethodPost' => 0,
|
||||||
|
'isExport' => 1,
|
||||||
|
'sort' => $request->input('sort', ''),
|
||||||
|
'sort_type' => $request->input('sort_type', ''),
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
$dataExport = User::search($inputs);
|
||||||
|
$columns = array(
|
||||||
|
__('利用者連番'),// 0
|
||||||
|
__('利用者ID'),// 1
|
||||||
|
__('会員ID'),// 2
|
||||||
|
__('パスワード'),// 3
|
||||||
|
__('手動登録フラグ'),// 4
|
||||||
|
__('手動登録フラグ'),
|
||||||
|
__('郵送必要フラグ'),// 5
|
||||||
|
__('郵送必要フラグ'),
|
||||||
|
__('旧定期契約番号'),// 6
|
||||||
|
__('タグシリアル'),// 7
|
||||||
|
__('タグシリアル64進'),// 8
|
||||||
|
__('QRコード'),// 9
|
||||||
|
__('タグ/QRフラグ'),// 10
|
||||||
|
__('タグ/QRフラグ'),
|
||||||
|
__('AID'),// 11
|
||||||
|
__('居場所通知用QRID'),// 12
|
||||||
|
__('利用者分類ID'),// 13
|
||||||
|
__('利用者分類'),
|
||||||
|
__('利用者名'),// 14
|
||||||
|
__('フリガナ'),// 15
|
||||||
|
__('性別'),// 16
|
||||||
|
__('生年月日'),// 17
|
||||||
|
__('年齢'),// 18
|
||||||
|
__('携帯電話番号'),// 19
|
||||||
|
__('自宅電話番号'),// 20
|
||||||
|
__('メールアドレス'),// 21
|
||||||
|
__('予備メールアドレス'),// 22
|
||||||
|
__('居住所:郵便番号'),// 23
|
||||||
|
__('居住所:都道府県'),// 24
|
||||||
|
__('居住所:市区群'),// 25
|
||||||
|
__('居住所:住所'),// 26
|
||||||
|
__('関連住所:郵便番号'),// 27
|
||||||
|
__('関連住所:都道府県'),// 28
|
||||||
|
__('関連住所:市区群'),// 29
|
||||||
|
__('関連住所:住所'),// 30
|
||||||
|
__('区民'),// 31
|
||||||
|
__('勤務先名'),// 32
|
||||||
|
__('学校'),// 33
|
||||||
|
__('卒業予定'),// 34
|
||||||
|
__('本人確認書類'),// 35
|
||||||
|
__('本人確認チェック済'),// 36
|
||||||
|
__('本人確認チェック済'),
|
||||||
|
__('本人確認日時'),// 37
|
||||||
|
__('本人確認オペレータID'),// 38
|
||||||
|
__('タグ発行数'),// 39
|
||||||
|
__('タグ発行許可'),// 40
|
||||||
|
__('退会フラグ'),// 41
|
||||||
|
__('退会フラグ'),
|
||||||
|
__('退会日'),// 42
|
||||||
|
__('備考'),// 43
|
||||||
|
);
|
||||||
|
$filename = "利用者マスタ.csv";
|
||||||
|
$file = fopen($filename, 'w+');
|
||||||
|
fputcsv($file, $columns);
|
||||||
|
foreach ($dataExport as $items) {
|
||||||
|
fputcsv($file, array(
|
||||||
|
$items->user_seq, // 0
|
||||||
|
$items->user_id, // 1
|
||||||
|
$items->member_id, // 2
|
||||||
|
'',//TODO パスワード not found in database specs
|
||||||
|
$items->user_manual_regist_flag, // 4
|
||||||
|
$items->user_manual_regist_flag ? __("はい") : __("いいえ"),
|
||||||
|
$items->user_mailing_flag, // 6
|
||||||
|
$items->user_mailing_flag ? __("はい") : __("いいえ"),
|
||||||
|
$items->contract_number, // 8
|
||||||
|
$items->user_tag_serial, // 9
|
||||||
|
$items->user_tag_serial_64, // 10
|
||||||
|
$items->qr_code, // 11
|
||||||
|
$items->tag_qr_flag, // 12
|
||||||
|
$items->tag_qr_flag ? __('QRコード') : __('タグ'),
|
||||||
|
$items->user_aid, // 14
|
||||||
|
$items->user_place_qrid, // 15
|
||||||
|
$items->user_categoryid, // 16
|
||||||
|
$items->getUserType()->print_name,
|
||||||
|
$items->user_name, // 18
|
||||||
|
$items->user_phonetic, // 19
|
||||||
|
$items->user_gender, // 20
|
||||||
|
$items->user_birthdate, // 21
|
||||||
|
$items->user_age, // 22
|
||||||
|
$items->user_mobile, // 23
|
||||||
|
$items->user_homephone, // 24
|
||||||
|
$items->user_primemail, // 25
|
||||||
|
$items->user_submail, // 26
|
||||||
|
$items->user_regident_zip, // 27
|
||||||
|
$items->user_regident_pre, // 28
|
||||||
|
$items->user_regident_city, // 29
|
||||||
|
$items->user_regident_add, // 30
|
||||||
|
$items->user_relate_zip, // 31
|
||||||
|
$items->user_relate_pre, // 32
|
||||||
|
$items->user_relate_city, // 33
|
||||||
|
$items->user_relate_add, // 34
|
||||||
|
$items->ward_residents, // 35
|
||||||
|
$items->user_workplace, // 36
|
||||||
|
$items->user_school, // 37
|
||||||
|
$items->user_graduate, // 38
|
||||||
|
$items->user_idcard, // 39
|
||||||
|
$items->user_idcard_chk_flag, // 40
|
||||||
|
\App\Models\User::USER_ID_CARD_CHK_FLG[$items->user_idcard_chk_flag],
|
||||||
|
$items->user_chk_day, // 42
|
||||||
|
$items->user_chk_opeid, // 43
|
||||||
|
$items->user_tag_issue, // 44
|
||||||
|
$items->issue_permission, // 45
|
||||||
|
$items->user_quit_flag, // 46
|
||||||
|
$items->user_quit_flag ? __("はい") : __("いいえ"),
|
||||||
|
$items->user_quitday, // 48
|
||||||
|
$items->user_remarks, // 49
|
||||||
|
));
|
||||||
|
}
|
||||||
|
fclose($file);
|
||||||
|
return Response::download($filename, $filename, $headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function import(Request $request)
|
||||||
|
{
|
||||||
|
$file = $request->file('file');
|
||||||
|
if (!empty($file)) {
|
||||||
|
$data = Utils::csvToArray($file);
|
||||||
|
$type = 1;
|
||||||
|
$msg = '';
|
||||||
|
$record = 0;
|
||||||
|
DB::beginTransaction();
|
||||||
|
try {
|
||||||
|
User::query()->delete();
|
||||||
|
$col = 50;
|
||||||
|
foreach ($data as $key => $items) {
|
||||||
|
$record = $key + 2;
|
||||||
|
if (count($items) == $col) {
|
||||||
|
$row = new User();
|
||||||
|
$row->user_seq = $items[0];
|
||||||
|
$row->user_id = $items[1];
|
||||||
|
$row->member_id = $items[2];
|
||||||
|
//TODO パスワード not found in database specs_$items[3]
|
||||||
|
$row->user_manual_regist_flag = $items[4];
|
||||||
|
$row->user_mailing_flag = $items[6];
|
||||||
|
$row->contract_number = $items[8];
|
||||||
|
$row->user_tag_serial = $items[9];
|
||||||
|
$row->user_tag_serial_64 = $items[10];
|
||||||
|
$row->qr_code = $items[11];
|
||||||
|
$row->tag_qr_flag = $items[12];
|
||||||
|
$row->user_aid = $items[14];
|
||||||
|
$row->user_place_qrid = $items[15];
|
||||||
|
$row->user_categoryid = $items[16];
|
||||||
|
$row->user_name = $items[18];
|
||||||
|
$row->user_phonetic = $items[19];
|
||||||
|
$row->user_gender = $items[20];
|
||||||
|
$row->user_birthdate = $items[21];
|
||||||
|
$row->user_age = !empty($items[22]) ? $items[22] : null;
|
||||||
|
$row->user_mobile = $items[23];
|
||||||
|
$row->user_homephone = $items[24];
|
||||||
|
$row->user_primemail = $items[25];
|
||||||
|
$row->user_submail = $items[26];
|
||||||
|
$row->user_regident_zip = $items[27];
|
||||||
|
$row->user_regident_pre = $items[28];
|
||||||
|
$row->user_regident_city = $items[29];
|
||||||
|
$row->user_regident_add = $items[30];
|
||||||
|
$row->user_relate_zip = $items[31];
|
||||||
|
$row->user_relate_pre = $items[32];
|
||||||
|
$row->user_relate_city = $items[33];
|
||||||
|
$row->user_relate_add = $items[34];
|
||||||
|
$row->ward_residents = $items[35];
|
||||||
|
$row->user_workplace = $items[36];
|
||||||
|
$row->user_school = $items[37];
|
||||||
|
$row->user_graduate = $items[38];
|
||||||
|
$row->user_idcard = $items[39];
|
||||||
|
$row->user_idcard_chk_flag = $items[40];
|
||||||
|
$row->user_chk_day = $items[42];
|
||||||
|
$row->user_chk_opeid = $items[43];
|
||||||
|
$row->user_tag_issue = $items[44];
|
||||||
|
$row->issue_permission = $items[45];
|
||||||
|
$row->user_quit_flag = $items[46];
|
||||||
|
$row->user_quitday = $items[48];
|
||||||
|
$row->user_remarks = $items[49];
|
||||||
|
if (!$row->save()) {
|
||||||
|
$type = 0;
|
||||||
|
$msg = '行:record型が一致しません。';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$type = 0;
|
||||||
|
$msg = '行:record列数が一致しません。';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$msg = '行:record型が一致しません。';
|
||||||
|
$type = 0;
|
||||||
|
}
|
||||||
|
if ($type) {
|
||||||
|
DB::commit();
|
||||||
|
return redirect()->route('users')->with('success', __('輸入成功'));
|
||||||
|
} else {
|
||||||
|
DB::rollBack();
|
||||||
|
return redirect()->route('users')->with('error', __($msg, ['record' => $record]));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return redirect()->route('users')->with('error', __('あなたはcsvファイルを選択していません。'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function info(Request $request, $seq)
|
||||||
|
{
|
||||||
|
return $this->edit($request, $seq, 'admin.users.info');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDataDropList()
|
||||||
|
{
|
||||||
|
$data['cities'] = City::getList();
|
||||||
|
$data['listUserType'] = Usertype::getList();
|
||||||
|
$data['listOpe'] = Ope::getList();
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* バリデーションエラーメッセージを構築
|
||||||
|
*/
|
||||||
|
private function __buildErrorMessasges($validator)
|
||||||
|
{
|
||||||
|
$messages = [];
|
||||||
|
foreach ($validator->errors()->all() as $message) {
|
||||||
|
$messages[] = $message;
|
||||||
|
}
|
||||||
|
return implode('<br>', $messages);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
38
app/Http/Requests/RegularContractRequest.php
Normal file
38
app/Http/Requests/RegularContractRequest.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class RegularContractRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'contract_cvs_class'=>'max:2',
|
||||||
|
'contract_qr_id'=>'required',
|
||||||
|
'user_id'=>'required|integer',
|
||||||
|
'user_categoryid'=>'required|integer',
|
||||||
|
'reserve_id'=>'required|integer',
|
||||||
|
'park_id'=>'required|integer',
|
||||||
|
'price_parkplaceid'=>'required|integer',
|
||||||
|
|
||||||
|
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
70
app/Http/Requests/UserRequest.php
Normal file
70
app/Http/Requests/UserRequest.php
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class UserRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* ユーザーがこのリクエストを実行する権限があるかどうかを判断
|
||||||
|
*/
|
||||||
|
public function authorize(): bool
|
||||||
|
{
|
||||||
|
return true; // 認証済みユーザーのみアクセス可能
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* リクエストに適用されるバリデーションルール
|
||||||
|
*/
|
||||||
|
public function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'user_id' => 'required|string|max:255',
|
||||||
|
'user_name' => 'required|string|max:255',
|
||||||
|
'user_phonetic' => 'nullable|string|max:255',
|
||||||
|
'user_gender' => 'nullable|string',
|
||||||
|
'user_birthdate' => 'nullable|date',
|
||||||
|
'user_mobile' => 'nullable|string|max:20',
|
||||||
|
'user_homephone' => 'nullable|string|max:20',
|
||||||
|
'user_primemail' => 'nullable|email|max:255',
|
||||||
|
'user_submail' => 'nullable|email|max:255',
|
||||||
|
'user_regident_zip' => 'nullable|string|max:10',
|
||||||
|
'user_regident_pre' => 'nullable|string|max:50',
|
||||||
|
'user_regident_city' => 'nullable|string|max:100',
|
||||||
|
'user_regident_add' => 'nullable|string|max:255',
|
||||||
|
'user_relate_zip' => 'nullable|string|max:10',
|
||||||
|
'user_relate_pre' => 'nullable|string|max:50',
|
||||||
|
'user_relate_city' => 'nullable|string|max:100',
|
||||||
|
'user_relate_add' => 'nullable|string|max:255',
|
||||||
|
'user_workplace' => 'nullable|string|max:255',
|
||||||
|
'user_school' => 'nullable|string|max:255',
|
||||||
|
'user_graduate' => 'nullable|string|max:255',
|
||||||
|
'user_idcard' => 'nullable|string|max:255',
|
||||||
|
'user_remarks' => 'nullable|string',
|
||||||
|
'photo_filename1' => 'nullable|image|mimes:jpeg,png,jpg,gif|max:2048',
|
||||||
|
'photo_filename2' => 'nullable|image|mimes:jpeg,png,jpg,gif|max:2048',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* カスタムバリデーションメッセージ
|
||||||
|
*/
|
||||||
|
public function messages(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'user_id.required' => '利用者IDは必須です。',
|
||||||
|
'user_id.unique' => 'この利用者IDは既に使用されています。',
|
||||||
|
'user_name.required' => '利用者名は必須です。',
|
||||||
|
'user_primemail.email' => '有効なメールアドレスを入力してください。',
|
||||||
|
'user_submail.email' => '有効なメールアドレスを入力してください。',
|
||||||
|
'photo_filename1.image' => '写真ファイル1は画像である必要があります。',
|
||||||
|
'photo_filename1.max' => '写真ファイル1のサイズは2MB以下である必要があります。',
|
||||||
|
'photo_filename2.image' => '写真ファイル2は画像である必要があります。',
|
||||||
|
'photo_filename2.max' => '写真ファイル2のサイズは2MB以下である必要があります。',
|
||||||
|
'password.required' => 'パスワードは必須です。',
|
||||||
|
'password.min' => 'パスワードは6文字以上である必要があります。',
|
||||||
|
'password.confirmed' => 'パスワード確認が一致しません。',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
24
app/Models/City.php
Normal file
24
app/Models/City.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class City extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'city';
|
||||||
|
// プライマリーキーはLaravelのデフォルト('id')を使用
|
||||||
|
public $timestamps = true;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
// 実際のカラム名が不明のため、一旦空にする
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 都市のリストを取得
|
||||||
|
*/
|
||||||
|
public static function getList()
|
||||||
|
{
|
||||||
|
return self::all();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -136,7 +136,7 @@ class Ope extends Authenticatable
|
|||||||
if ($inputs['isExport']) {
|
if ($inputs['isExport']) {
|
||||||
$list = $list->get();
|
$list = $list->get();
|
||||||
} else {
|
} else {
|
||||||
$list = $list->paginate(Utils::item_per_page);
|
$list = $list->paginate(\App\Utils::item_per_page);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $list;
|
return $list;
|
||||||
|
|||||||
@ -4,41 +4,84 @@ namespace App\Models;
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
|
||||||
* 駐輪場モデル - parkテーブル(正式モデル)
|
|
||||||
* 旧UsingStatusParkの責務を置き換え
|
|
||||||
*/
|
|
||||||
class Park extends Model
|
class Park extends Model
|
||||||
{
|
{
|
||||||
protected $table = 'park';
|
protected $table = 'park';
|
||||||
protected $primaryKey = 'park_id';
|
protected $primaryKey = 'park_id';
|
||||||
public $timestamps = true;
|
public $timestamps = true;
|
||||||
|
|
||||||
public const CREATED_AT = 'created_at';
|
/**
|
||||||
public const UPDATED_AT = 'updated_at';
|
* The attributes that are mass assignable.
|
||||||
|
*
|
||||||
|
* @var list<string>
|
||||||
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'park_name',
|
'park_name',
|
||||||
'park_ruby',
|
'park_address',
|
||||||
'park_syllabary',
|
'park_phone',
|
||||||
'park_adrs',
|
'park_description',
|
||||||
'park_close_flag',
|
'park_status',
|
||||||
'park_day',
|
'park_capacity',
|
||||||
'alert_flag',
|
'park_price',
|
||||||
'print_number',
|
'park_operating_hours',
|
||||||
'keep_alive',
|
|
||||||
'city_id',
|
|
||||||
'operator_id',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 料金設定との関連付け
|
* 駐車場検索
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
||||||
*/
|
*/
|
||||||
public function prices()
|
public static function search($inputs)
|
||||||
{
|
{
|
||||||
return $this->hasMany(PriceA::class, 'park_id', 'park_id');
|
$query = self::query();
|
||||||
|
|
||||||
|
// 検索条件の適用
|
||||||
|
if (!empty($inputs['park_name'])) {
|
||||||
|
$query->where('park_name', 'like', '%' . $inputs['park_name'] . '%');
|
||||||
|
}
|
||||||
|
if (!empty($inputs['park_address'])) {
|
||||||
|
$query->where('park_address', 'like', '%' . $inputs['park_address'] . '%');
|
||||||
|
}
|
||||||
|
if (isset($inputs['park_status']) && $inputs['park_status'] !== '') {
|
||||||
|
$query->where('park_status', $inputs['park_status']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ソート
|
||||||
|
if (!empty($inputs['sort'])) {
|
||||||
|
$sortType = !empty($inputs['sort_type']) ? $inputs['sort_type'] : 'asc';
|
||||||
|
$query->orderBy($inputs['sort'], $sortType);
|
||||||
|
} else {
|
||||||
|
$query->orderBy('park_id', 'desc');
|
||||||
|
}
|
||||||
|
|
||||||
|
// エクスポート用の場合はページネーションしない
|
||||||
|
if (!empty($inputs['isExport'])) {
|
||||||
|
return $query->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ページネーション(Utilsクラスの定数を使用)
|
||||||
|
return $query->paginate(\App\Utils::item_per_page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IDで駐車場を取得
|
||||||
|
*/
|
||||||
|
public static function getParkById($id)
|
||||||
|
{
|
||||||
|
return self::find($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 駐車場リストを取得(ドロップダウン用)
|
||||||
|
*/
|
||||||
|
public static function getList()
|
||||||
|
{
|
||||||
|
return self::pluck('park_name', 'park_id')->toArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定期契約とのリレーション
|
||||||
|
*/
|
||||||
|
public function regularContracts()
|
||||||
|
{
|
||||||
|
return $this->hasMany(RegularContract::class, 'park_id', 'park_id');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
80
app/Models/Pplace.php
Normal file
80
app/Models/Pplace.php
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use App\Utils;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Pplace extends Model
|
||||||
|
{
|
||||||
|
const CREATED_AT = 'created_at';
|
||||||
|
const UPDATED_AT = 'updated_at';
|
||||||
|
const PERPAGE = 50;
|
||||||
|
|
||||||
|
protected $table = 'pplace';
|
||||||
|
protected $primaryKey = 'pplace_id';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'pplace_number',
|
||||||
|
'pplace_remarks',
|
||||||
|
'operator_id'
|
||||||
|
];
|
||||||
|
/*
|
||||||
|
public static function boot()
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
self::creating(function (Pplace $model) {
|
||||||
|
if (Auth::check()) {
|
||||||
|
$model->operator_id = Auth::user()->ope_id;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
*
|
||||||
|
/**
|
||||||
|
* 一覧検索・ソート処理
|
||||||
|
*/
|
||||||
|
public static function search($inputs)
|
||||||
|
{
|
||||||
|
$list = self::query();
|
||||||
|
|
||||||
|
if ($inputs['isMethodPost'] ?? false) {
|
||||||
|
// ここで条件検索処理を追加可能(例: $list->where(...);)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 並び順
|
||||||
|
if (!empty($inputs['sort'])) {
|
||||||
|
$list->orderBy($inputs['sort'], $inputs['sort_type'] ?? 'asc');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($inputs['isExport'] ?? false) {
|
||||||
|
return $list->get();
|
||||||
|
} else {
|
||||||
|
return $list->paginate(Utils::item_per_page);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主キーで取得
|
||||||
|
*/
|
||||||
|
public static function getByPk($pk)
|
||||||
|
{
|
||||||
|
return self::find($pk);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主キー配列で一括削除
|
||||||
|
*/
|
||||||
|
public static function deleteByPk($arr)
|
||||||
|
{
|
||||||
|
return self::whereIn('pplace_id', $arr)->delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 選択リスト取得用(フォーム等)
|
||||||
|
*/
|
||||||
|
public static function getList()
|
||||||
|
{
|
||||||
|
return self::pluck('pplace_number', 'pplace_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,18 +4,10 @@ namespace App\Models;
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
|
||||||
* 定期契約モデル - regular_contractテーブル(正式モデル)
|
|
||||||
* 旧UsingStatusContractの責務を置き換え
|
|
||||||
*/
|
|
||||||
class RegularContract extends Model
|
class RegularContract extends Model
|
||||||
{
|
{
|
||||||
protected $table = 'regular_contract';
|
protected $table = 'regular_contract';
|
||||||
protected $primaryKey = 'contract_id';
|
protected $primaryKey = 'contract_id';
|
||||||
public $timestamps = true;
|
|
||||||
|
|
||||||
public const CREATED_AT = 'created_at';
|
|
||||||
public const UPDATED_AT = 'updated_at';
|
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'contract_qr_id',
|
'contract_qr_id',
|
||||||
@ -33,8 +25,6 @@ class RegularContract extends Model
|
|||||||
'contract_reduction',
|
'contract_reduction',
|
||||||
'contract_periods',
|
'contract_periods',
|
||||||
'contract_periode',
|
'contract_periode',
|
||||||
'enable_months',
|
|
||||||
'printable_date',
|
|
||||||
'contract_taxid',
|
'contract_taxid',
|
||||||
'billing_amount',
|
'billing_amount',
|
||||||
'contract_payment_day',
|
'contract_payment_day',
|
||||||
@ -49,10 +39,8 @@ class RegularContract extends Model
|
|||||||
'settlement_transaction_id',
|
'settlement_transaction_id',
|
||||||
'contract_seal_issue',
|
'contract_seal_issue',
|
||||||
'seal_reissue_request',
|
'seal_reissue_request',
|
||||||
'update_flag',
|
|
||||||
'contract_permission',
|
'contract_permission',
|
||||||
'contract_cancel_flag',
|
'contract_cancel_flag',
|
||||||
'800m_flag',
|
|
||||||
'tag_qr_flag',
|
'tag_qr_flag',
|
||||||
'tag_change_flag',
|
'tag_change_flag',
|
||||||
'park_position',
|
'park_position',
|
||||||
@ -60,15 +48,61 @@ class RegularContract extends Model
|
|||||||
'contract_manual',
|
'contract_manual',
|
||||||
'contract_notice',
|
'contract_notice',
|
||||||
'contract_payment_number',
|
'contract_payment_number',
|
||||||
|
'created_at',
|
||||||
|
'updated_at'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
public static function search($inputs)
|
||||||
* 料金設定
|
|
||||||
*/
|
|
||||||
public function price()
|
|
||||||
{
|
{
|
||||||
return $this->belongsTo(PriceA::class, 'price_parkplaceid', 'price_parkplaceid');
|
$list = self::query();
|
||||||
|
// Sort
|
||||||
|
if ($inputs['sort']) {
|
||||||
|
$list->orderBy($inputs['sort'], $inputs['sort_type']);
|
||||||
|
}
|
||||||
|
if ($inputs['isExport']){
|
||||||
|
$list = $list->get();
|
||||||
|
}else{
|
||||||
|
$list = $list->paginate(\App\Utils::item_per_page); // Utilsクラスの定数を使用
|
||||||
|
}
|
||||||
|
return $list;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
public static function getByPk($pk)
|
||||||
|
{
|
||||||
|
return self::find($pk);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function deleteByPk($arr)
|
||||||
|
{
|
||||||
|
return self::whereIn('contract_id', $arr)->delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO 定期契約ID not found in database specs
|
||||||
|
|
||||||
|
//TODO 解約/契約不可フラグ not found in database specs
|
||||||
|
public function userName()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\User::class,'user_id','user_seq')->first();
|
||||||
|
}
|
||||||
|
public function getUserType()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\Usertype::class,'user_categoryid','user_categoryid')->first();
|
||||||
|
}
|
||||||
|
public function getPark()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\Park::class,'park_id','park_id')->first();
|
||||||
|
}
|
||||||
|
public function getPrice()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\Price::class,'price_parkplaceid','price_parkplaceid')->first();
|
||||||
|
}
|
||||||
|
// public function getSettlement()
|
||||||
|
// {
|
||||||
|
// return $this->belongsTo(SettlementTransaction::class,'settlement_transaction_id','settlement_transaction_id')->first();
|
||||||
|
// }
|
||||||
|
|
||||||
|
public function getOpe()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\Ope::class,'ope_id','ope_id')->first();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,25 +2,90 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
|
|
||||||
class User extends Authenticatable
|
class User extends Model
|
||||||
{
|
{
|
||||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||||
use HasFactory, Notifiable;
|
use HasFactory, Notifiable;
|
||||||
|
|
||||||
|
protected $table = 'user';
|
||||||
|
protected $primaryKey = 'user_seq';
|
||||||
|
public $timestamps = true;
|
||||||
|
|
||||||
|
// 本人確認チェックフラグの定数
|
||||||
|
const USER_ID_CARD_CHK_FLG = [
|
||||||
|
0 => '未確認',
|
||||||
|
1 => '確認済み'
|
||||||
|
];
|
||||||
|
|
||||||
|
// 身分証明書種別の定数
|
||||||
|
const USER_IDCARD = [
|
||||||
|
'運転免許証' => '運転免許証',
|
||||||
|
'健康保険証' => '健康保険証',
|
||||||
|
'パスポート' => 'パスポート',
|
||||||
|
'学生証' => '学生証',
|
||||||
|
'その他' => 'その他'
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
*
|
*
|
||||||
* @var list<string>
|
* @var list<string>
|
||||||
*/
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name',
|
'user_id',
|
||||||
'email',
|
'member_id',
|
||||||
'password',
|
'user_pass',
|
||||||
|
'user_manual_regist_flag',
|
||||||
|
'user_mailing_flag',
|
||||||
|
'contract_number',
|
||||||
|
'user_tag_serial',
|
||||||
|
'user_tag_serial_64',
|
||||||
|
'qr_code',
|
||||||
|
'tag_qr_flag',
|
||||||
|
'user_aid',
|
||||||
|
'user_park_number',
|
||||||
|
'user_place_qrid',
|
||||||
|
'user_categoryid',
|
||||||
|
'user_name',
|
||||||
|
'user_phonetic',
|
||||||
|
'user_gender',
|
||||||
|
'user_birthdate',
|
||||||
|
'user_age',
|
||||||
|
'ward_residents',
|
||||||
|
'user_mobile',
|
||||||
|
'user_homephone',
|
||||||
|
'user_primemail',
|
||||||
|
'user_submail',
|
||||||
|
'user_regident_zip',
|
||||||
|
'user_regident_pre',
|
||||||
|
'user_regident_city',
|
||||||
|
'user_regident_add',
|
||||||
|
'user_relate_zip',
|
||||||
|
'user_relate_pre',
|
||||||
|
'user_relate_city',
|
||||||
|
'user_relate_add',
|
||||||
|
'user_workplace',
|
||||||
|
'user_school',
|
||||||
|
'user_graduate',
|
||||||
|
'user_reduction',
|
||||||
|
'user_idcard',
|
||||||
|
'user_idcard_chk_flag',
|
||||||
|
'user_chk_day',
|
||||||
|
'user_chk_opeid',
|
||||||
|
'user_tag_issue',
|
||||||
|
'issue_permission',
|
||||||
|
'user_quit_flag',
|
||||||
|
'user_quitday',
|
||||||
|
'user_remarks',
|
||||||
|
'photo_filename1',
|
||||||
|
'photo_filename2',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,7 +94,7 @@ class User extends Authenticatable
|
|||||||
* @var list<string>
|
* @var list<string>
|
||||||
*/
|
*/
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
'password',
|
'user_pass',
|
||||||
'remember_token',
|
'remember_token',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -42,7 +107,106 @@ class User extends Authenticatable
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'email_verified_at' => 'datetime',
|
'email_verified_at' => 'datetime',
|
||||||
'password' => 'hashed',
|
'user_birthdate' => 'date',
|
||||||
|
'user_chk_day' => 'datetime',
|
||||||
|
'user_quitday' => 'date',
|
||||||
|
'user_manual_regist_flag' => 'boolean',
|
||||||
|
'user_mailing_flag' => 'boolean',
|
||||||
|
'tag_qr_flag' => 'boolean',
|
||||||
|
'user_idcard_chk_flag' => 'boolean',
|
||||||
|
'issue_permission' => 'boolean',
|
||||||
|
'user_quit_flag' => 'boolean',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ユーザー検索
|
||||||
|
*/
|
||||||
|
public static function search($inputs)
|
||||||
|
{
|
||||||
|
$query = self::query();
|
||||||
|
|
||||||
|
// 検索条件の適用
|
||||||
|
if (!empty($inputs['user_id'])) {
|
||||||
|
$query->where('user_id', 'like', '%' . $inputs['user_id'] . '%');
|
||||||
|
}
|
||||||
|
if (!empty($inputs['member_id'])) {
|
||||||
|
$query->where('member_id', 'like', '%' . $inputs['member_id'] . '%');
|
||||||
|
}
|
||||||
|
if (!empty($inputs['user_tag_serial'])) {
|
||||||
|
$query->where('user_tag_serial', 'like', '%' . $inputs['user_tag_serial'] . '%');
|
||||||
|
}
|
||||||
|
if (!empty($inputs['user_phonetic'])) {
|
||||||
|
$query->where('user_phonetic', 'like', '%' . $inputs['user_phonetic'] . '%');
|
||||||
|
}
|
||||||
|
if (!empty($inputs['phone'])) {
|
||||||
|
$query->where(function($q) use ($inputs) {
|
||||||
|
$q->where('user_mobile', 'like', '%' . $inputs['phone'] . '%')
|
||||||
|
->orWhere('user_homephone', 'like', '%' . $inputs['phone'] . '%');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (isset($inputs['black_list']) && $inputs['black_list'] !== '') {
|
||||||
|
$query->where('user_quit_flag', $inputs['black_list']);
|
||||||
|
}
|
||||||
|
if (isset($inputs['ward_residents']) && $inputs['ward_residents'] !== '') {
|
||||||
|
$query->where('ward_residents', $inputs['ward_residents']);
|
||||||
|
}
|
||||||
|
if (!empty($inputs['user_tag_serial_64'])) {
|
||||||
|
$query->where('user_tag_serial_64', 'like', '%' . $inputs['user_tag_serial_64'] . '%');
|
||||||
|
}
|
||||||
|
|
||||||
|
// ソート
|
||||||
|
if (!empty($inputs['sort'])) {
|
||||||
|
$sortType = !empty($inputs['sort_type']) ? $inputs['sort_type'] : 'asc';
|
||||||
|
$query->orderBy($inputs['sort'], $sortType);
|
||||||
|
} else {
|
||||||
|
$query->orderBy('user_seq', 'desc');
|
||||||
|
}
|
||||||
|
|
||||||
|
// エクスポート用の場合はページネーションしない
|
||||||
|
if (!empty($inputs['isExport'])) {
|
||||||
|
return $query->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ページネーション(Utilsクラスの定数を使用)
|
||||||
|
return $query->paginate(\App\Utils::item_per_page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* シーケンスでユーザーを取得
|
||||||
|
*/
|
||||||
|
public static function getUserBySeq($seq)
|
||||||
|
{
|
||||||
|
return self::where('user_seq', $seq)->first();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* シーケンス配列でユーザーを削除
|
||||||
|
*/
|
||||||
|
public static function deleteUsersBySeq($seqArray)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return self::whereIn('user_seq', $seqArray)->delete();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ユーザータイプとのリレーション
|
||||||
|
*/
|
||||||
|
public function getUserType()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Usertype::class, 'user_categoryid', 'id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getList()
|
||||||
|
{
|
||||||
|
return self::pluck('user_name', 'user_seq');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getUserPhone()
|
||||||
|
{
|
||||||
|
return self::select('user_seq', 'user_name', 'user_mobile', 'user_homephone')->get();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
24
app/Models/Usertype.php
Normal file
24
app/Models/Usertype.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Usertype extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'usertype';
|
||||||
|
// プライマリーキーはLaravelのデフォルト('id')を使用
|
||||||
|
public $timestamps = true;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
// 実際のカラム名が不明のため、一旦空にする
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ユーザータイプのリストを取得
|
||||||
|
*/
|
||||||
|
public static function getList()
|
||||||
|
{
|
||||||
|
return self::all();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -78,7 +78,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'locale' => env('APP_LOCALE', 'en'),
|
'locale' => env('APP_LOCALE', 'ja'),
|
||||||
|
|
||||||
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
|
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
|
||||||
|
|
||||||
|
|||||||
1100
public/assets/css/app.css
Normal file
1100
public/assets/css/app.css
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo 111111111111111111111111111111;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|||||||
1575
public/js/app.js
Normal file
1575
public/js/app.js
Normal file
File diff suppressed because it is too large
Load Diff
86
resources/views/admin/pplace/_form.blade.php
Normal file
86
resources/views/admin/pplace/_form.blade.php
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
@if(Session::has('success'))
|
||||||
|
<div class="alert alert-success alert-dismissible" role="alert">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
{{ Session::get('success') }}
|
||||||
|
</div>
|
||||||
|
@elseif(Session::has('error'))
|
||||||
|
<div class="alert alert-danger alert-dismissible">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
|
||||||
|
{!! Session::get('error') !!}
|
||||||
|
</div>
|
||||||
|
@elseif(isset($errorMsg))
|
||||||
|
<div class="alert alert-danger alert-dismissible">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
|
||||||
|
{!! $errorMsg !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="card-header">
|
||||||
|
@if($isInfo)
|
||||||
|
<a href="{{ route('pplace_add') }}" class="btn btn-lg btn-success">{{ __('登録') }}</a>
|
||||||
|
<a href="{{ route('pplace_edit', ['id' => $pplace_id]) }}" class="btn btn-lg btn-danger">{{ __('編集') }}</a>
|
||||||
|
@else
|
||||||
|
<button type="submit" class="btn btn-lg btn-danger register">{{ __('保存') }}</button>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
{{-- 駐輪車室ID --}}
|
||||||
|
@if($isInfo || $isEdit)
|
||||||
|
<div class="form-group col-3">
|
||||||
|
<label>{{ __('駐輪車室ID') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-9">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" value="{{ $pplace_id ?? '' }}" placeholder="{{ __('駐輪車室ID') }}"
|
||||||
|
name="pplace_id" class="form-control form-control-lg" readonly />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- 番号 --}}
|
||||||
|
<div class="form-group col-3">
|
||||||
|
<label @if(!$isInfo) class="required" @endif>{{ __('駐輪車室番号') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-9">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" value="{{ $pplace_number ?? '' }}" placeholder="{{ __('駐輪車室番号') }}"
|
||||||
|
name="pplace_number" class="form-control form-control-lg" @if($isInfo) readonly @endif />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- 備考 --}}
|
||||||
|
<div class="form-group col-3">
|
||||||
|
<label>{{ __('備考') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-9">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" value="{{ $pplace_remarks ?? '' }}" placeholder="{{ __('備考') }}"
|
||||||
|
name="pplace_remarks" class="form-control form-control-lg" @if($isInfo) readonly @endif />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- オペレーター --}}
|
||||||
|
<div class="form-group col-3">
|
||||||
|
<label>{{ __('更新オペレータID') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-9">
|
||||||
|
<select name="operator_id" class="form-control form-control-lg" @if($isInfo) disabled @endif>
|
||||||
|
<option value="">{{ __('選択してください') }}</option>
|
||||||
|
@foreach($operators ?? [] as $id => $name)
|
||||||
|
<option value="{{ $id }}" @if(($operator_id ?? '') == $id) selected @endif>{{ $name }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if($isInfo)
|
||||||
|
<a href="{{ route('pplace_add') }}" class="btn btn-lg btn-success">{{ __('登録') }}</a>
|
||||||
|
<a href="{{ route('pplace_edit', ['id' => $pplace_id]) }}" class="btn btn-lg btn-danger">{{ __('編集') }}</a>
|
||||||
|
@else
|
||||||
|
<button type="submit" class="btn btn-lg btn-danger register">{{ __('保存') }}</button>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
47
resources/views/admin/pplace/add.blade.php
Normal file
47
resources/views/admin/pplace/add.blade.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('title', '[東京都|〇〇駐輪場] 駐輪車室マスタ')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<div class="content-header">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<h1 class="m-0 text-dark">[東京都|〇〇駐輪場] 駐輪車室マスタ</h1>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<ol class="breadcrumb float-sm-right text-sm">
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||||
|
<li class="breadcrumb-item">駐輪車室マスタ</li>
|
||||||
|
<li class="breadcrumb-item active">新規登録</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.content-header -->
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<form method="post" action="{{ route('pplace_add') }}" enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
|
@include('admin.pplace._form', ['isEdit' => 0, 'isInfo' => 0])
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-fluid mb20">
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10">{{ __('削除') }}</button>
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10">{{ __('インポート') }}</button>
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10">{{ __('CSV出力') }}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
|
@endsection
|
||||||
47
resources/views/admin/pplace/edit.blade.php
Normal file
47
resources/views/admin/pplace/edit.blade.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('title', '[東京都|〇〇駐輪場] 駐輪車室マスタ')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<div class="content-header">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<h1 class="m-0 text-dark">[東京都|〇〇駐輪場] 駐輪車室マスタ</h1>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<ol class="breadcrumb float-sm-right text-sm">
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||||
|
<li class="breadcrumb-item">駐輪車室マスタ</li>
|
||||||
|
<li class="breadcrumb-item active">編集</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.content-header -->
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<form method="post" action="{{ route('pplace_edit', ['id' => $pplace_id]) }}" enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
|
@include('admin.pplace._form', ['isEdit' => 1, 'isInfo' => 0])
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-fluid mb20">
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10">{{ __('削除') }}</button>
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10">{{ __('インポート') }}</button>
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10">{{ __('CSV出力') }}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
|
@endsection
|
||||||
46
resources/views/admin/pplace/info.blade.php
Normal file
46
resources/views/admin/pplace/info.blade.php
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('title', '[東京都|〇〇駐輪場] 駐輪車室マスタ')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<div class="content-header">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<h1 class="m-0 text-dark">[東京都|〇〇駐輪場] 駐輪車室マスタ</h1>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<ol class="breadcrumb float-sm-right text-sm">
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('home') }}">XX様info(ホーム)</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||||
|
<li class="breadcrumb-item">駐輪車室マスタ</li>
|
||||||
|
<li class="breadcrumb-item active">詳細</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<form method="post" action="{{ route('pplace_info', ['id' => $pplace_id]) }}" enctype="multipart/form-data">
|
||||||
|
@csrf
|
||||||
|
@include('admin.pplace._form', ['isEdit' => 0, 'isInfo' => 1])
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-fluid mb20">
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10">{{ __('削除') }}</button>
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10">{{ __('インポート') }}</button>
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10">{{ __('CSV出力') }}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
@endsection
|
||||||
117
resources/views/admin/pplace/list.blade.php
Normal file
117
resources/views/admin/pplace/list.blade.php
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('title', '[東京都|〇〇駐輪場] 駐輪車室マスタ')
|
||||||
|
@section('content')
|
||||||
|
<div class="content-header">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<h1 class="m-0 text-dark">{{__('駐輪車室マスタ')}}</h1>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<ol class="breadcrumb float-sm-right text-sm">
|
||||||
|
<li class="breadcrumb-item"><a href="{{route('home')}}">XX様info(ホーム)</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript: void(0);">[東京都|〇〇駐輪場]</a></li>
|
||||||
|
<li class="breadcrumb-item active">{{__('駐輪車室マスタ')}}</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<form action="{{route('pplace')}}" method='post' id='list-form'>
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" value="{{$sort}}" name="sort" id="sort">
|
||||||
|
<input type="hidden" value="{{$sort_type}}" name="sort_type" id="sort_type">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="container-fluid mb20">
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10" name="delete" id="delete">{{__('削除')}}</button>
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10" name="import_csv" id="import_csv" action="{{route('pplace_import')}}">{{__('インポート')}}</button>
|
||||||
|
<button type="submit" class="btn btn-sm btn-default mr10" name="export_csv" id="export_csv" action="{{route('pplace_export')}}">{{__('CSV出力')}}</button>
|
||||||
|
{{ $list->appends(['sort' => $sort,'sort_type'=>$sort_type])->links('pagination') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form col-lg-12">
|
||||||
|
@if(Session::has('success'))
|
||||||
|
<div class="alert alert-success alert-dismissible" role="alert">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
{{ Session::get('success') }}
|
||||||
|
</div>
|
||||||
|
@elseif(Session::has('error'))
|
||||||
|
<div class="alert alert-danger alert-dismissible">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
|
||||||
|
{!! Session::get('error') !!}
|
||||||
|
</div>
|
||||||
|
@elseif(isset($errorMsg))
|
||||||
|
<div class="alert alert-danger alert-dismissible">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
|
||||||
|
{!! $errorMsg !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-12 row sample03-wrapper no_padding_right mb20">
|
||||||
|
<div class="col-xl-2 col-lg-2 col-md-2 col-sm-3 col-xs-3 table_left">
|
||||||
|
<form action="{{route('pplace_delete')}}" method="post" id="form_delete">
|
||||||
|
@csrf
|
||||||
|
<table class="table dataTable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><input type="checkbox" class="minimal m-0" id="checkbox_all"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($list as $item)
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" class="minimal m-0 checkbox" value="{{$item->pplace_id}}" name="pk[]">
|
||||||
|
<div class="btn_action">
|
||||||
|
<a href="{{route('pplace_info', ['id' => $item->pplace_id])}}" class="btn btn-sm btn-default ml10">{{__('編集')}}</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-10 col-xl-10 col-md-10 col-sm-9 col-xs-9 table_right no_padding_right">
|
||||||
|
<div class="scroll">
|
||||||
|
<table class="table dataTable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="sorting @if($sort=='pplace_id'){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif" sort="pplace_id">
|
||||||
|
<span>{{__('ID')}}</span>
|
||||||
|
</th>
|
||||||
|
<th class="sorting @if($sort=='pplace_number'){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif" sort="pplace_number">
|
||||||
|
<span>{{__('番号')}}</span>
|
||||||
|
</th>
|
||||||
|
<th class="sorting @if($sort=='pplace_remarks'){{$sort_type == 'asc'?'sorting_asc':'sorting_desc'}}@endif" sort="pplace_remarks">
|
||||||
|
<span>{{__('備考')}}</span>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($list as $item)
|
||||||
|
<tr>
|
||||||
|
<td class='sm-item text-left'><span>{{mb_substr($item->pplace_id, 0, 10)}}</span></td>
|
||||||
|
<td class='sm-item text-left'><span>{{mb_substr($item->pplace_number, 0, 20)}}</span></td>
|
||||||
|
<td class='sm-item text-left'><span>{{mb_substr($item->pplace_remarks, 0, 20)}}</span></td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
@endsection
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" href="{{ asset('assets/css/style.css') }}">
|
<link rel="stylesheet" href="{{ asset('assets/css/style.css') }}">
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
<link href="{{ asset('assets/css/app.css') }}" rel="stylesheet">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body class="hold-transition sidebar-mini">
|
<body class="hold-transition sidebar-mini">
|
||||||
@ -247,61 +247,18 @@
|
|||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
<ul class="nav nav-treeview">
|
<ul class="nav nav-treeview">
|
||||||
{{--
|
|
||||||
Laravel 12移行時の定期駐輪管理メニュー項目
|
|
||||||
実装完了済み:区画別利用率状況
|
|
||||||
--}}
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('using_status') }}" class="nav-link @if(request()->routeIs('using_status*')) active @endif">
|
<a href="./example.html" class="nav-link">
|
||||||
<i class="fa fa-circle-o nav-icon"></i>
|
<i class="fa fa-circle-o nav-icon"></i>
|
||||||
<p>区画別利用率状況</p>
|
<p>下層メニュー1</p>
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{--
|
|
||||||
Laravel 12移行時に一時的にコメントアウト:他の機能は順次実装予定
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('contractor') }}" class="nav-link @if(request()->routeIs('contractor*')) active @endif">
|
|
||||||
<i class="fa fa-circle-o nav-icon"></i>
|
|
||||||
<p>契約者一覧</p>
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('contractor_list') }}" class="nav-link @if(request()->routeIs('contractor_list*')) active @endif">
|
<a href="./example.html" class="nav-link">
|
||||||
<i class="fa fa-circle-o nav-icon"></i>
|
<i class="fa fa-circle-o nav-icon"></i>
|
||||||
<p>未更新者一覧</p>
|
<p>下層メニュー2</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('update_candidate') }}" class="nav-link @if(request()->routeIs('update_candidate*')) active @endif">
|
|
||||||
<i class="fa fa-circle-o nav-icon"></i>
|
|
||||||
<p>更新予定者一覧</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('reservation') }}" class="nav-link @if(request()->routeIs('reservation*')) active @endif">
|
|
||||||
<i class="fa fa-circle-o nav-icon"></i>
|
|
||||||
<p>予約者一覧</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('personal') }}" class="nav-link @if(request()->routeIs('personal*')) active @endif">
|
|
||||||
<i class="fa fa-circle-o nav-icon"></i>
|
|
||||||
<p>本人確認手動処理</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('refund_processing') }}" class="nav-link @if(request()->routeIs('refund_processing*')) active @endif">
|
|
||||||
<i class="fa fa-circle-o nav-icon"></i>
|
|
||||||
<p>返金処理</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('periodical_usage') }}" class="nav-link @if(request()->routeIs('periodical_usage*')) active @endif">
|
|
||||||
<i class="fa fa-circle-o nav-icon"></i>
|
|
||||||
<p>定期利用・契約状況</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
--}}
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item has-treeview">
|
<li class="nav-item has-treeview">
|
||||||
@ -374,8 +331,7 @@
|
|||||||
<i class="right fa fa-angle-down"></i>
|
<i class="right fa fa-angle-down"></i>
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
{{--
|
|
||||||
Laravel 12移行時に一時的にコメントアウト:routeが未定義のため
|
|
||||||
<ul class="nav nav-treeview" style="display: block;">
|
<ul class="nav nav-treeview" style="display: block;">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{route('users')}}" class="nav-link @if(app('router')->is('users')) active @endif">
|
<a href="{{route('users')}}" class="nav-link @if(app('router')->is('users')) active @endif">
|
||||||
@ -383,13 +339,14 @@
|
|||||||
<p>{{__('利用者マスタ')}}</p>
|
<p>{{__('利用者マスタ')}}</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{route('regular_contracts')}}" class="nav-link @if(app('router')->is('regular_contracts')) active @endif">
|
<a href="{{route('regular_contracts')}}" class="nav-link @if(app('router')->is('regular_contracts')) active @endif">
|
||||||
<i class="fa fa-circle-o nav-icon"></i>
|
<i class="fa fa-circle-o nav-icon"></i>
|
||||||
<p>{{__('定期契約マスタ')}}</p>
|
<p>{{__('定期契約マスタ')}}</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
{{--
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{route('prices')}}" class="nav-link @if(app('router')->is('prices')) active @endif">
|
<a href="{{route('prices')}}" class="nav-link @if(app('router')->is('prices')) active @endif">
|
||||||
<i class="fa fa-circle-o nav-icon"></i>
|
<i class="fa fa-circle-o nav-icon"></i>
|
||||||
@ -423,6 +380,7 @@
|
|||||||
<p>{{__("シール印刷範囲マスタ")}}</p>
|
<p>{{__("シール印刷範囲マスタ")}}</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
Laravel 12移行時に一時的にコメントアウト:routeが未定義のため
|
||||||
--}}
|
--}}
|
||||||
|
|
||||||
|
|
||||||
@ -438,12 +396,12 @@
|
|||||||
{{--<p>{{__('駐輪分類マスタ')}}</p>--}}
|
{{--<p>{{__('駐輪分類マスタ')}}</p>--}}
|
||||||
{{--</a>--}}
|
{{--</a>--}}
|
||||||
{{--</li>--}}
|
{{--</li>--}}
|
||||||
{{--<li class="nav-item">--}}
|
<li class="nav-item">
|
||||||
{{--<a href="./example.html" class="nav-link">--}}
|
<a href="{{route('pplace')}}" class="nav-link @if(app('router')->is('pplace')) active @endif">
|
||||||
{{--<i class="fa fa-circle-o nav-icon"></i>--}}
|
<i class="fa fa-circle-o nav-icon"></i>
|
||||||
{{--<p>駐輪車室マスタ</p>--}}
|
<p>駐輪車室マスタ</p>
|
||||||
{{--</a>--}}
|
</a>
|
||||||
{{--</li>--}}
|
</li>
|
||||||
{{--<li class="nav-item">--}}
|
{{--<li class="nav-item">--}}
|
||||||
{{--<a href="{{route('usertypes')}}" class="nav-link @if(app('router')->is('usertypes')) active @endif">--}}
|
{{--<a href="{{route('usertypes')}}" class="nav-link @if(app('router')->is('usertypes')) active @endif">--}}
|
||||||
{{--<i class="fa fa-circle-o nav-icon"></i>--}}
|
{{--<i class="fa fa-circle-o nav-icon"></i>--}}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use App\Http\Controllers\Admin\PplaceController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Laravel 12変更点:ルート定義の書き方が変更
|
* Laravel 12変更点:ルート定義の書き方が変更
|
||||||
@ -41,22 +42,16 @@ Route::middleware('auth')->group(function () {
|
|||||||
// 他の開発者が継続して開発できるように、エラーを防ぐための仮ルート定義
|
// 他の開発者が継続して開発できるように、エラーを防ぐための仮ルート定義
|
||||||
// 実装完了後は各機能の正式なルートに置き換える予定
|
// 実装完了後は各機能の正式なルートに置き換える予定
|
||||||
|
|
||||||
// 利用者マスタ管理機能(仮ルート)
|
// 利用者マスタ管理機能
|
||||||
Route::match(['get', 'post'], '/users', function() {
|
Route::match(['get', 'post'], '/users', [App\Http\Controllers\Admin\UserController::class, 'list'])->name('users');
|
||||||
return view('admin.placeholder', ['title' => '利用者マスタ', 'feature' => 'users']);
|
|
||||||
})->name('users');
|
|
||||||
|
|
||||||
Route::match(['get', 'post'], '/users/add', function() {
|
Route::match(['get', 'post'], '/users/add', function() {
|
||||||
return view('admin.placeholder', ['title' => '利用者追加', 'feature' => 'users']);
|
return view('admin.placeholder', ['title' => '利用者追加', 'feature' => 'users']);
|
||||||
})->name('user_add');
|
})->name('user_add');
|
||||||
|
|
||||||
Route::match(['get', 'post'], '/users/edit/{seq}', function($seq) {
|
Route::match(['get', 'post'], '/users/edit/{seq}', [App\Http\Controllers\Admin\UserController::class, 'edit'])->name('user_edit')->where(['seq' => '[0-9]+']);
|
||||||
return view('admin.placeholder', ['title' => '利用者編集', 'feature' => 'users', 'id' => $seq]);
|
|
||||||
})->name('user_edit')->where(['seq' => '[0-9]+']);
|
|
||||||
|
|
||||||
Route::match(['get', 'post'], '/users/info/{seq}', function($seq) {
|
Route::match(['get', 'post'], '/users/info/{seq}', [App\Http\Controllers\Admin\UserController::class, 'info'])->name('user_info')->where(['seq' => '[0-9]+']);
|
||||||
return view('admin.placeholder', ['title' => '利用者詳細', 'feature' => 'users', 'id' => $seq]);
|
|
||||||
})->name('user_info')->where(['seq' => '[0-9]+']);
|
|
||||||
|
|
||||||
Route::match(['get', 'post'], '/users/delete', function() {
|
Route::match(['get', 'post'], '/users/delete', function() {
|
||||||
return redirect()->route('users')->with('info', '削除機能は現在実装中です。');
|
return redirect()->route('users')->with('info', '削除機能は現在実装中です。');
|
||||||
@ -71,9 +66,24 @@ Route::middleware('auth')->group(function () {
|
|||||||
})->name('users_export');
|
})->name('users_export');
|
||||||
|
|
||||||
// その他の管理機能の仮ルート(必要に応じて追加)
|
// その他の管理機能の仮ルート(必要に応じて追加)
|
||||||
Route::match(['get', 'post'], '/regular_contracts', function() {
|
// [東京都|〇〇駐輪場] 定期契約マスタ
|
||||||
return view('admin.placeholder', ['title' => '定期契約管理', 'feature' => 'regular_contracts']);
|
Route::match(['get', 'post'], '/regular_contracts', [App\Http\Controllers\Admin\RegularContractController::class, 'list'])->name('regular_contracts');
|
||||||
})->name('regular_contracts');
|
Route::match(['get', 'post'], '/regular_contracts/add', [App\Http\Controllers\Admin\RegularContractController::class, 'add'])->name('regular_contract_add');
|
||||||
|
Route::match(['get', 'post'], '/regular_contracts/edit/{contract_id}', [App\Http\Controllers\Admin\RegularContractController::class, 'edit'])->name('regular_contract_edit')->where(['contract_id' => '[0-9]+']);
|
||||||
|
Route::match(['get', 'post'], '/regular_contracts/info/{contract_id}', [App\Http\Controllers\Admin\RegularContractController::class, 'info'])->name('regular_contract_info')->where(['contract_id' => '[0-9]+']);
|
||||||
|
Route::match(['get', 'post'], '/regular_contracts/delete', [App\Http\Controllers\Admin\RegularContractController::class, 'delete'])->name('regular_contracts_delete');
|
||||||
|
Route::match(['get', 'post'], '/regular_contracts/import', [App\Http\Controllers\Admin\RegularContractController::class, 'import'])->name('regular_contracts_import');
|
||||||
|
Route::get('/regular_contracts/export', [App\Http\Controllers\Admin\RegularContractController::class, 'export'])->name('regular_contracts_export');
|
||||||
|
|
||||||
|
// [東京都|〇〇駐輪場] 駐輪車室マスタ
|
||||||
|
Route::match(['get', 'post'], '/pplace', [PplaceController::class, 'list'])->name('pplace');
|
||||||
|
Route::match(['get', 'post'], '/pplace/add', [PplaceController::class, 'add'])->name('pplace_add');
|
||||||
|
Route::match(['get', 'post'], '/pplace/edit/{id}', [PplaceController::class, 'edit'])->name('pplace_edit')->where(['id' => '[0-9]+']);
|
||||||
|
Route::match(['get', 'post'], '/pplace/info/{id}', [PplaceController::class, 'info'])->name('pplace_info')->where(['id' => '[0-9]+']);
|
||||||
|
Route::match(['get', 'post'], '/pplace/delete', [PplaceController::class, 'delete'])->name('pplace_delete');
|
||||||
|
Route::match(['get', 'post'], '/pplace/import', [PplaceController::class, 'import'])->name('pplace_import');
|
||||||
|
Route::get('/pplace/export', [PplaceController::class, 'export'])->name('pplace_export');
|
||||||
|
|
||||||
|
|
||||||
Route::match(['get', 'post'], '/parks', function() {
|
Route::match(['get', 'post'], '/parks', function() {
|
||||||
return view('admin.placeholder', ['title' => '駐輪場管理', 'feature' => 'parks']);
|
return view('admin.placeholder', ['title' => '駐輪場管理', 'feature' => 'parks']);
|
||||||
@ -82,15 +92,4 @@ Route::middleware('auth')->group(function () {
|
|||||||
Route::match(['get', 'post'], '/opes', function() {
|
Route::match(['get', 'post'], '/opes', function() {
|
||||||
return view('admin.placeholder', ['title' => 'オペレータ管理', 'feature' => 'opes']);
|
return view('admin.placeholder', ['title' => 'オペレータ管理', 'feature' => 'opes']);
|
||||||
})->name('opes');
|
})->name('opes');
|
||||||
|
|
||||||
// 区画別利用率状況機能
|
|
||||||
// Laravel 12変更点:配列形式でのコントローラー指定
|
|
||||||
// Laravel 5.7: 'Admin\UsingStatusController@index' 形式を使用していた
|
|
||||||
Route::get('/using_status', [App\Http\Controllers\Admin\UsingStatusController::class, 'index'])->name('using_status');
|
|
||||||
Route::post('/using_status', [App\Http\Controllers\Admin\UsingStatusController::class, 'index'])->name('using_status');
|
|
||||||
|
|
||||||
// 区画別利用率状況 - 将来拡張用API・エクスポート機能
|
|
||||||
// Laravel 12対応:RESTful API エンドポイント
|
|
||||||
Route::get('/using_status/api', [App\Http\Controllers\Admin\UsingStatusController::class, 'apiGetUtilization'])->name('using_status.api');
|
|
||||||
Route::get('/using_status/export', [App\Http\Controllers\Admin\UsingStatusController::class, 'exportCsv'])->name('using_status.export');
|
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user