Browse Source

add test data

tags/Baseline_30082024_FRONTEND_UAT
leoho2fi 1 year ago
parent
commit
32459b4a1d
6 changed files with 69 additions and 0 deletions
  1. +11
    -0
      src/components/Report/ReportSearchBox/SearchBox.tsx
  2. +11
    -0
      src/components/Report/ReportSearchBox2/SearchBox2.tsx
  3. +11
    -0
      src/components/Report/ReportSearchBox3/SearchBox3.tsx
  4. +11
    -0
      src/components/Report/ReportSearchBox4/SearchBox4.tsx
  5. +11
    -0
      src/components/Report/ReportSearchBox5/SearchBox5.tsx
  6. +14
    -0
      src/components/Report/ReportSearchBox6/SearchBox6.tsx

+ 11
- 0
src/components/Report/ReportSearchBox/SearchBox.tsx View File

@@ -192,6 +192,17 @@ function SearchBox<T extends string>({
}
}

const firstTableData = [
['Column1', 'Column2', 'Column3'], // Row 1
['Data1', 'Data2', 'Data3'], // Row 2
// ... more rows as needed
];
// Find the last row of the first table
let lastRowOfFirstTable = 6; // Starting row for data in the first table
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) {
lastRowOfFirstTable++;
}

// Format filename with date
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD
const filename = `AR01_Late_Start_Report_${today}.xlsx`; // Append formatted date to the filename


+ 11
- 0
src/components/Report/ReportSearchBox2/SearchBox2.tsx View File

@@ -192,6 +192,17 @@ function SearchBox<T extends string>({
}
}

const firstTableData = [
['Column1', 'Column2', 'Column3'], // Row 1
['Data1', 'Data2', 'Data3'], // Row 2
// ... more rows as needed
];
// Find the last row of the first table
let lastRowOfFirstTable = 6; // Starting row for data in the first table
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) {
lastRowOfFirstTable++;
}

// Format filename with date
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD
const filename = `AR02_Delay_Report_${today}.xlsx`; // Append formatted date to the filename


+ 11
- 0
src/components/Report/ReportSearchBox3/SearchBox3.tsx View File

@@ -192,6 +192,17 @@ function SearchBox<T extends string>({
}
}

const firstTableData = [
['Column1', 'Column2', 'Column3'], // Row 1
['Data1', 'Data2', 'Data3'], // Row 2
// ... more rows as needed
];
// Find the last row of the first table
let lastRowOfFirstTable = 6; // Starting row for data in the first table
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) {
lastRowOfFirstTable++;
}

// Format filename with date
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD
const filename = `AR03_Resource_Overconsumption_${today}.xlsx`; // Append formatted date to the filename


+ 11
- 0
src/components/Report/ReportSearchBox4/SearchBox4.tsx View File

@@ -192,6 +192,17 @@ function SearchBox<T extends string>({
}
}

const firstTableData = [
['Column1', 'Column2', 'Column3'], // Row 1
['Data1', 'Data2', 'Data3'], // Row 2
// ... more rows as needed
];
// Find the last row of the first table
let lastRowOfFirstTable = 6; // Starting row for data in the first table
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) {
lastRowOfFirstTable++;
}

// Format filename with date
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD
const filename = `AR04_Cost_and_Expense_Report_${today}.xlsx`; // Append formatted date to the filename


+ 11
- 0
src/components/Report/ReportSearchBox5/SearchBox5.tsx View File

@@ -192,6 +192,17 @@ function SearchBox<T extends string>({
}
}

const firstTableData = [
['Column1', 'Column2', 'Column3'], // Row 1
['Data1', 'Data2', 'Data3'], // Row 2
// ... more rows as needed
];
// Find the last row of the first table
let lastRowOfFirstTable = 5; // Starting row for data in the first table
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) {
lastRowOfFirstTable++;
}

// Format filename with date
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD
const filename = `AR05_Project_Completion_Report_${today}.xlsx`; // Append formatted date to the filename


+ 14
- 0
src/components/Report/ReportSearchBox6/SearchBox6.tsx View File

@@ -192,6 +192,20 @@ function SearchBox<T extends string>({
}
}

const firstTableData = [
['Column1', 'Column2', 'Column3'], // Row 1
['Data1', 'Data2', 'Data3'], // Row 2
// ... more rows as needed
];
// Find the last row of the first table
let lastRowOfFirstTable = 5; // Starting row for data in the first table
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) {
lastRowOfFirstTable++;
}

// Insert the first data form into the worksheet at the desired location
XLSX.utils.sheet_add_aoa(worksheet, firstTableData, { origin: { c: 0, r: lastRowOfFirstTable } });

// Format filename with date
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD
const filename = `AR06_Project_Completion_Report_with_Outstanding_Un-billed_Hours_${today}.xlsx`; // Append formatted date to the filename


Loading…
Cancel
Save