Commit fc521718 authored by Sarun Mungthanya's avatar Sarun Mungthanya
Browse files

add inside server license

parent 8530bed6
......@@ -10,6 +10,7 @@ use Illuminate\Support\Facades\DB;
class ServerLicenseEdit extends Component
{
public $tab = 'form';
public $phpVersions = [];
public $teams = [];
public $sizings = [];
......@@ -39,6 +40,15 @@ class ServerLicenseEdit extends Component
public $message;
protected $listeners = ['gotoModal'];
public $modalLoaded = false;
public $SNKEY;
public $selectDateOrg;
public $orgList = [];
public $allDate;
public $mappingList = [], $labelList = [], $userInterfaceList = [], $globalList = [], $parameterList = [], $onloadList = [], $validateList = [];
public $globalListGroup = [];
public $fieldList = ['mapId', 'mapName', 'mapType', 'mapTo', 'mapConfig'];
public $backupFeedback, $info = [];
public function loadModal()
{
......@@ -46,7 +56,7 @@ class ServerLicenseEdit extends Component
}
public function mount($editId)
{
$this->licenseId = $editId;
$this->licenseId = '1';
$this->loadData();
}
......@@ -73,6 +83,31 @@ class ServerLicenseEdit extends Component
$this->customerUrl = $license->CUSTOMERURL;
$this->contact = $license->CONTACT;
$this->contactCustomerName = $license->CONTACTCUSTOMERNAME;
if ($license && !empty($license->BACKUP_FEEDBACK)) {
$compressedData = gzuncompress(base64_decode($license->BACKUP_FEEDBACK));
$this->backupFeedback = $compressedData;
// $utf8Data = iconv('TIS-620', 'UTF-8', $compressedData);
$this->info = null;
eval('$this->info = ' . trim($compressedData) . ';');
$this->mappingList = $this->info['DATA']['conf_mapping'];
foreach ($this->mappingList['mapConfig'] as $index => $config) {
$this->mappingList['mapConfig'][$index] = base64_decode($config);
}
if ($this->info && isset($this->info['DATA']['conf_label_form'])) {
$this->labelList = $this->info['DATA']['conf_label_form'];
}
if ($this->info && isset($this->info['DATA']['conf_ui'])) {
$this->userInterfaceList = $this->info['DATA']['conf_ui'];
}
if ($this->info && isset($this->info['DATA']['conf_global'])) {
$this->globalList = $this->info['DATA']['conf_global'];
}
}
}
$this->phpVersions = DB::table('master_php_ver')
......@@ -135,6 +170,233 @@ class ServerLicenseEdit extends Component
{
$this->emit('menuChanged', $page);
}
public function updatedSelectDateOrg()
{
$this->loadOrganize();
}
public function loadOrganize()
{
$this->tab = 'organize';
$license = ConfServerLicense::find($this->licenseId);
$this->SNKEY = $license->SNKEY;
$this->allDate = DB::table('conf_server_license_orgcontrol')
->select('id', 'createDate')
->where('SNKEY', $this->SNKEY)
->orderByDesc('id')
->get();
if (empty($this->selectDateOrg)) {
if (isset($this->allDate)) {
foreach ($this->allDate as $date) {
$this->selectDateOrg = $date->id ?? '';
break;
}
}
}
$this->orgList = DB::table('conf_server_license_orglist')
->where('controlId', $this->selectDateOrg)
->orderBy('id')
->get()
->toArray();
foreach ($this->orgList as $orgData) {
$profileList = DB::table('conf_server_license_orglist_profile')
->where('orglistId', $orgData->id)
->get();
$orgData->profileList = $profileList ? $profileList : '';
// Fetch document type by org
$docTypeList = DB::table('conf_server_license_orglist_doctype as a')
->join('u01r_doctype as b', 'a.docType', '=', 'b.DTNAME')
->where('a.orglistId', $orgData->id)
->get();
$orgData->docTypeList = $docTypeList ? $docTypeList : '';
}
}
public function loadMapping()
{
$this->tab = 'csvMapping';
// if ($this->info && isset($this->info['DATA']['conf_mapping'])) {
// $this->mappingList = $this->info['DATA']['conf_mapping'];
// foreach ($this->mappingList['mapConfig'] as $index => $config) {
// $this->mappingList['mapConfig'][$index] = base64_decode($config);
// }
// }
}
public function saveMapping()
{
$fieldList = ['mapId', 'mapName', 'mapType', 'mapTo', 'mapConfig'];
$DATA = [];
foreach ($fieldList as $field) {
foreach ($this->mappingList[$field] as $index => $value) {
if ($field == 'mapConfig') {
$DATA[$field][] = base64_encode(iconv("UTF-8", "TIS-620", $value));
} else {
$DATA[$field][] = htmlspecialchars_decode(iconv("UTF-8", "TIS-620", $value), ENT_QUOTES);
}
}
}
$this->info['DATA']['conf_mapping'] = $DATA;
$newBackupFeedback = base64_encode(gzcompress(var_export($this->info, true)));
$license = ConfServerLicense::find($this->licenseId);
if ($license) {
$updatedRows = $license->update(['BACKUP_FEEDBACK' => $newBackupFeedback]);
if ($updatedRows > 0) {
$message = 'Mapping data saved successfully!';
} else {
$message = 'No changes were made.';
}
}
$this->loadMapping();
$message = 'CSV Mapping updated successfully!';
$this->message = $message;
}
public function loadPrintForm()
{
$this->tab = 'printForm';
// if ($this->info && isset($this->info['DATA']['conf_label_form'])) {
// $this->labelList = $this->info['DATA']['conf_label_form'];
// }
}
public function savePrintForm()
{
$fieldList = array('lid', 'form_name', 'l_name', 'l_value', 'x', 'y', 'parentId', 'editLayout', 'width', 'height', 'type', 'format');
$DATA = [];
foreach ($fieldList as $field) {
foreach ($this->mappingList[$field] as $index => $value) {
$DATA[$field][] = htmlspecialchars_decode(iconv("UTF-8", "TIS-620", $value), ENT_QUOTES);
}
}
$this->info['DATA']['conf_label_form'] = $DATA;
$newBackupFeedback = base64_encode(gzcompress(var_export($this->info, true)));
$license = ConfServerLicense::find($this->licenseId);
if ($license) {
$updatedRows = $license->update(['BACKUP_FEEDBACK' => $newBackupFeedback]);
if ($updatedRows > 0) {
$message = 'Print form saved successfully!';
} else {
$message = 'No changes were made.';
}
}
$this->loadPrintForm();
$message = 'Print form updated successfully!';
$this->message = $message;
}
public function loadUserInterface()
{
$this->tab = 'userInterface';
// if ($this->info && isset($this->info['DATA']['conf_ui'])) {
// $this->userInterfaceList = $this->info['DATA']['conf_ui'];
// }
}
public function saveUserInterface()
{
$fieldList = array('pageCode', 'name', 'tname', 'required', 'type', 'spec', 'manual', 'user_note', 'js_before_focus', 'cannotImport', 'fname', 'reportFlag', 'reportOrderBy', 'reportCondition', 'reportTable', 'reportType', 'reportFormat', 'reportAlign', 'user_default');
$DATA = [];
foreach ($fieldList as $field) {
foreach ($this->userInterfaceList[$field] as $index => $value) {
$DATA[$field][] = htmlspecialchars_decode(iconv("UTF-8", "TIS-620", $value), ENT_QUOTES);
}
}
$this->info['DATA']['conf_ui'] = $DATA;
$newBackupFeedback = base64_encode(gzcompress(var_export($this->info, true)));
$license = ConfServerLicense::find($this->licenseId);
if ($license) {
$updatedRows = $license->update(['BACKUP_FEEDBACK' => $newBackupFeedback]);
if ($updatedRows > 0) {
$message = 'User Interface saved successfully!';
} else {
$message = 'No changes were made.';
}
}
$this->loadPrintForm();
$message = 'User Interface updated successfully!';
$this->message = $message;
}
public function loadGlobal()
{
$this->tab = 'global';
// if ($this->info && isset($this->info['DATA']['conf_ui'])) {
// $this->globalList = $this->info['DATA']['conf_ui'];
// }
$groupedData = [];
$globalTemp = $this->globalList;
foreach ($globalTemp['profilecode'] as $index => $profileCode) {
if (isset($globalTemp['name'][$index]) && isset($globalTemp['value'][$index])) {
if (!isset($groupedData[$profileCode])) {
$groupedData[$profileCode] = [];
}
$groupedData[$profileCode][] = [
'name' => $globalTemp['name'][$index],
'value' => $globalTemp['value'][$index],
'profilecode' => $profileCode
];
}
}
$this->globalListGroup = $groupedData;
}
public function saveGlobal()
{
$fieldList = array('name', 'value', 'profilecode');
$DATA = [];
foreach ($this->globalListGroup as $profileCode => $profileData) {
foreach ($profileData as $index => $item) {
foreach ($fieldList as $field) {
if (isset($item[$field])) {
$DATA[$field][] = htmlspecialchars_decode(iconv("UTF-8", "TIS-620", $item[$field]), ENT_QUOTES);
}
}
}
}
$this->info['DATA']['conf_global'] = $DATA;
$newBackupFeedback = base64_encode(gzcompress(var_export($this->info, true)));
$license = ConfServerLicense::find($this->licenseId);
if ($license) {
$updatedRows = $license->update(['BACKUP_FEEDBACK' => $newBackupFeedback]);
if ($updatedRows > 0) {
$message = 'Global saved successfully!';
} else {
$message = 'No changes were made.';
}
}
$this->loadPrintForm();
$message = 'Global updated successfully!';
$this->message = $message;
}
public function render()
......
......@@ -10,7 +10,7 @@ use App\Models\ConfSmartUpdate;
class ServerLicenseIndex extends Component
{
use WithPagination;
public $action = 'list';
public $action = 'edit';
public $searchBy, $editId, $message, $keyword, $perPage = 10, $searchSelected = 'PID' , $selectedPatch = [] ;
protected $listeners = [ 'deleteItem', 'deleteSelected' ,'showpatchListForm'];
public function mount()
......
<div class=" p-4">
<div class="max-w-6xl mx-auto bg-white rounded-lg">
<!-- Header -->
<div class="text-black p-4 rounded-t-lg flex justify-between items-center">
<h1 class="text-lg font-semibold">{{ $company }} (SN={{ $serverKey }}):: CSV Mapping</h1>
<button class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded">
Export Query
</button>
</div>
<!-- Table Section -->
<div class="overflow-x-auto p-4">
<table class="min-w-full bg-white border border-gray-300">
<thead>
<tr class="bg-slate-300 text-gray-700">
<th class="py-2 px-4 border-b">ID</th>
<th class="py-2 px-4 border-b">Map Name</th>
<th class="py-2 px-4 border-b">Map Type</th>
<th class="py-2 px-4 border-b">Map To</th>
<th class="py-2 px-4 border-b">Map Config</th>
</tr>
</thead>
<tbody>
@if (count($mappingList) > 0)
@foreach ($mappingList['mapId'] as $index => $mapId)
<tr class="border-b">
<td class="py-2 px-4 border">{{ $index + 1 }}</td>
<td class="py-2 px-4 border w-1/4"><input type="text"
class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="mappingList.mapName.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text"
class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="mappingList.mapType.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text"
class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="mappingList.mapTo.{{ $index }}" /></td>
<td class="py-2 px-4 border w-2/4">
<textarea class="w-full p-1 border rounded" wire:model.defer="mappingList.mapConfig.{{ $index }}"></textarea>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
<div class="p-4">
<button wire:click="saveMapping"
class="bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded">
Save
</button>
</div>
</div>
</div>
</div>
<div class="p-4">
<div class="max-w-6xl mx-auto bg-white rounded-lg">
<!-- Header -->
<div class="text-black p-4 rounded-t-lg flex justify-between items-center">
<h1 class="text-lg font-semibold">Profiles</h1>
</div>
@if (count($globalListGroup) > 0)
@foreach ($globalListGroup as $profileCode => $profileData)
<div x-data="{ expanded: false }" class="mb-4">
<div @click="expanded = !expanded" class="bg-gray-500 text-white px-4 py-2 cursor-pointer">
<strong>Profile = {{ $profileCode }}</strong>
</div>
<div x-show="expanded" class="overflow-x-auto p-4">
<div class="max-w-3xl mx-auto bg-white rounded-lg">
<table class="min-w-full bg-white border border-gray-300 text-sm">
<thead>
<tr class="bg-slate-300 text-gray-700 text-xs">
<th class="py-2 px-4 border-b w-1/2">Name</th>
<th class="py-2 px-4 border-b w-1/2">Value</th>
</tr>
</thead>
<tbody>
@foreach ($profileData as $item)
<tr class="border-b text-xs">
<td class="py-2 px-4 border"> <input type="text"
class="w-full p-2 border border-gray-300 rounded-md"
wire:model.defer="globalListGroup.{{ $profileCode }}.{{ $loop->index }}.name" />
</td>
<td class="py-2 px-4 border">
<input type="text"
class="w-full p-2 border border-gray-300 rounded-md"
wire:model.defer="globalListGroup.{{ $profileCode }}.{{ $loop->index }}.value" />
</td>
<input type="hidden" wire:model.defer="globalListGroup.{{ $profileCode }}.{{ $loop->index }}.profilecode">
</tr>
@endforeach
</tbody>
</table>
<div class="p-4">
<button wire:click="saveGlobal"
class="bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded">
Save
</button>
</div>
</div>
</div>
</div>
@endforeach
@endif
</div>
</div>
</div>
<div class="">
<div class="max-w-6xl mx-auto bg-white rounded-lg">
<!-- Header -->
<div class=" text-black p-4 rounded-t-lg">
<h1 class="text-lg font-semibold">{{ $company }} ( SNKEY = {{ $serverKey }} ) :: Organize</h1>
</div>
<!-- Form Section -->
<div class="pt-2 px-4 pb-4 border-b">
<label for="selectDateOrg" class="text-gray-700 font-semibold">Receive Data From SPN:</label>
<select id="selectDateOrg" wire:model="selectDateOrg" class="ml-2 p-2 border border-gray-300 rounded-md">
@if (isset($allDate))
@foreach ($allDate as $date)
<option value="{{ $date->id ?? '' }}">{{ $date->createDate ?? '' }}</option>
@endforeach
@endif
</select>
</div>
<!-- Table Section -->
<div class="overflow-x-auto p-4">
<table class="min-w-full is-hoverable bg-white border border-gray-300 border-b ">
<thead>
<tr class="bg-gray-200 text-gray-700">
<th class="py-2 px-4 border-b rounded-tl-lg">Organize</th>
<th class="py-2 px-4 border-b">Profile</th>
<th class="py-2 px-4 border-b rounded-tr-lg">Document Type</th>
</tr>
</thead>
<tbody>
@if (count($orgList) > 0)
@foreach ($orgList as $org)
<tr class="border-b hover:bg-slate-300">
<td class="py-4 px-4 border-b text-left hover:bg-slate-300">
<ul class="">
<li><strong>Organize: {{ $org->spnOrganize?? ''}}</strong></li>
<li>Last Update: {{ $org->epromotionCheckDate?? '' }}</li>
<li>Team (e-promotion): {{ $org->epromotionSaleTeam?? '' }}</li>
<li>Size (e-promotion): {{ $org->epromotionSize?? '' }}</li>
</ul>
</td>
<td class="py-4 px-4 border-b text-left ">
<!-- Example Profile Data -->
<ul class="list-disc">
@if (count($org->profileList??[]) > 0)
@foreach ($org->profileList as $profile)
<li>{{ $profile->profileCode }}</li>
@endforeach
@endif
</ul>
</td>
<td class="py-4 px-4 border-b text-left ">
<!-- Example Document Type Data -->
<ul class="list-disc">
@if (count($org->docTypeList??[]) > 0)
@foreach ($org->docTypeList as $doc)
<li>{{ $doc->DTDESC }}</li>
@endforeach
@endif
</ul>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
<div class=" p-4">
<div class="max-w-full mx-auto bg-white rounded-lg">
<!-- Header -->
<div class="text-black p-4 rounded-t-lg flex justify-between items-center">
<h1 class="text-lg font-semibold">{{ $company }} (SN={{ $serverKey }}):: Print Form</h1>
<button class="bg-info hover:info-focus text-white font-bold py-2 px-4 rounded">
Export Query
</button>
</div>
<!-- Table Section -->
<div class="overflow-x-auto p-4">
<table class="min-w-full bg-white border border-gray-300">
<thead>
<tr class="bg-slate-300 text-gray-700">
<th class="py-2 px-4 border-b">ID</th>
<th class="py-2 px-4 border-b">Form Name</th>
<th class="py-2 px-4 border-b">L Name</th>
<th class="py-2 px-4 border-b">L Value</th>
<th class="py-2 px-4 border-b">X</th>
<th class="py-2 px-4 border-b">Y</th>
<th class="py-2 px-4 border-b">Parent ID</th>
<th class="py-2 px-4 border-b">Edit Layout</th>
<th class="py-2 px-4 border-b">Width</th>
<th class="py-2 px-4 border-b">Height</th>
<th class="py-2 px-4 border-b">Type</th>
<th class="py-2 px-4 border-b">Format</th>
</tr>
</thead>
<tbody>
@if (count($labelList) > 0)
@foreach ($labelList['lid'] as $index => $mapId)
<tr class="border-b">
<td class="py-2 px-4 border w-10"> <!-- Adjust as necessary -->
{{ $index + 1 }}
</td>
<td class="py-2 px-4 border w-1/5">
<input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="labelList.form_name.{{ $index }}" />
</td>
<td class="py-2 px-4 border w-1/5">
<input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="labelList.l_name.{{ $index }}" />
</td>
<td class="py-2 px-4 border w-2/5">
<textarea class="w-full p-1 border rounded" wire:model.defer="labelList.l_value.{{ $index }}"></textarea>
</td>
<td class="py-2 px-4 border w-10">
<input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="labelList.x.{{ $index }}" />
</td>
<td class="py-2 px-4 border w-10">
<input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="labelList.y.{{ $index }}" />
</td>
<td class="py-2 px-4 border w-1/12">
<input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="labelList.parentId.{{ $index }}" />
</td>
<td class="py-2 px-4 border w-1/12">
<input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="labelList.editLayout.{{ $index }}" />
</td>
<td class="py-2 px-4 border w-1/12">
<input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="labelList.width.{{ $index }}" />
</td>
<td class="py-2 px-4 border w-1/12">
<input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="labelList.height.{{ $index }}" />
</td>
<td class="py-2 px-4 border w-1/12">
<input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="labelList.type.{{ $index }}" />
</td>
<td class="py-2 px-4 border w-1/12">
<input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="labelList.format.{{ $index }}" />
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
<div class="p-4">
<button wire:click="saveLabel"
class="bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded">
Save
</button>
</div>
</div>
</div>
</div>
......@@ -17,7 +17,7 @@
</div>
@endif
<div class="flex flex-wrap -mx-3 w-full bg-main-container items-center justify-center " x-data="{ activeTab: 'form' }">
<div class="w-4/5 p-5 mb-6 shadow-md rounded-lg">
<div class="w-11/12 p-5 mb-6 shadow-md rounded-lg">
<div class="mb-4 border-b border-gray-200">
<ul class="flex flex-wrap -mb-px">
<li class="mr-2">
......@@ -26,13 +26,51 @@
class="inline-block py-2 px-4">Form</a>
</li>
<li class="mr-2">
<a href="#" @click.prevent="activeTab = 'download'"
:class="{ 'border-b-2 border-blue-600 text-blue-600': activeTab === 'download' }"
class="inline-block py-2 px-4">Download</a>
<a href="#" @click.prevent="activeTab = 'organize'" wire:click="loadOrganize"
:class="{ 'border-b-2 border-blue-600 text-blue-600': activeTab === 'organize' }"
class="inline-block py-2 px-4">Organize</a>
</li>
<li class="mr-2">
<a href="#" @click.prevent="activeTab = 'csvMapping'" wire:click="loadMapping"
:class="{ 'border-b-2 border-blue-600 text-blue-600': activeTab === 'csvMapping' }"
class="inline-block py-2 px-4">CSV Mapping</a>
</li>
<li class="mr-2">
<a href="#" @click.prevent="activeTab = 'printForm'" wire:click="loadPrintForm"
:class="{ 'border-b-2 border-blue-600 text-blue-600': activeTab === 'printForm' }"
class="inline-block py-2 px-4">Print Form</a>
</li>
<li class="mr-2">
<a href="#" @click.prevent="activeTab = 'userInterface'"
wire:click="loadUserInterface"
:class="{ 'border-b-2 border-blue-600 text-blue-600': activeTab === 'userInterface' }"
class="inline-block py-2 px-4">User Interface</a>
</li>
<li class="mr-2">
<a href="#" @click.prevent="activeTab = 'global'" wire:click="loadGlobal"
:class="{ 'border-b-2 border-blue-600 text-blue-600': activeTab === 'global' }"
class="inline-block py-2 px-4">Global</a>
</li>
<li class="mr-2">
<a href="#" @click.prevent="activeTab = 'parameter'" wire:click="loadParameter"
:class="{ 'border-b-2 border-blue-600 text-blue-600': activeTab === 'parameter' }"
class="inline-block py-2 px-4">Parameter</a>
</li>
<li class="mr-2">
<a href="#" @click.prevent="activeTab = 'onlaod'" wire:click="loadOnlaod"
:class="{ 'border-b-2 border-blue-600 text-blue-600': activeTab === 'onlaod' }"
class="inline-block py-2 px-4">Onload</a>
</li>
<li class="mr-2">
<a href="#" @click.prevent="activeTab = 'validate'" wire:click="loadValidate"
:class="{ 'border-b-2 border-blue-600 text-blue-600': activeTab === 'validate' }"
class="inline-block py-2 px-4">Validate</a>
</li>
</ul>
</div>
<div x-show="activeTab === 'form'">
<div class="flex flex-wrap items-center justify-center ">
<div x-show="activeTab === 'form'" class="w-4/5 ">
<form>
<!-- Server Key -->
<div class="mb-4 flex items-center">
......@@ -72,7 +110,8 @@
class="w-3/4 p-2 border border-gray-300 rounded-md">
@foreach ($customerTypes as $type)
<option value="{{ is_object($type) ? $type->id : $type['id'] }}">
{{ is_object($type) ? $type->sizeTypeName : $type['sizeTypeName'] }}</option>
{{ is_object($type) ? $type->sizeTypeName : $type['sizeTypeName'] }}
</option>
@endforeach
</select>
</div>
......@@ -80,15 +119,15 @@
<!-- Company -->
<div class="mb-4 flex items-center">
<label for="company" class="w-1/4 text-gray-700">Company</label>
<input type="text" id="company" class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="company">
<input type="text" id="company"
class="w-3/4 p-2 border border-gray-300 rounded-md" wire:model.defer="company">
</div>
<!-- Branch -->
<div class="mb-4 flex items-center">
<label for="branch" class="w-1/4 text-gray-700">Branch</label>
<input type="text" id="branch" class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="branch">
<input type="text" id="branch"
class="w-3/4 p-2 border border-gray-300 rounded-md" wire:model.defer="branch">
</div>
<!-- Status -->
......@@ -96,10 +135,14 @@
<label class="w-1/4 text-gray-700">Status</label>
<div class="flex items-center w-3/4">
<label class="mr-4">
<input type="radio" name="status" value="Y" wire:model.defer="status"> Yes
<input type="radio" name="status" value="Y"
wire:model.defer="status">
Yes
</label>
<label>
<input type="radio" name="status" value="N" wire:model.defer="status"> No
<input type="radio" name="status" value="N"
wire:model.defer="status">
No
</label>
</div>
</div>
......@@ -107,7 +150,8 @@
<!-- Licensedate -->
<div class="mb-4 flex items-center">
<label for="licenseDate" class="w-1/4 text-gray-700">License Date</label>
<input type="date" id="licenseDate" class="w-3/4 p-2 border border-gray-300 rounded-md"
<input type="date" id="licenseDate"
class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="licenseDate">
</div>
......@@ -128,21 +172,24 @@
<div class="mb-4 flex items-center">
<label for="currentVersion" class="w-1/4 text-gray-700">Version ปัจจุบัน</label>
<input type="text" id="currentVersion"
class="w-3/4 p-2 border border-gray-300 rounded-md" wire:model.defer="currentVersion">
class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="currentVersion">
</div>
<!-- วันที่ไป Install -->
<div class="mb-4 flex items-center">
<label for="installDate" class="w-1/4 text-gray-700">วันที่ไป Install</label>
<input type="date" id="installDate"
class="w-3/4 p-2 border border-gray-300 rounded-md" wire:model.defer="installDate">
class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="installDate">
</div>
<!-- Version ที่ลงครั้งแรก -->
<div class="mb-4 flex items-center">
<label for="installVersion" class="w-1/4 text-gray-700">Version ที่ลงครั้งแรก</label>
<input type="text" id="installVersion"
class="w-3/4 p-2 border border-gray-300 rounded-md" wire:model.defer="installVersion">
class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="installVersion">
</div>
<!-- Database Type -->
......@@ -188,19 +235,21 @@
<div class="mb-4 flex items-center">
<label for="customerUrl" class="w-1/4 text-gray-700">URL / IP Address</label>
<input type="text" id="customerUrl"
class="w-3/4 p-2 border border-gray-300 rounded-md" wire:model.defer="customerUrl">
class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="customerUrl">
</div>
<!-- Contact -->
<div class="mb-4 flex items-center">
<label for="contact" class="w-1/4 text-gray-700">Contact</label>
<input type="text" id="contact" class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="contact">
<input type="text" id="contact"
class="w-3/4 p-2 border border-gray-300 rounded-md" wire:model.defer="contact">
</div>
<!-- Contact Customer Name -->
<div class="mb-4 flex items-center">
<label for="contactCustomerName" class="w-1/4 text-gray-700">Contact Customer Name</label>
<label for="contactCustomerName" class="w-1/4 text-gray-700">Contact Customer
Name</label>
<input type="text" id="contactCustomerName"
class="w-3/4 p-2 border border-gray-300 rounded-md"
wire:model.defer="contactCustomerName">
......@@ -213,10 +262,45 @@
</div>
</form>
</div>
</div>
<div x-show="activeTab === 'download'">
test
<div x-show="activeTab === 'organize'">
{{-- @if ($tab == 'organize') --}}
@include('livewire.pages.server-license.organize')
{{-- @endif --}}
</div>
<div x-show="activeTab === 'csvMapping'">
{{-- @if ($tab == 'csvMapping') --}}
@include('livewire.pages.server-license.csv-mapping')
{{-- @endif --}}
</div>
<div x-show="activeTab === 'printForm'">
{{-- @if ($tab == 'printForm') --}}
@include('livewire.pages.server-license.print-form')
{{-- @endif --}}
</div>
<div x-show="activeTab === 'userInterface'">
{{-- @if ($tab == 'userInterface') --}}
@include('livewire.pages.server-license.user-interface')
{{-- @endif --}}
</div>
<div x-show="activeTab === 'global'">
@if ($tab == 'global')
@include('livewire.pages.server-license.global')
@endif
</div>
{{-- <div x-show="activeTab === 'parameter'">
@if ($tab == 'parameter')
@include('livewire.pages.server-license.parameter')
@endif
</div>
<div x-show="activeTab === 'onload'">
@if ($tab == 'onload')
@include('livewire.pages.server-license.onload')
@endif
</div> --}}
</div>
</div>
......
<div class="p-4">
<div class="max-w-full mx-auto bg-white rounded-lg">
<!-- Table Section -->
<div class="overflow-x-auto p-4">
<table class="min-w-full bg-white border border-gray-300">
<thead>
<tr class="bg-slate-300 text-gray-700">
<th class="py-2 px-4 border-b">ID</th>
<th class="py-2 px-4 border-b">Page Code</th>
<th class="py-2 px-4 border-b">Name</th>
<th class="py-2 px-4 border-b">T Name</th>
<th class="py-2 px-4 border-b">Required</th>
<th class="py-2 px-4 border-b">Type</th>
<th class="py-2 px-4 border-b">Spec</th>
<th class="py-2 px-4 border-b">Manual</th>
<th class="py-2 px-4 border-b">User Note</th>
<th class="py-2 px-4 border-b">JS Before Focus</th>
<th class="py-2 px-4 border-b">Cannot Import</th>
<th class="py-2 px-4 border-b">F Name</th>
<th class="py-2 px-4 border-b">Report Flag</th>
<th class="py-2 px-4 border-b">Report Order By</th>
<th class="py-2 px-4 border-b">Report Condition</th>
<th class="py-2 px-4 border-b">Report Table</th>
<th class="py-2 px-4 border-b">Report Type</th>
<th class="py-2 px-4 border-b">Report Format</th>
<th class="py-2 px-4 border-b">Report Align</th>
<th class="py-2 px-4 border-b">User Default</th>
</tr>
</thead>
<tbody>
@if (count($userInterfaceList) > 0)
@foreach ($userInterfaceList['name'] as $index => $mapId)
<tr class="border-b">
<td class="py-2 px-4 border">{{ $index + 1 }}</td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.pageCode.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.name.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.tname.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.required.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.type.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.spec.{{ $index }}" /></td>
<td class="py-2 px-4 border w-2/4">
<textarea class="w-full p-1 border rounded" wire:model.defer="userInterfaceList.manual.{{ $index }}"></textarea>
</td>
<td class="py-2 px-4 border w-2/4">
<textarea class="w-full p-1 border rounded" wire:model.defer="userInterfaceList.user_note.{{ $index }}"></textarea>
</td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.js_before_focus.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.cannotImport.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.fname.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.reportFlag.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.reportOrderBy.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.reportCondition.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.reportTable.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.reportType.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.reportFormat.{{ $index }}" /></td>
<td class="py-2 px-4 border"><input type="text" class="w-full p-2 border border-gray-300 rounded-md" wire:model.defer="userInterfaceList.reportAlign.{{ $index }}" /></td>
<td class="py-2 px-4 border w-2/4">
<textarea class="w-full p-1 border rounded" wire:model.defer="userInterfaceList.user_default.{{ $index }}"></textarea>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="p-4">
<button wire:click="saveUserInterface" class="bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded">
Save
</button>
</div>
</div>
</div>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment