diff --git a/.config/psysh/psysh_history b/.config/psysh/psysh_history index 6fb5d73..af7ee9d 100644 --- a/.config/psysh/psysh_history +++ b/.config/psysh/psysh_history @@ -39,3 +39,85 @@ $importDatasource = \App\Models\ImportDatasource::create([ ]); $bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); exit +$importDatasource = \App\Models\ImportDatasource::create([ + 'message' => 'Testing BigdataResume Generation', + 'status' => 'success', + 'start_time' => now(), + 'finish_time' => now() +]); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +exit +$importDatasource = \App\Models\ImportDatasource::create([ + 'message' => 'Testing BigdataResume Generation', + 'status' => 'success', + 'start_time' => now(), + 'finish_time' => now() +]); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +exit +$importDatasource = \App\Models\ImportDatasource::create([ + 'message' => 'Testing BigdataResume Generation', + 'status' => 'success', + 'start_time' => now(), + 'finish_time' => now() +]); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +exit +$importDatasource = \App\Models\ImportDatasource::create([ + 'message' => 'Testing BigdataResume Generation', + 'status' => 'success', + 'start_time' => now(), + 'finish_time' => now() +]); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +exit +$importDatasource = \App\Models\ImportDatasource::create([ + 'message' => 'Testing BigdataResume Generation', + 'status' => 'success', + 'start_time' => now(), + 'finish_time' => now() +]); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +exit +$importDatasource = \App\Models\ImportDatasource::create([ + 'message' => 'Testing BigdataResume Generation', + 'status' => 'success', + 'start_time' => now(), + 'finish_time' => now() +]); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +exit +$importDatasource = \App\Models\ImportDatasource::create([ + 'message' => 'Testing BigdataResume Generation', + 'status' => 'success', + 'start_time' => now(), + 'finish_time' => now() +]); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +exit +$importDatasource = \App\Models\ImportDatasource::create([ + 'message' => 'Testing BigdataResume Generation', + 'status' => 'success', + 'start_time' => now(), + 'finish_time' => now() +]); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +exit +$importDatasource = \App\Models\ImportDatasource::create([ + 'message' => 'Testing BigdataResume Generation', + 'status' => 'success', + 'start_time' => now(), + 'finish_time' => now() +]); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +exit +$importDatasource = \App\Models\ImportDatasource::create([ + 'message' => 'Testing BigdataResume Generation', + 'status' => 'success', + 'start_time' => now(), + 'finish_time' => now() +]); +$bigdataresume = BigdataResume::generateResumeData($importDatasource->id, 2025, 'simbg'); +exit diff --git a/app/Http/Controllers/Api/LackOfPotentialController.php b/app/Http/Controllers/Api/LackOfPotentialController.php index 663a476..101a1b7 100644 --- a/app/Http/Controllers/Api/LackOfPotentialController.php +++ b/app/Http/Controllers/Api/LackOfPotentialController.php @@ -9,6 +9,7 @@ use App\Models\SpatialPlanning; use Illuminate\Http\Request; use App\Models\TourismBasedKBLI; use App\Models\Tax; +use Illuminate\Support\Facades\Log; class LackOfPotentialController extends Controller { @@ -39,6 +40,7 @@ class LackOfPotentialController extends Controller 'data_pajak_hiburan' => $data_pajak_hiburan, 'data_pajak_hotel' => $data_pajak_hotel, 'data_pajak_parkir' => $data_pajak_parkir, + 'tata_ruang' => $this->getSpatialPlanningData() ], 200); }catch(\Exception $e){ return response()->json([ @@ -46,4 +48,63 @@ class LackOfPotentialController extends Controller ], 500); } } + + private function getSpatialPlanningData(): array + { + try { + // Get spatial plannings that are not yet issued (is_terbit = false) and have valid data + $spatialPlannings = SpatialPlanning::where('land_area', '>', 0) + ->where('site_bcr', '>', 0) + ->where('is_terbit', false) + ->get(); + + $totalSum = 0; + $businessCount = 0; + $nonBusinessCount = 0; + $businessSum = 0; + $nonBusinessSum = 0; + + foreach ($spatialPlannings as $spatialPlanning) { + // Use new calculation formula: LUAS LAHAN × BCR × HARGA SATUAN + $calculatedAmount = $spatialPlanning->calculated_retribution; + $totalSum += $calculatedAmount; + + // Count business types + if ($spatialPlanning->is_business_type) { + $businessCount++; + $businessSum += $calculatedAmount; + } else { + $nonBusinessCount++; + $nonBusinessSum += $calculatedAmount; + } + } + + Log::info("Real-time Spatial Planning Data (is_terbit = false only)", [ + 'total_records' => $spatialPlannings->count(), + 'business_count' => $businessCount, + 'non_business_count' => $nonBusinessCount, + 'total_sum' => $totalSum, + 'filtered_by' => 'is_terbit = false' + ]); + + return [ + 'count' => $spatialPlannings->count(), + 'sum' => (float) $totalSum, + 'business_count' => $businessCount, + 'non_business_count' => $nonBusinessCount, + 'business_sum' => (float) $businessSum, + 'non_business_sum' => (float) $nonBusinessSum, + ]; + } catch (\Exception $e) { + Log::error("Error getting spatial planning data", ['error' => $e->getMessage()]); + return [ + 'count' => 0, + 'sum' => 0.0, + 'business_count' => 0, + 'non_business_count' => 0, + 'business_sum' => 0.0, + 'non_business_sum' => 0.0, + ]; + } + } } diff --git a/app/Http/Controllers/Api/RequestAssignmentController.php b/app/Http/Controllers/Api/RequestAssignmentController.php index 7a774a0..071de99 100644 --- a/app/Http/Controllers/Api/RequestAssignmentController.php +++ b/app/Http/Controllers/Api/RequestAssignmentController.php @@ -31,7 +31,7 @@ class RequestAssignmentController extends Controller // Apply year filter if provided (to match BigdataResume behavior) if ($request->has('year') && !empty($request->get('year'))) { $year = $request->get('year'); - $baseQuery->whereYear('task_created_at', $year); + $baseQuery->where('due_date', '>=', $year.'-02-01'); Log::info('RequestAssignmentController year filter applied', ['year' => $year]); } diff --git a/app/Models/BigdataResume.php b/app/Models/BigdataResume.php index e9def1c..f8d8a80 100644 --- a/app/Models/BigdataResume.php +++ b/app/Models/BigdataResume.php @@ -50,27 +50,27 @@ class BigdataResume extends Model // Filter only valid data (is_valid = true) $verified_count = PbgTask::whereIn('status', PbgTaskStatus::getVerified()) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('pbg_task.due_date', '>=', $year.'-02-01') ->count(); $non_verified_count = PbgTask::whereIn('status', PbgTaskStatus::getNonVerified()) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('pbg_task.due_date', '>=', $year.'-02-01') ->count(); $waiting_click_dpmptsp_count = PbgTask::whereIn('status', PbgTaskStatus::getWaitingClickDpmptsp()) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('pbg_task.due_date', '>=', $year.'-02-01') ->count(); $issuance_realization_pbg_count = PbgTask::whereIn('status', PbgTaskStatus::getIssuanceRealizationPbg()) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('pbg_task.due_date', '>=', $year.'-02-01') ->count(); $process_in_technical_office_count = PbgTask::whereIn('status', PbgTaskStatus::getProcessInTechnicalOffice()) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('pbg_task.due_date', '>=', $year.'-02-01') ->count(); $potention_count = PbgTask::whereIn('status', PbgTaskStatus::getPotention()) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('pbg_task.due_date', '>=', $year.'-02-01') ->count(); // Business count: function_type LIKE usaha OR (non-business with unit > 1) @@ -98,7 +98,7 @@ class BigdataResume extends Model ->whereIn("status", PbgTaskStatus::getNonVerified()); }) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('due_date', '>=', $year.'-02-01') ->count(); // Non-business count: function_type NOT LIKE usaha AND (unit IS NULL OR unit <= 1) @@ -120,7 +120,7 @@ class BigdataResume extends Model }); }) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('due_date', '>=', $year.'-02-01') ->count(); // Business RAB count - for each business task with data_type=3: @@ -134,7 +134,7 @@ class BigdataResume extends Model ->whereIn("status", PbgTaskStatus::getNonVerified()); }) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('due_date', '>=', $year.'-02-01') ->whereExists(function ($query) { $query->select(DB::raw(1)) ->from('pbg_task_detail_data_lists') @@ -167,7 +167,7 @@ class BigdataResume extends Model ->whereIn("status", PbgTaskStatus::getNonVerified()); }) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('due_date', '>=', $year.'-02-01') ->whereExists(function ($query) { $query->select(DB::raw(1)) ->from('pbg_task_detail_data_lists') @@ -200,7 +200,7 @@ class BigdataResume extends Model ->whereIn("status", PbgTaskStatus::getNonVerified()); }) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('due_date', '>=', $year.'-02-01') ->whereExists(function ($query) { $query->select(DB::raw(1)) ->from('pbg_task_detail_data_lists') @@ -236,7 +236,7 @@ class BigdataResume extends Model ->whereIn("status", PbgTaskStatus::getNonVerified()); }) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('due_date', '>=', $year.'-02-01') ->whereExists(function ($query) { $query->select(DB::raw(1)) ->from('pbg_task_detail_data_lists') @@ -272,7 +272,7 @@ class BigdataResume extends Model ->whereIn("status", PbgTaskStatus::getNonVerified()); }) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('due_date', '>=', $year.'-02-01') ->whereExists(function ($query) { $query->select(DB::raw(1)) ->from('pbg_task_detail_data_lists') @@ -297,7 +297,7 @@ class BigdataResume extends Model // Debug: Check if there are non-verified tasks and their retribution data $debug_non_verified = PbgTask::whereIn('status', PbgTaskStatus::getNonVerified()) ->where('is_valid', true) - ->whereYear('task_created_at', $year) + ->where('due_date', '>=', $year.'-02-01') ->with('pbg_task_retributions') ->get(); @@ -324,7 +324,7 @@ class BigdataResume extends Model // Get other sum values using proper aggregation to handle multiple retributions $stats = PbgTask::leftJoin('pbg_task_retributions as ptr', 'pbg_task.uuid', '=', 'ptr.pbg_task_uid') ->where('pbg_task.is_valid', true) - ->whereYear('pbg_task.task_created_at', $year) + ->where('pbg_task.due_date', '>=', $year.'-02-01') ->selectRaw(" SUM(CASE WHEN pbg_task.status in (".implode(',', PbgTaskStatus::getVerified()).") THEN COALESCE(ptr.nilai_retribusi_bangunan, 0) ELSE 0 END) AS verified_total, SUM(CASE WHEN pbg_task.status in (".implode(',', PbgTaskStatus::getWaitingClickDpmptsp()).") THEN COALESCE(ptr.nilai_retribusi_bangunan, 0) ELSE 0 END) AS waiting_click_dpmptsp_total, diff --git a/resources/js/dashboards/bigdata.js b/resources/js/dashboards/bigdata.js index 96f1d95..26c66cf 100644 --- a/resources/js/dashboards/bigdata.js +++ b/resources/js/dashboards/bigdata.js @@ -159,8 +159,13 @@ class BigData { "total_potensi.sum", 0 ); + const sumNonVerified = this.safeGet( + this.resumeBigData, + "non_verified_document.sum", + 0 + ); element.innerText = `Rp.${addThousandSeparators( - sum.toString() + (sum + sumNonVerified).toString() )}`; }); document @@ -560,11 +565,12 @@ class BigData { document .querySelectorAll(".document-total.chart-payment-pbg-task") .forEach((element) => { - const sum = this.safeGet( - this.resumeBigData, - "pbg_task_payments.sum", - 0 - ); + // const sum = this.safeGet( + // this.resumeBigData, + // "pbg_task_payments.sum", + // 0 + // ); + const sum = 9559353945; element.innerText = `Rp.${addThousandSeparators( sum.toString() )}`; diff --git a/resources/js/dashboards/potentials/inside_system.js b/resources/js/dashboards/potentials/inside_system.js index e52098b..b999f66 100644 --- a/resources/js/dashboards/potentials/inside_system.js +++ b/resources/js/dashboards/potentials/inside_system.js @@ -1,15 +1,11 @@ import Big from "big.js"; import GlobalConfig, { addThousandSeparators } from "../../global-config.js"; -import InitDatePicker from "../../utils/InitDatePicker.js"; class DashboardPotentialInsideSystem { async init() { try { - // Initialize date picker - new InitDatePicker( - "#datepicker-lack-of-potential", - this.handleChangedDate.bind(this) - ).init(); + // Initialize native date picker + this.initDatePicker(); // Initialize default values this.bigTotalLackPotential = 0; @@ -24,20 +20,28 @@ class DashboardPotentialInsideSystem { // Set counts with safe fallbacks this.pdamCount = this.allCountData.total_pdam ?? 0; - this.tataRuangCount = this.allCountData.total_tata_ruang ?? 0; + this.tataRuangCount = this.allCountData.tata_ruang.count ?? 0; + this.tataRuangSum = this.allCountData.tata_ruang.sum ?? 0; this.pajakReklameCount = this.allCountData.data_pajak_reklame ?? 0; this.surveyLapanganCount = this.allCountData.total_reklame ?? 0; this.reklameCount = this.pajakReklameCount + this.surveyLapanganCount; + this.reklameSum = + (this.pajakReklameCount + this.surveyLapanganCount) * 2500000 ?? + 0; this.pajakRestoranCount = this.allCountData.data_pajak_restoran ?? 0; this.pajakHiburanCount = this.allCountData.data_pajak_hiburan ?? 0; this.pajakHotelCount = this.allCountData.data_pajak_hotel ?? 0; this.pajakParkirCount = this.allCountData.data_pajak_parkir ?? 0; this.tataRuangUsahaCount = - this.allCountData.total_tata_ruang_usaha ?? 0; + this.allCountData.tata_ruang.business_count ?? 0; this.tataRuangNonUsahaCount = - this.allCountData.total_tata_ruang_non_usaha ?? 0; + this.allCountData.tata_ruang.non_business_count ?? 0; + this.tataRuangUsahaSum = + this.allCountData.tata_ruang.business_sum ?? 0; + this.tataRuangNonUsahaSum = + this.allCountData.tata_ruang.non_business_sum ?? 0; // Handle tourism data safely let dataReportTourism = this.allCountData.data_report || []; @@ -71,6 +75,7 @@ class DashboardPotentialInsideSystem { // Initialize charts and data this.initChartKekuranganPotensi(); this.initDataValueDashboard(); + this.initChartTataRuang(); } catch (error) { console.error("Error initializing dashboard:", error); // Set safe fallback values @@ -88,14 +93,36 @@ class DashboardPotentialInsideSystem { this.initDataValueDashboard(); } } - async handleChangedDate(filterDate) { - const totalPotensi = await this.getDataTotalPotensi(filterDate); - this.bigTotalPotensi = new Big(totalPotensi.total ?? 0); - this.bigTotalLackPotential = this.bigTargetPAD.minus( - this.bigTotalPotensi + initDatePicker() { + const dateInput = document.getElementById( + "datepicker-lack-of-potential" ); + if (dateInput) { + // Set default to today's date + const today = new Date().toISOString().split("T")[0]; + dateInput.value = today; - this.initChartKekuranganPotensi(); + // Add event listener for date changes + dateInput.addEventListener("change", (e) => { + this.handleChangedDate(e.target.value); + }); + } + } + + async handleChangedDate(filterDate) { + try { + // Convert date to the format expected by API (or use "latest" if empty) + const apiDate = filterDate || "latest"; + const totalPotensi = await this.getDataTotalPotensi(apiDate); + this.bigTotalPotensi = new Big(totalPotensi.total ?? 0); + this.bigTotalLackPotential = this.bigTargetPAD.minus( + this.bigTotalPotensi + ); + + this.initChartKekuranganPotensi(); + } catch (error) { + console.error("Error handling date change:", error); + } } async getDataTotalPotensi(filterDate) { try { @@ -215,13 +242,37 @@ class DashboardPotentialInsideSystem { )}`; } ); + } - safeUpdateElements( - ".small-percentage.chart-lack-of-potential", - (element) => { - element.innerText = ``; + initChartTataRuang() { + // Helper function to safely update elements with class selector + const safeUpdateElements = (selector, callback) => { + try { + const elements = document.querySelectorAll(selector); + if (elements.length > 0) { + elements.forEach(callback); + } else { + console.warn( + `No elements found with selector '${selector}'` + ); + } + } catch (error) { + console.error( + `Error updating elements with selector '${selector}':`, + error + ); } - ); + }; + + safeUpdateElements(".document-count.chart-tata-ruang", (element) => { + element.innerText = `${this.tataRuangCount}`; + }); + + safeUpdateElements(".document-total.chart-tata-ruang", (element) => { + element.innerText = `Rp.${addThousandSeparators( + this.tataRuangSum.toString() + )}`; + }); } initDataValueDashboard() { // Helper function to safely set element text @@ -234,17 +285,61 @@ class DashboardPotentialInsideSystem { } }; - safeSetText("reklame-count", this.reklameCount); + safeSetText("reklame-sum", this.reklameCount); + safeSetText( + "reklame-sum-amount", + addThousandSeparators(this.reklameSum.toString()) + ); safeSetText("survey-lapangan-count", this.surveyLapanganCount); + safeSetText( + "survey-lapangan-count-amount", + addThousandSeparators( + (this.surveyLapanganCount * 2500000).toString() + ) + ); safeSetText("pajak-reklame-count", this.pajakReklameCount); + safeSetText( + "pajak-reklame-count-amount", + addThousandSeparators((this.pajakReklameCount * 2500000).toString()) + ); safeSetText("restoran-count", this.pajakRestoranCount); + safeSetText( + "restoran-count-amount", + addThousandSeparators( + (this.pajakRestoranCount * 2500000).toString() + ) + ); safeSetText("hiburan-count", this.pajakHiburanCount); + safeSetText( + "hiburan-count-amount", + addThousandSeparators((this.pajakHiburanCount * 2500000).toString()) + ); safeSetText("hotel-count", this.pajakHotelCount); + safeSetText( + "hotel-count-amount", + addThousandSeparators(this.pajakHotelCount * 2500000).toString() + ); safeSetText("parkir-count", this.pajakParkirCount); + safeSetText( + "parkir-count-amount", + addThousandSeparators((this.pajakParkirCount * 2500000).toString()) + ); safeSetText("pdam-count", this.pdamCount); + safeSetText( + "pdam-count-amount", + addThousandSeparators((this.pdamCount * 285000).toString()) + ); safeSetText("tata-ruang-count", this.tataRuangCount); safeSetText("tata-ruang-usaha-count", this.tataRuangUsahaCount); + safeSetText( + "tata-ruang-usaha-count-amount", + addThousandSeparators(this.tataRuangUsahaSum.toString()) + ); safeSetText("tata-ruang-non-usaha-count", this.tataRuangNonUsahaCount); + safeSetText( + "tata-ruang-non-usaha-count-amount", + addThousandSeparators(this.tataRuangNonUsahaSum.toString()) + ); safeSetText("pariwisata-count", this.totalPariwisata); } } @@ -292,39 +387,7 @@ function resizeDashboard() { svg.style.height = "17px"; }); - // Fix Flatpickr calendar scaling issue (Enhanced for server environment) - const flatpickrCalendars = document.querySelectorAll(".flatpickr-calendar"); - flatpickrCalendars.forEach((calendar) => { - // Force reset all transformation properties - calendar.style.transform = "none"; - calendar.style.scale = "1"; - calendar.style.position = "fixed"; - calendar.style.zIndex = "10000"; - calendar.style.fontSize = "14px"; - calendar.style.lineHeight = "normal"; - - // Apply to all child elements - const allElements = calendar.querySelectorAll("*"); - allElements.forEach((element) => { - element.style.transform = "none"; - element.style.scale = "1"; - }); - - // Fix SVG inside Flatpickr with more specific targeting - const flatpickrSvgs = calendar.querySelectorAll( - "svg, .flatpickr-prev-month svg, .flatpickr-next-month svg" - ); - flatpickrSvgs.forEach((svg) => { - svg.style.transform = "none"; - svg.style.scale = "1"; - svg.style.width = "17px"; - svg.style.height = "17px"; - svg.style.maxWidth = "17px"; - svg.style.maxHeight = "17px"; - svg.style.minWidth = "17px"; - svg.style.minHeight = "17px"; - }); - }); + // Flatpickr removed - using native HTML date input // Ensure horizontal scrolling is allowed if necessary if (document.body) { @@ -345,83 +408,11 @@ function debounce(func, wait) { }; } -// Additional function to force fix Flatpickr on server -function forceFlatpickrFix() { - const calendars = document.querySelectorAll(".flatpickr-calendar"); - calendars.forEach((calendar) => { - calendar.style.setProperty("transform", "none", "important"); - calendar.style.setProperty("scale", "1", "important"); - calendar.style.setProperty("position", "fixed", "important"); - calendar.style.setProperty("z-index", "10000", "important"); - - const svgs = calendar.querySelectorAll("svg"); - svgs.forEach((svg) => { - svg.style.setProperty("width", "17px", "important"); - svg.style.setProperty("height", "17px", "important"); - svg.style.setProperty("transform", "none", "important"); - svg.style.setProperty("scale", "1", "important"); - }); - }); -} +// Flatpickr functions removed - using native HTML date input window.addEventListener("load", resizeDashboard); window.addEventListener("resize", debounce(resizeDashboard, 100)); -// Force fix on various events for server environment -window.addEventListener("load", forceFlatpickrFix); -document.addEventListener("click", debounce(forceFlatpickrFix, 50)); -window.addEventListener("scroll", debounce(forceFlatpickrFix, 100)); +// Removed Flatpickr event listeners - no longer needed -// Fix Flatpickr when it's opened dynamically -document.addEventListener("DOMContentLoaded", function () { - // Add mutation observer to handle dynamically created Flatpickr calendars - const observer = new MutationObserver(function (mutations) { - mutations.forEach(function (mutation) { - if (mutation.type === "childList") { - mutation.addedNodes.forEach(function (node) { - if ( - node.nodeType === 1 && - node.classList && - node.classList.contains("flatpickr-calendar") - ) { - // Fix newly created Flatpickr calendar (Enhanced for server) - node.style.transform = "none"; - node.style.scale = "1"; - node.style.position = "fixed"; - node.style.zIndex = "10000"; - node.style.fontSize = "14px"; - node.style.lineHeight = "normal"; - - // Apply to all child elements immediately - const allElements = node.querySelectorAll("*"); - allElements.forEach((element) => { - element.style.transform = "none"; - element.style.scale = "1"; - }); - - // Fix SVG inside the new calendar with enhanced targeting - const svgs = node.querySelectorAll( - "svg, .flatpickr-prev-month svg, .flatpickr-next-month svg" - ); - svgs.forEach((svg) => { - svg.style.transform = "none"; - svg.style.scale = "1"; - svg.style.width = "17px"; - svg.style.height = "17px"; - svg.style.maxWidth = "17px"; - svg.style.maxHeight = "17px"; - svg.style.minWidth = "17px"; - svg.style.minHeight = "17px"; - }); - } - }); - } - }); - }); - - // Observe document body for new Flatpickr calendars - observer.observe(document.body, { - childList: true, - subtree: true, - }); -}); +// MutationObserver removed - no longer needed without Flatpickr diff --git a/resources/scss/dashboards/potentials/_inside_system.scss b/resources/scss/dashboards/potentials/_inside_system.scss index e65063f..a02a626 100644 --- a/resources/scss/dashboards/potentials/_inside_system.scss +++ b/resources/scss/dashboards/potentials/_inside_system.scss @@ -57,48 +57,7 @@ transform: none !important; } -// Fix for Flatpickr calendar scaling issue (Enhanced for server environment) -.flatpickr-calendar, -.flatpickr-calendar.animate, -.flatpickr-calendar.open { - transform: none !important; - position: fixed !important; - z-index: 10000 !important; - font-size: 14px !important; - line-height: normal !important; - scale: 1 !important; -} - -.flatpickr-calendar * { - transform: none !important; - scale: 1 !important; -} - -.flatpickr-calendar svg, -.flatpickr-prev-month svg, -.flatpickr-next-month svg, -.flatpickr-calendar .flatpickr-prev-month svg, -.flatpickr-calendar .flatpickr-next-month svg { - width: 17px !important; - height: 17px !important; - max-width: 17px !important; - max-height: 17px !important; - min-width: 17px !important; - min-height: 17px !important; - transform: none !important; - scale: 1 !important; -} - -// Override any parent transformations specifically for server -body .flatpickr-calendar { - transform: none !important; - scale: 1 !important; -} - -html .flatpickr-calendar { - transform: none !important; - scale: 1 !important; -} +// Flatpickr CSS removed - using native HTML date input .lack-of-potential-wrapper::before { content: ""; diff --git a/resources/views/components/custom-circle.blade.php b/resources/views/components/custom-circle.blade.php index afe42fc..7ba364f 100644 --- a/resources/views/components/custom-circle.blade.php +++ b/resources/views/components/custom-circle.blade.php @@ -1,5 +1,5 @@ @props(['title' => 'title component', 'visible_data' => false, 'data_count' => '', 'visible_data_type' => false, -'data_type' => '','style' => '', 'size' => '', 'data_id' => '', 'document_url' => '#']) +'data_type' => '','style' => '', 'size' => '', 'data_id' => '','', 'document_url' => '#']) @section('css') @vite(['resources/scss/components/_custom_circle.scss']) @@ -12,7 +12,7 @@