Revert "clean"

This reverts commit 100a4adff6.
This commit is contained in:
misya 2025-07-04 10:46:32 +08:00
parent 100a4adff6
commit b297be7fe6
3 changed files with 17 additions and 9 deletions

View File

@ -1,7 +1,14 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using PSTW_CentralSystem.DBContext; using PSTW_CentralSystem.DBContext;
//using PSTW_CentralSystem.Areas.MMS.Models;
//using System.IO;
//using System.Linq;
using PSTW_CentralSystem.Areas.MMS.Models.PDFGenerator; using PSTW_CentralSystem.Areas.MMS.Models.PDFGenerator;
using QuestPDF.Fluent; using QuestPDF.Fluent;
//using System.Threading.Tasks;
//using System.Threading;
//using System.Collections.Generic;
//using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using MySqlConnector; using MySqlConnector;

View File

@ -1,13 +1,16 @@
using QuestPDF.Fluent; using QuestPDF.Fluent;
using QuestPDF.Infrastructure; using QuestPDF.Infrastructure;
using QuestPDF.Helpers; using QuestPDF.Helpers;
using Google.Protobuf.WellKnownTypes;
using PSTW_CentralSystem.Models;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal;
namespace PSTW_CentralSystem.Areas.MMS.Models.PDFGenerator namespace PSTW_CentralSystem.Areas.MMS.Models.PDFGenerator
{ {
public class TarBallPDF(string stateName, string stationID, string locationName, public class TarBallPDF(string stateName, string stationID, string locationName,
string longitude, string latitude, DateTime dateSample, TimeSpan timeSample, string classifyID, string longitude, string latitude, DateTime dateSample, TimeSpan timeSample,
bool tarBallYes, bool tarBallNo, bool isSand, bool isNonSandy, bool isCoquina, string classifyID, bool tarBallYes, bool tarBallNo, bool isSand, bool isNonSandy,
string photoPath1, string photoPath2, string photoPath3, string photoPath4, bool isCoquina, string photoPath1, string photoPath2, string photoPath3, string photoPath4,
string? photoPath5, string? photoPath6, string? photoPath7, string? photoPath8, string? photoPath5, string? photoPath6, string? photoPath7, string? photoPath8,
string? optionalName1, string? optionalName2, string? optionalName3, string? optionalName4, string? optionalName1, string? optionalName2, string? optionalName3, string? optionalName4,
string firstSampler, string fullName, string levelName string firstSampler, string fullName, string levelName

View File

@ -190,7 +190,7 @@
// Populate the table with initial data // Populate the table with initial data
this.updateDataTable(this.sortedFilteredData); this.updateDataTable(this.sortedFilteredData);
//auto-filtering => search bar //auto-filtering
$('#tarballTable_filter input').on('keyup', function () { $('#tarballTable_filter input').on('keyup', function () {
self.dataTable.search(this.value).draw(); self.dataTable.search(this.value).draw();
}); });
@ -210,14 +210,12 @@
}); });
}, },
watch: { watch: {
//runs on auto when month/year dropdowns changed
sortedFilteredData(newData) { sortedFilteredData(newData) {
//1. UPDATE THE TABLE: take the new filtered list (newData) and put it in the table // Automatically update DataTables whenever the filtered data changes
this.updateDataTable(newData); this.updateDataTable(newData);
//2. CLEAR THE SEARCH BOX: if table exist, clear anything typed in the search bar //trigger search function after updating data(?)
//Like pressing 'clear' on a calculator after getting new numbers
if(this.dataTable) { if(this.dataTable) {
this.dataTable.search('').draw(); //empty the search box this.dataTable.search('').draw();
} }
} }
} }