misya #2

Closed
Naz wants to merge 2 commits from misya into Beta_1.2
3 changed files with 17 additions and 9 deletions
Showing only changes of commit b297be7fe6 - Show all commits

View File

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

View File

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

View File

@ -190,7 +190,7 @@
// Populate the table with initial data
this.updateDataTable(this.sortedFilteredData);
//auto-filtering => search bar
//auto-filtering
$('#tarballTable_filter input').on('keyup', function () {
self.dataTable.search(this.value).draw();
});
@ -210,14 +210,12 @@
});
},
watch: {
//runs on auto when month/year dropdowns changed
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);
//2. CLEAR THE SEARCH BOX: if table exist, clear anything typed in the search bar
//Like pressing 'clear' on a calculator after getting new numbers
//trigger search function after updating data(?)
if(this.dataTable) {
this.dataTable.search('').draw(); //empty the search box
this.dataTable.search('').draw();
}
}
}