Add new galeri marhun to cawangan
This commit is contained in:
@@ -2556,5 +2556,11 @@ class MarhunController extends Controller
|
||||
return view('pengurusangambar.index');
|
||||
}
|
||||
|
||||
|
||||
public function galeriMarhun()
|
||||
{
|
||||
$user = Auth::user();
|
||||
|
||||
$kodcaw = Cawangan::select('id')->where('caw_code', $user->kodcaw)->first();
|
||||
return view('pengurusangambar.galerimarhun', compact('kodcaw'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1442,6 +1442,19 @@ class LelongMobileController extends Controller
|
||||
return response()->json($lelong_all);
|
||||
}
|
||||
|
||||
public function listLelongByCawangan(Request $request)
|
||||
{
|
||||
$cawangan = Cawangan::with('lelong')->find($request->caw_id);
|
||||
$lelong_all = $cawangan->lelong;
|
||||
foreach($lelong_all as $index => $lelong)
|
||||
{
|
||||
$date_convert = strtotime($lelong->tarikh_lelong);
|
||||
$lelong_all[$index]['tarikh_lelong'] = date("d-m-Y", $date_convert);
|
||||
$lelong_all[$index]['new_id'] = str_pad($lelong->id, 3, "0", STR_PAD_LEFT);
|
||||
}
|
||||
return response()->json($lelong_all);
|
||||
}
|
||||
|
||||
public function listCawangan(Request $request)
|
||||
{
|
||||
$cawangan_all = CawanganLelong::join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<label>Pilih Batch Lelong</label>
|
||||
<div class="d-flex">
|
||||
<select class="custom-select" @change="pilihBatchLelong($event)">
|
||||
<option selected>Batch Lelong</option>
|
||||
<option v-for="val in listLelong" :key="val" v-bind:value="val.id">{{ val.id }}, ({{ val.tarikh_lelong }})
|
||||
</option>
|
||||
</select>
|
||||
<button class="btn btn-primary d-flex" @click="reloadComponent()">Kemaskini <span class="material-symbols-rounded">refresh</span></button>
|
||||
</div>
|
||||
<div class="mt-3 row justify-content-center">
|
||||
<DisplayLelongBid v-if="pilihLelong != 'Batch Lelong'" v-bind:key="componentKeySecond"
|
||||
v-bind:selectedIdCawangan="pilihIdCawangan" v-bind:selectedBatchLelong="pilihLelong" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import DisplayLelongBid from "./DisplayLelongBid.vue.vue"
|
||||
import axios from "axios";
|
||||
|
||||
const listLelong = ref();
|
||||
const pilihLelong = ref('Batch Lelong');
|
||||
const pilihIdCawangan = ref(branch_code);
|
||||
const componentKeySecond = ref(0);
|
||||
|
||||
function getListLelongByCawangan() {
|
||||
axios.get("/listLelongByCawangan", {
|
||||
params: {
|
||||
caw_id: branch_code,
|
||||
},
|
||||
}).then((response) => {
|
||||
listLelong.value = response.data;
|
||||
}).catch((error) => {
|
||||
alert(error);
|
||||
});
|
||||
};
|
||||
|
||||
function pilihBatchLelong(e) {
|
||||
let val = e.target.value;
|
||||
pilihLelong.value = val;
|
||||
componentKeySecond.value += 1;
|
||||
};
|
||||
|
||||
function reloadComponent() {
|
||||
componentKeySecond.value += 1;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getListLelongByCawangan();
|
||||
})
|
||||
</script>
|
||||
Vendored
+6
-1
@@ -4,8 +4,13 @@ import 'viewerjs/dist/viewer.css'
|
||||
import VueViewer from 'v-viewer'
|
||||
|
||||
import SelectBatchLelong from "./components/pengurusangambar/marhun/SelectBatchLelong.vue"
|
||||
import SelectBatchLelongCawangan from "./components/pengurusangambar/marhun/SelectBatchLelongCawangan.vue"
|
||||
|
||||
const appSelectBatchLelong = createApp(SelectBatchLelong);
|
||||
appSelectBatchLelong.use(VueViewer);
|
||||
|
||||
appSelectBatchLelong.mount("#appSelectBatchLelong");
|
||||
const appSelectBatchLelongCawangan = createApp(SelectBatchLelongCawangan);
|
||||
appSelectBatchLelongCawangan.use(VueViewer);
|
||||
|
||||
appSelectBatchLelong.mount("#appSelectBatchLelong");
|
||||
appSelectBatchLelongCawangan.mount("#appSelectBatchLelongCawangan");
|
||||
@@ -46,9 +46,9 @@
|
||||
<a href="{{url('pengurusangambar/marhun')}}">
|
||||
<div class="sidebar-menu-main-title">
|
||||
<span class="material-symbols-rounded sidebar-menu-item-main">
|
||||
settings
|
||||
gallery_thumbnail
|
||||
</span>
|
||||
Pengurusan Gambar Marhun
|
||||
Galeri Marhun
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@@ -147,9 +147,9 @@
|
||||
<a href="{{url('pengurusangambar/marhun')}}">
|
||||
<div class="sidebar-menu-main-title">
|
||||
<span class="material-symbols-rounded sidebar-menu-item-main">
|
||||
settings
|
||||
gallery_thumbnail
|
||||
</span>
|
||||
Pengurusan Gambar Marhun
|
||||
Galeri Marhun
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@@ -272,6 +272,16 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ (request()->is('pengurusangambar/galerimarhun') || request()->is('pengurusangambar/galerimarhun/*')) ? 'active' : '' }}">
|
||||
<a href="{{url('pengurusangambar/galerimarhun')}}">
|
||||
<div class="sidebar-menu-main-title">
|
||||
<span class="material-symbols-rounded sidebar-menu-item-main">
|
||||
gallery_thumbnail
|
||||
</span>
|
||||
Galeri Marhun
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ (request()->is('report/')) ? 'active' : '' }}">
|
||||
<a href="#reportSubmenu" data-toggle="collapse" aria-expanded="false">
|
||||
|
||||
@@ -442,6 +452,16 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ (request()->is('pengurusangambar/galerimarhun') || request()->is('pengurusangambar/galerimarhun/*')) ? 'active' : '' }}">
|
||||
<a href="{{url('pengurusangambar/galerimarhun')}}">
|
||||
<div class="sidebar-menu-main-title">
|
||||
<span class="material-symbols-rounded sidebar-menu-item-main">
|
||||
gallery_thumbnail
|
||||
</span>
|
||||
Galeri Marhun
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@endhasrole
|
||||
@hasrole('penilai')
|
||||
<li class="{{ (request()->is('marhun/senarailelongterimaserah')) ? 'active' : '' }}">
|
||||
@@ -474,6 +494,16 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ (request()->is('pengurusangambar/galerimarhun') || request()->is('pengurusangambar/galerimarhun/*')) ? 'active' : '' }}">
|
||||
<a href="{{url('pengurusangambar/galerimarhun')}}">
|
||||
<div class="sidebar-menu-main-title">
|
||||
<span class="material-symbols-rounded sidebar-menu-item-main">
|
||||
gallery_thumbnail
|
||||
</span>
|
||||
Galeri Marhun
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@endhasrole
|
||||
@hasrole('operasi')
|
||||
<li>
|
||||
@@ -622,9 +652,9 @@
|
||||
<a href="{{url('pengurusangambar/marhun')}}">
|
||||
<div class="sidebar-menu-main-title">
|
||||
<span class="material-symbols-rounded sidebar-menu-item-main">
|
||||
settings
|
||||
gallery_thumbnail
|
||||
</span>
|
||||
Pengurusan Gambar Marhun
|
||||
Galeri Marhun
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col mx-auto p-4">
|
||||
<div class="card">
|
||||
<div class="card-header header-style">
|
||||
<div class="header-style-title">
|
||||
Galeri Marhun
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="appSelectBatchLelongCawangan">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.branch_code = "<?php echo "$kodcaw->id" ?>"
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="card">
|
||||
<div class="card-header header-style">
|
||||
<div class="header-style-title">
|
||||
Pengurusan Gambar Marhun
|
||||
Galeri Marhun
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
@@ -145,6 +145,7 @@ Route::get('/item','ApiController@biditem');
|
||||
Route::get('/jeniskarat','ApiController@karat');
|
||||
|
||||
Route::get('/listLelong', [LelongMobileController::class, 'listLelong']);
|
||||
Route::get('/listLelongByCawangan', [LelongMobileController::class, 'listLelongByCawangan']);
|
||||
Route::get('/listCawangan', [LelongMobileController::class, 'listCawangan']);
|
||||
Route::get('/listLelongBid', [LelongMobileController::class, 'listLelongBid']);
|
||||
Route::get('/showPhotoMarhun', [LelongMobileController::class, 'showPhotoMarhun']);
|
||||
|
||||
@@ -621,6 +621,7 @@ Route::group(['middleware' => ['permission:backdate'],'prefix'=>'backdate'], fun
|
||||
|
||||
Route::group(['middleware' => ['permission:pengurusangambar'], 'prefix' => 'pengurusangambar'], function () {
|
||||
Route::get('/marhun', ['as' => 'pengurusangambar.marhun', 'uses' => 'MarhunController@pengurusanGambarMarhun']);
|
||||
Route::get('/galerimarhun', ['as' => 'pengurusangambar.galerimarhun', 'uses' => 'MarhunController@galeriMarhun']);
|
||||
});
|
||||
Route::group(['middleware' => ['permission:pengurusanuploaddownload'], 'prefix' => 'pengurusanuploaddownload'], function () {
|
||||
Route::get('/testupload', ['as' => 'pengurusanuploaddownload.testupload', 'uses' => 'DatabaseController@pengurusanMaxUploadSize']);
|
||||
|
||||
Reference in New Issue
Block a user