Changed HTML position
This commit is contained in:
1 parent
a9cd16d987
commit
5703606488
2 files changed
+9
-7
No files matched your search
@@ -225,22 +225,24 @@ class Projected extends Component
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateRow() {
|
public function updateRow(): void
|
||||||
|
{
|
||||||
$post = \App\Models\Post::whereHas('category', function ($query) {
|
$post = \App\Models\Post::whereHas('category', function ($query) {
|
||||||
return $query->where('user_id', \Auth::user()->id);
|
return $query->where('user_id', \Auth::user()->id);
|
||||||
})->where("id", $this->rowPostID)->first();
|
})->where("id", $this->rowPostID)->first();
|
||||||
|
|
||||||
|
# edit name
|
||||||
if ($post->name !== $this->rowName) {
|
if ($post->name !== $this->rowName) {
|
||||||
$post->update(['name' => $this->rowName]);
|
$post->update(['name' => $this->rowName]);
|
||||||
$post->save();
|
$post->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
$value = null;
|
$value = null;
|
||||||
if($this->rowValue != null && trim($this->rowValue) != "" && is_numeric(trim($this->rowValue))) {
|
if($this->rowValue !== null && trim($this->rowValue) !== "" && is_numeric(trim($this->rowValue))) {
|
||||||
$value = floatval($this->rowValue);
|
$value = (float)$this->rowValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($post != null && $value !== null) {
|
if($post !== null && $value !== null) {
|
||||||
for($m=1;$m<=12;$m++) {
|
for($m=1;$m<=12;$m++) {
|
||||||
$post->setMonthValue($m, $value);
|
$post->setMonthValue($m, $value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,12 +223,12 @@
|
|||||||
<div class="inline-block align-bottom bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-sm sm:w-full sm:p-6">
|
<div class="inline-block align-bottom bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-sm sm:w-full sm:p-6">
|
||||||
<div>
|
<div>
|
||||||
<div class="mt-1 text-center sm:mt-1">
|
<div class="mt-1 text-center sm:mt-1">
|
||||||
<h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title-2">
|
<h3 class="text-lg leading-6 font-medium text-gray-900 mb-2" id="modal-title-2">
|
||||||
|
{{$rowName}} for ({{$fieldMonthName}})
|
||||||
|
</h3>
|
||||||
<label for="set-title">
|
<label for="set-title">
|
||||||
{{$fieldName}} for ({{$fieldMonthName}}) <br>
|
|
||||||
<input id="set-title" name="title" type="text" wire:model.defer="rowName" class="form-input px-2 py-2 rounded-md w-10/12" />
|
<input id="set-title" name="title" type="text" wire:model.defer="rowName" class="form-input px-2 py-2 rounded-md w-10/12" />
|
||||||
</label>
|
</label>
|
||||||
</h3>
|
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<p class="text-sm text-gray-500">
|
<p class="text-sm text-gray-500">
|
||||||
Set value for all months (<span>{!!$rowTypeHTML!!}</span>)<br>
|
Set value for all months (<span>{!!$rowTypeHTML!!}</span>)<br>
|
||||||
|
|||||||
Reference in new issue
Block a user