fix skit2

This commit is contained in:
fifi97
2022-02-02 02:58:53 +08:00
parent 275ca6f640
commit 4f517fefde
9 changed files with 247 additions and 10628 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Http;
use Carbon\Carbon;
class LelongController extends Controller
{
public function index()
{
$api_url = config('api.url');
$auth_user = Auth::user();
return view('lelong.notislelong',compact('api_url','auth_user'));
}
}
+78 -10627
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -24,6 +24,7 @@
"tailwindcss": "^2.2.19",
"vue": "^2.6.12",
"vue-friendly-iframe": "^0.20.0",
"vue-html5-editor": "^1.1.1",
"vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.12"
},
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 30 KiB

+50
View File
@@ -24,6 +24,55 @@ import VueFriendlyIframe from 'vue-friendly-iframe';
import VueSweetalert2 from 'vue-sweetalert2';
import 'sweetalert2/dist/sweetalert2.min.css';
import VueHtml5Editor from 'vue-html5-editor'
let ops = {
// global component name
name: "vue-html5-editor",
// if set true,will append module name to toolbar after icon
showModuleName: false,
// custom icon class of built-in modules,default using font-awesome
icons: {
text: "fa fa-pencil",
color: "fa fa-paint-brush",
font: "fa fa-font",
align: "fa fa-align-justify",
list: "fa fa-list",
link: "fa fa-chain",
unlink: "fa fa-chain-broken",
tabulation: "fa fa-table",
image: "fa fa-file-image-o",
hr: "fa fa-minus",
eraser: "fa fa-eraser",
undo: "fa-undo fa",
"full-screen": "fa fa-arrows-alt",
info: "fa fa-info",
},
//default en-us, en-us and zh-cn are built-in
language: "en-us",
// the modules you don't want
hiddenModules: [],
// keep only the modules you want and customize the order.
// can be used with hiddenModules together
visibleModules: [
"text",
"color",
// "font",
"align",
// "list",
// "link",
// "unlink",
// "tabulation",
// "image",
// "hr",
// "eraser",
"undo",
"full-screen",
// "info",
]
};
Vue.use(VueHtml5Editor,ops);
require('./bootstrap');
@@ -139,6 +188,7 @@ Vue.component('modal-component', require('./components/util/Modal.vue').default)
Vue.component('searchpelanggan-component', require('./components/Searchpelanggan.vue').default)
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('details-pelanggan', require('./pages/Detailspelanggan.vue').default)
Vue.component('blacklist-pelanggan', require('./pages/Blacklist.vue').default)
+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 => {
this.content = response.data[0].para2;
});
},
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(){
console.log(this.content);
let response = await this.axios.put(this.$hostname + '/admin/notislelong/update/' + this.$kodcaw,
{
content: this.content
});
console.log(response);
return response
}
}
}
</script>
+14
View File
@@ -145,6 +145,20 @@
</li>
</a>
<a href="{{ route('lelong') }}" class="rounded mb-2 mr-2 {{ Route::is('lelong') || Route::is('lelong.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
<div class="flex items-center">
{{-- <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636" />
</svg> --}}
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" class="bi bi-hammer" viewBox="0 0 16 16">
<path d="M9.972 2.508a.5.5 0 0 0-.16-.556l-.178-.129a5.009 5.009 0 0 0-2.076-.783C6.215.862 4.504 1.229 2.84 3.133H1.786a.5.5 0 0 0-.354.147L.146 4.567a.5.5 0 0 0 0 .706l2.571 2.579a.5.5 0 0 0 .708 0l1.286-1.29a.5.5 0 0 0 .146-.353V5.57l8.387 8.873A.5.5 0 0 0 14 14.5l1.5-1.5a.5.5 0 0 0 .017-.689l-9.129-8.63c.747-.456 1.772-.839 3.112-.839a.5.5 0 0 0 .472-.334z"/>
</svg>
<span class="text-sm ml-2 text-lg">Lelong</span>
</div>
</li>
</a>
<a href="{{ route('akaun.home') }}" class="rounded mb-2 mr-2 {{ Route::is('akaun.home') || Route::is('akaun.home.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
@@ -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>
<noticelelong-component></noticelelong-component>
</div>
</main>
@include('layouts.footer')
@endsection
+2 -1
View File
@@ -56,7 +56,8 @@ Route::get('/bajet/tambah',['as'=>'bajet.tambah','uses'=>'App\Http\Controllers\B
Route::post('/bajet/tambahengine',['as'=>'bajet.functiontambah','uses'=>'App\Http\Controllers\BajetController@checkTambah'])->middleware(['roleChecker:null,null,operasi']);
Route::get('/bajet/kemaskini',['as'=>'bajet.kemaskini','uses'=>'App\Http\Controllers\BajetController@kemaskinibajet'])->middleware(['roleChecker:null,null,operasi']);
//Lelong
Route::get('/notislelong',['as'=>'lelong','uses'=>'App\Http\Controllers\LelongController@index'])->middleware(['roleChecker:null,null,operasi']);
//Akaun
Route::get('/akaunhome/cetaklaporanlejeram',['as'=>'cetak.lejeram','uses'=>'App\Http\Controllers\AkaunController@viewlejeram'])->middleware(['roleChecker:admin,akaun,operasi']);