You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
178 lines
4.7 KiB
PHTML
178 lines
4.7 KiB
PHTML
@extends('temp.admin')
|
|
@php
|
|
use NN\Module\DB;
|
|
use NN\Module\Perusahaan as perush;
|
|
$demo = perush::datalogin()['data'][0]->demo;
|
|
|
|
$set = [
|
|
"title" => "Setting"
|
|
, "subtitle" => "Username"
|
|
, "thead" => [
|
|
"#","Kode","Posisi","Username","Password","Nama","Status"
|
|
]
|
|
];
|
|
|
|
@endphp
|
|
@section("content")
|
|
|
|
@include("temp.temp1", $set)
|
|
|
|
<noscript id="datainternal">{!! json_encode(DB::query_result_object("SELECT kode id, keterangan text FROM dept")) !!}</noscript>
|
|
@endsection
|
|
|
|
@section('script')
|
|
<script>
|
|
|
|
var objectForm = {
|
|
title : function(){
|
|
return 'Username';
|
|
},
|
|
table :"username",
|
|
idform :"containerforms",
|
|
newkode: ``,
|
|
kode: 'id',
|
|
view: ['id','setup', 'username','password', 'nama', 'status'],
|
|
noAction: true,
|
|
custButton: function (a, i) {
|
|
f = a.id;
|
|
console.log(a);
|
|
if(a.setting == 1){
|
|
return `-`;
|
|
}else{
|
|
return `
|
|
<button data-id="${i}" data-kode="${f}" class="btn btn-sm btn-clear edit" style="color:#666ee8;"><i class="icon-note"></i></button>
|
|
<button kode-print="${f}" class="kode-print btn btn-sm btn-clear" style="color:black;"><i class="la la-print"></i></button>
|
|
`;
|
|
}
|
|
},
|
|
custome: {
|
|
password: function(a){
|
|
return btoa(a);
|
|
},
|
|
status: function(a){
|
|
if(a == '0'){
|
|
return 'Active';
|
|
}else{
|
|
return 'Tidak Active';
|
|
}
|
|
}
|
|
,setup: function(a){
|
|
if(a == 'main'){
|
|
return 'Koperasi';
|
|
}else if(a == 'acc'){
|
|
return 'Akuntansi';
|
|
}else{
|
|
return 'Setting';
|
|
}
|
|
}
|
|
},
|
|
oncreate: function(a){
|
|
globalThis['id'].parent.value = uuid();
|
|
globalThis._radioAct.setVal('demo', 0);
|
|
},
|
|
onupdate: function(dt){
|
|
globalThis._radioAct.setVal('demo', dt.demo, 1);
|
|
globalThis._radioAct.setVal('status', dt.status, 1);
|
|
globalThis._radioAct.setVal('setup', dt.setup, 1);
|
|
},
|
|
dataSelect: ["*"],
|
|
queryTemp: "SELECT {select} FROM username || ORDER BY urut ASC",
|
|
validasiForm: ['id', 'username'],
|
|
data: [
|
|
{
|
|
title: 'ID',
|
|
type: 'text',
|
|
name: 'id',
|
|
row: 12,
|
|
readonly: true,
|
|
action: function(){
|
|
|
|
},
|
|
}
|
|
,{
|
|
title: 'Usename',
|
|
type: 'text',
|
|
name: 'username',
|
|
row: 12,
|
|
readonly: false,
|
|
action: function(){
|
|
|
|
},
|
|
}
|
|
,{
|
|
title: 'Password',
|
|
type: 'text',
|
|
name: 'password',
|
|
row: 12,
|
|
readonly: false,
|
|
action: function(){
|
|
|
|
},
|
|
}
|
|
,{
|
|
title: 'Nama',
|
|
type: 'text',
|
|
name: 'nama',
|
|
row: 12,
|
|
readonly: false,
|
|
action: function(){
|
|
|
|
},
|
|
}
|
|
,{
|
|
title: 'Status',
|
|
type: 'radio',
|
|
name: 'status',
|
|
row: 12,
|
|
readonly: false,
|
|
data: [{id:0,text:'active'},{id:1,text:'tidak active'}],
|
|
action: function(){
|
|
|
|
},
|
|
}
|
|
,{
|
|
title: 'Setup',
|
|
type: 'radio',
|
|
name: 'setup',
|
|
row: 12,
|
|
readonly: false,
|
|
data: [{id:'main',text:'Admin USP'}, {id:'acc',text:'Admin ACC'},{id:'admin',text:'Admin Setup'}],
|
|
action: function(){
|
|
|
|
},
|
|
}
|
|
,{
|
|
title: 'Show Demo',
|
|
type: 'radio',
|
|
name: 'demo',
|
|
row: 12,
|
|
readonly: false,
|
|
data: [{id:'0',text:'Tidak Aktif'}, {id:'1',text:'Aktif Demo'}],
|
|
action: function(){
|
|
|
|
},
|
|
}
|
|
]
|
|
};
|
|
@if($demo == 1)
|
|
objectForm.disableEditor = true;
|
|
@endif
|
|
</script>
|
|
@include('temp.crudpinjaman')
|
|
@endsection
|
|
@section('css')
|
|
<style>
|
|
.dataTable tr td:nth-child(1){
|
|
white-space: nowrap;
|
|
max-width: 60px !important;
|
|
min-width: 60px !important;
|
|
width: 60px !important;
|
|
}
|
|
</style>
|
|
<style>
|
|
.dataTable tr td:nth-child(2){
|
|
white-space: nowrap;
|
|
}
|
|
</style>
|
|
@endsection
|