This commit is contained in:
hafifierahman
2022-05-26 15:37:53 +08:00
10 changed files with 11466 additions and 174 deletions
+17
View File
@@ -15,6 +15,23 @@ class LelongController extends Controller
$api_url = config('api.url');
$auth_user = Auth::user();
return view('lelong.mainlelong',compact('api_url','auth_user'));
}
public function notislelong()
{
$api_url = config('api.url');
$auth_user = Auth::user();
return view('lelong.notislelong',compact('api_url','auth_user'));
}
public function notislelong2()
{
$api_url = config('api.url');
$auth_user = Auth::user();
return view('lelong.notislelongfasa2',compact('api_url','auth_user'));
}
}
+10631 -25
View File
File diff suppressed because it is too large Load Diff
+676 -112
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -192,6 +192,7 @@ Vue.component('searchpelanggan-component', require('./components/Searchpelanggan
Vue.component('laporanakaun-component', require('./Akaun/Laporan.vue').default)
Vue.component('online-component', require('./Online/Online.vue').default)
Vue.component('noticelelong-component', require('./pages/NotisLelong.vue').default)
Vue.component('noticelelong2-component', require('./pages/NotisLelongFasa2.vue').default)
Vue.component('kelulusan-component', require('./Kelulusan/TableKelulusan.vue').default)
Vue.component('details-pelanggan', require('./pages/Detailspelanggan.vue').default)
+4 -4
View File
@@ -50,7 +50,7 @@
</label>
<input v-model.trim="$v.amaunlulus.$model" type="text" class="mr-2 bg-white appearance-none border-2 border-gray-400 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue-500 border-black" />
<div class="text-red-500 text-xs italic" v-if="!$v.amaunlulus.required">Field is required</div>
<div class="error" v-if="!$v.amaunlulus.between">Must be between {{$v.amaunlulus.$params.between.min}} and {{$v.amaunlulus.$params.between.max}}</div><span tabindex="0">Blur to see changes</span>
<div class="text-red-500 text-xs italic" v-if="!$v.amaunlulus.between">Must be between {{$v.amaunlulus.$params.between.min}} and {{$v.amaunlulus.$params.between.max}}</div>
</div>
</div>
@@ -190,14 +190,14 @@ export default {
validations: {
amaunlulus: {
required,
between:between(0, this.amaun_dimohon)
between: between(20, 30)
},
imageFile: {
required,
file_size_validation
// file_size_validation
},
amaun_dimohon: {
required
required,
},
selected: {
required
+63
View File
@@ -0,0 +1,63 @@
<template>
<div>
<vue-html5-editor :content="content" :auto-height="true" @change="checkdetails" :show-module-name="false"></vue-html5-editor>
<div class="flex justify-end mt-2">
<button class="bg-blue-500 text-white active:bg-lightBlue-600 font-bold uppercase text-sm px-6 py-3 rounded shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150" type="button">
<span v-if="submitStatus === 'PENDING'"><i class="animate-spin fas fa-spinner mr-2"></i>Loading..</span>
<span v-else @click="updateData">Kemaskini</span>
</button>
</div>
</div>
</template>
<script>
export default {
data () {
return {
content: '',
submitStatus:''
}
},
created() {
this.axios.get(this.$hostname + '/api/details/notislelong/' + this.$kodcaw).then(response => {
console.log(response.data)
this.content = response.data[0].para3;
});
},
methods:{
checkdetails: function(data){
this.content = data;
},
updateData() {
// do your submit logic here
this.submitStatus = 'PENDING'
let result = this.PostData()
let pro1 = Promise.resolve(result)
let self = this
pro1.then(function(response) {
if(response.data == 1)
{
setTimeout(() => {
self.submitStatus = 'OK'
self.$toast.success('Berjaya dikemaskini!')
}, 500)
}else{
self.$toast.error('Error occured')
self.submitStatus = 'OK'
}
}, function(e) {
console.error(e); // TypeError: Throwing
});
},
async PostData(){
let response = await this.axios.put(this.$hostname + '/admin/notislelong/update2/' + this.$kodcaw,
{
content: this.content
});
console.log(response);
return response
}
}
}
</script>
@@ -0,0 +1,20 @@
@extends('layouts.app')
@section('content')
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
<main>
<div class="pt-6 px-4">
<breadcrumb :items="[{ 'title' : 'Notis Lelong', 'icon' : 'fas fa-gavel' }]"></breadcrumb>
<div class="mx-auto mt-10 mb-10 flex justify-center">
<a href="{{ route('lelongfasa1') }}" class="bg-yellow-500 p-4 rounded text-white mr-4">Fasa 1</a>
<a href="{{ route('lelongfasa2') }}" class="bg-yellow-500 p-4 rounded text-white">Fasa 2</a>
</div>
</div>
</main>
@include('layouts.footer')
@endsection
@@ -0,0 +1,18 @@
@extends('layouts.app')
@section('content')
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
<main>
<div class="pt-6 px-4">
<breadcrumb :items="[{ 'title' : 'Notis Lelong', 'icon' : 'fas fa-gavel' }]"></breadcrumb>
<noticelelong2-component></noticelelong2-component>
</div>
</main>
@include('layouts.footer')
@endsection
+3
View File
@@ -64,6 +64,9 @@ Route::get('/bajet/kemaskini',['as'=>'bajet.kemaskini','uses'=>'App\Http\Control
//Lelong
Route::get('/notislelong',['as'=>'lelong','uses'=>'App\Http\Controllers\LelongController@index'])->middleware(['roleChecker:null,null,operasi']);
Route::get('/notislelong1',['as'=>'lelongfasa1','uses'=>'App\Http\Controllers\LelongController@notislelong'])->middleware(['roleChecker:null,null,operasi']);
Route::get('/notislelong2',['as'=>'lelongfasa2','uses'=>'App\Http\Controllers\LelongController@notislelong2'])->middleware(['roleChecker:null,null,operasi']);
//Kelulusan