1 Commits

Author SHA1 Message Date
e501e91673 Update dependency althinect/filament-spatie-roles-permissions to v3
Some checks failed
renovate/artifacts Artifact file update failure
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Laravel Pint / pint (pull_request) Failing after 1m57s
Laravel Larastan / larastan (pull_request) Failing after 2m5s
2026-02-22 08:38:36 +00:00
3 changed files with 43 additions and 45 deletions

View File

@@ -48,7 +48,6 @@ class ProductionPlanResource extends Resource
Section::make('')
->schema([
Forms\Components\Select::make('plant_id')
->label('Plant')
->relationship('plant', 'name')
->required()
// ->nullable()
@@ -80,7 +79,6 @@ class ProductionPlanResource extends Resource
->hint(fn ($get) => $get('ppPlantError') ? $get('ppPlantError') : null)
->hintColor('danger'),
Forms\Components\Select::make('line_id')
->label('Line')
->relationship('line', 'name')
->required()
// ->nullable()
@@ -439,7 +437,7 @@ class ProductionPlanResource extends Resource
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('line.name')
->label('Line')
->label('Plant')
->alignCenter()
->sortable()
->searchable(),

View File

@@ -8,7 +8,7 @@
"require": {
"php": "^8.2",
"alperenersoy/filament-export": "^3.0",
"althinect/filament-spatie-roles-permissions": "^2.3",
"althinect/filament-spatie-roles-permissions": "^3.0",
"erag/laravel-pwa": "^1.9",
"filament/filament": "^3.3",
"intervention/image": "^3.11",

View File

@@ -64,57 +64,57 @@ document.addEventListener('DOMContentLoaded', function () {
});
function updateWorkingDays(date) {
let totalDays = new Date(
date.getFullYear(),
date.getMonth()+1,
0
).getDate();
let workingDays = totalDays - selectedDates.length;
// document.querySelector('input[name="working_days"]').value = workingDays;
const input = document.querySelector('#working_days');
input.value = workingDays;
input.dispatchEvent(new Event('input'));
const monthInput = document.querySelector('#month');
monthInput.value = date.getMonth() + 1; // 112 month number
monthInput.dispatchEvent(new Event('input'));
const yearInput = document.querySelector('#year');
yearInput.value = date.getFullYear();
yearInput.dispatchEvent(new Event('input'));
const selectedDatesInput = document.querySelector('#selected_dates');
selectedDatesInput.value = selectedDates.join(',');
selectedDatesInput.dispatchEvent(new Event('input'));
}
// function updateWorkingDays(date) {
// let totalDays = new Date(
// date.getFullYear(),
// date.getMonth() + 1,
// date.getMonth()+1,
// 0
// ).getDate();
// let workingDays = totalDays - selectedDates.length;
// // document.querySelector('input[name="working_days"]').value = workingDays;
// // Set values only
// document.querySelector('#working_days').value = workingDays;
// document.querySelector('#month').value = date.getMonth() + 1;
// document.querySelector('#year').value = date.getFullYear();
// document.querySelector('#selected_dates').value = selectedDates.join(',');
// const input = document.querySelector('#working_days');
// input.value = workingDays;
// input.dispatchEvent(new Event('input'));
// const monthInput = document.querySelector('#month');
// monthInput.value = date.getMonth() + 1; // 112 month number
// monthInput.dispatchEvent(new Event('input'));
// const yearInput = document.querySelector('#year');
// yearInput.value = date.getFullYear();
// yearInput.dispatchEvent(new Event('input'));
// const selectedDatesInput = document.querySelector('#selected_dates');
// selectedDatesInput.value = selectedDates.join(',');
// selectedDatesInput.dispatchEvent(new Event('input'));
// // Trigger only ONE update (important)
// document
// .querySelector('#selected_dates')
// .dispatchEvent(new Event('input'));
// }
function updateWorkingDays(date) {
let totalDays = new Date(
date.getFullYear(),
date.getMonth() + 1,
0
).getDate();
let workingDays = totalDays - selectedDates.length;
// Set values only
document.querySelector('#working_days').value = workingDays;
document.querySelector('#month').value = date.getMonth() + 1;
document.querySelector('#year').value = date.getFullYear();
document.querySelector('#selected_dates').value = selectedDates.join(',');
// Trigger only ONE update (important)
document
.querySelector('#selected_dates')
.dispatchEvent(new Event('input'));
}
calendar.render();
});