Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sarun Mungthanya
SpnPatch-Laravel
Commits
c2410d6e
Commit
c2410d6e
authored
Jan 02, 2025
by
Sarun Mungthanya
Browse files
fix:issue prod
parent
3dca194a
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/SmartUpdateController.php
View file @
c2410d6e
...
@@ -259,6 +259,10 @@ class SmartUpdateController extends Controller
...
@@ -259,6 +259,10 @@ class SmartUpdateController extends Controller
$file_name_0
=
''
;
$file_name_0
=
''
;
$file_data_0
=
''
;
$file_data_0
=
''
;
}
}
if
(
!
isset
(
$file_name_0
))
{
$file_name_0
=
''
;
$file_data_0
=
''
;
}
$patchCodeServer
=
str_replace
(
'Query2Var'
,
'static::Query2Var'
,
$patchDetails
->
PATCHCODE_SERVER
);
$patchCodeServer
=
str_replace
(
'Query2Var'
,
'static::Query2Var'
,
$patchDetails
->
PATCHCODE_SERVER
);
$patchCodeServer
=
str_replace
(
'Query2SQL'
,
'static::Query2SQL'
,
$patchCodeServer
);
$patchCodeServer
=
str_replace
(
'Query2SQL'
,
'static::Query2SQL'
,
$patchCodeServer
);
if
(
$checkExchangeRate
!==
false
)
{
if
(
$checkExchangeRate
!==
false
)
{
...
@@ -293,7 +297,7 @@ class SmartUpdateController extends Controller
...
@@ -293,7 +297,7 @@ class SmartUpdateController extends Controller
eval
(
'$patchCode=<<<EOF2'
.
chr
(
13
)
.
$patchCode
.
chr
(
13
)
.
'EOF2;'
.
chr
(
13
));
eval
(
'$patchCode=<<<EOF2'
.
chr
(
13
)
.
$patchCode
.
chr
(
13
)
.
'EOF2;'
.
chr
(
13
));
$patchCode
=
str_replace
(
'#'
,
'$'
,
$patchCode
);
$patchCode
=
str_replace
(
'#'
,
'$'
,
$patchCode
);
$patchCode
=
iconv
(
"UTF-8"
,
"TIS-620"
,
$patchCode
);
if
(
isset
(
$mode
)
&&
$mode
===
'AUTO'
)
{
if
(
isset
(
$mode
)
&&
$mode
===
'AUTO'
)
{
$pid
=
DB
::
table
(
'conf_server_pendding as t0'
)
$pid
=
DB
::
table
(
'conf_server_pendding as t0'
)
->
join
(
'conf_smartupdate as t1'
,
't0.PatchID'
,
'='
,
't1.PID'
)
->
join
(
'conf_smartupdate as t1'
,
't0.PatchID'
,
'='
,
't1.PID'
)
...
...
resources/views/livewire/pages/send-patch/delete-multi-patch-list.blade.php
View file @
c2410d6e
...
@@ -25,6 +25,19 @@
...
@@ -25,6 +25,19 @@
Livewire.on('updateSelectPatchAfterDeleted', () => {
Livewire.on('updateSelectPatchAfterDeleted', () => {
this.clearAllSelections();
this.clearAllSelections();
});
});
Livewire.hook('message.processed', () => {
this.loadSelectedPatch();
this.resetCheckAllCheckbox();
this.bindCheckboxEvents();
});
},
bindCheckboxEvents() {
const checkboxes = document.querySelectorAll('.individual-checkbox');
checkboxes.forEach((checkbox) => {
checkbox.addEventListener('click', (event) => {
this.updateSelectedPatch(event);
});
});
},
},
toggleAllCheckboxes(event) {
toggleAllCheckboxes(event) {
const checkboxes = document.querySelectorAll('.individual-checkbox');
const checkboxes = document.querySelectorAll('.individual-checkbox');
...
@@ -90,7 +103,7 @@
...
@@ -90,7 +103,7 @@
.length;
.length;
}
}
}"
x-init=
"$watch('selectedPatch', () => resetCheckAllCheckbox())"
class=
"w-full mb-6"
>
}"
x-init=
"$watch('selectedPatch', () => resetCheckAllCheckbox())"
class=
"w-full mb-6"
>
<div
class=
"p-6 bg-white shadow-md rounded-lg"
>
<div
class=
"p-6 bg-white shadow-md rounded-lg"
>
<div
x-show=
"true"
class=
""
>
<div
x-show=
"true"
class=
""
>
<div
class=
"flex justify-end mb-5"
>
<div
class=
"flex justify-end mb-5"
>
...
@@ -128,36 +141,36 @@
...
@@ -128,36 +141,36 @@
<div
class=
"mt-3 "
>
<div
class=
"mt-3 "
>
<div
class=
"is-scrollbar-hidden min-w-full table-responsive"
>
<div
class=
"is-scrollbar-hidden min-w-full table-responsive"
>
<table
aria-describedby=
"mydesc"
class=
"is-hoverable table w-full text-left"
>
<table
aria-describedby=
"mydesc"
class=
"is-hoverable table w-full text-left"
>
<thead>
<thead>
<tr>
<tr>
<th
scope=
"col"
<th
scope=
"col"
class=
"whitespace-nowrap rounded-tl-lg bg-slate-200 px-4 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-5"
>
class=
"whitespace-nowrap rounded-tl-lg bg-slate-200 px-4 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-5"
>
<input
<input
class=
"form-checkbox is-basic h-4 w-4 rounded border-slate-400/70 checked:bg-primary checked:border-primary hover:border-primary focus:border-primary dark:bg-navy-900 dark:border-navy-500 dark:checked:bg-accent dark:checked:border-accent dark:hover:border-accent dark:focus:border-accent"
class=
"form-checkbox is-basic h-4 w-4 rounded border-slate-400/70 checked:bg-primary checked:border-primary hover:border-primary focus:border-primary dark:bg-navy-900 dark:border-navy-500 dark:checked:bg-accent dark:checked:border-accent dark:hover:border-accent dark:focus:border-accent"
type=
"checkbox"
id=
"check-all"
@
click=
"toggleAllCheckboxes"
/>
type=
"checkbox"
id=
"check-all"
@
click=
"toggleAllCheckboxes"
/>
</th>
</th>
<th
scope=
"col"
<th
scope=
"col"
class=
"whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
class=
"whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
Patch ID
Patch ID
</th>
</th>
<th
scope=
"col"
<th
scope=
"col"
class=
"whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
class=
"whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
Patch Name
Patch Name
</th>
</th>
<th
scope=
"col"
<th
scope=
"col"
class=
"whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
class=
"whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
Description
Description
</th>
</th>
<th
scope=
"col"
<th
scope=
"col"
class=
"whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
class=
"whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
Server
Server
</th>
</th>
<th
scope=
"col"
<th
scope=
"col"
class=
"whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
class=
"whitespace-nowrap bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
Date
Date
</th>
</th>
<th
scope=
"col"
<th
scope=
"col"
class=
"whitespace-nowrap rounded-tr-lg bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
class=
"whitespace-nowrap rounded-tr-lg bg-slate-200 px-2 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-2"
>
Remark
Remark
</th>
</th>
...
...
resources/views/livewire/pages/send-patch/send-patch-edit.blade.php
View file @
c2410d6e
...
@@ -13,8 +13,12 @@
...
@@ -13,8 +13,12 @@
});
});
},
},
serverKeySelect(id, value) {
serverKeySelect(id, value) {
console.log('Selected:', id, value);
if (!this.serverKeyWaitingSend.some(item => item.id == id)) {
if (!this.serverKeyWaitingSend.some(item => item.id == id)) {
this.serverKeyWaitingSend.push({ id, value });
this.serverKeyWaitingSend.push({ id, value });
console.log('Added:', this.serverKeyWaitingSend);
} else {
this.serverKeyWaitingSend = this.serverKeyWaitingSend.filter(item => item.id !== id);
}
}
},
},
removeServerKey(id) {
removeServerKey(id) {
...
@@ -63,8 +67,8 @@
...
@@ -63,8 +67,8 @@
<div
class=
"relative flex items-center w-full"
>
<div
class=
"relative flex items-center w-full"
>
<input
type=
"text"
<input
type=
"text"
class=
"form-input h-9 peer w-full rounded-lg border border-slate-300 bg-transparent px-3 py-2 placeholder:text-slate-400/70 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent"
class=
"form-input h-9 peer w-full rounded-lg border border-slate-300 bg-transparent px-3 py-2 placeholder:text-slate-400/70 hover:border-slate-400 focus:border-primary dark:border-navy-450 dark:hover:border-navy-400 dark:focus:border-accent"
wire:model.debounce.1000ms=
"serverkey"
wire:model.debounce.1000ms=
"serverkey"
placeholder=
"Search for a server key"
>
placeholder=
"Search for a server key"
>
<span
wire:loading
<span
wire:loading
wire:target=
"serverkey, selectedOwnerType, company, db_type, cur_ver, selectAllResults"
wire:target=
"serverkey, selectedOwnerType, company, db_type, cur_ver, selectAllResults"
class=
"absolute right-3"
>
class=
"absolute right-3"
>
...
@@ -79,24 +83,19 @@
...
@@ -79,24 +83,19 @@
</span>
</span>
</div>
</div>
@if ($showSearch)
<ul
x-show=
"open"
@
click.away=
"open = false"
<ul
x-show=
"open"
@
click.away=
"open = false"
class=
"absolute left-0 right-0 border border-gray-200 rounded-md max-h-64 overflow-auto z-50 bg-white"
>
class=
"absolute left-0 right-0 border border-gray-200 rounded-md max-h-64 overflow-auto z-50 bg-white"
>
<li
class=
"p-2 bg-gray-200 hover:bg-gray-300 cursor-pointer font-semibold"
<li
class=
"p-2 bg-gray-200 hover:bg-gray-300 cursor-pointer font-semibold"
{{
--
wire:click=
"selectAllResults"
--
}}
@
click=
"serverKeySelectAll()"
>
{{
--
wire:click=
"selectAllResults"
--
}}
@
click=
"serverKeySelectAll()"
>
Select All
Select All
</li>
<template
x-for=
"key in allKeys"
:key=
"key.ID"
>
<li
class=
"p-2 hover:bg-gray-100 cursor-pointer active:bg-[#065f46]"
@
click=
"serverKeySelect(key.ID, key.SNKEY)"
>
<span
x-text=
"key.SNKEY"
></span>
</li>
</li>
@forelse($resultsServerkey as $result)
</template>
<li
class=
"p-2 hover:bg-gray-100 cursor-pointer active:bg-[#065f46]"
</ul>
@
click=
"serverKeySelect('{{ $result->ID }}', '{{ $result->SNKEY }}')"
value=
"{{ $result->SNKEY }}"
>
{{ $result->SNKEY }}
</li>
@empty
<li
class=
"p-2 text-gray-500"
>
No results found
</li>
@endforelse
</ul>
@endif
</div>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment