Browse Source

수정 1차

home 5 months ago
parent
commit
a5e147bb54
1 changed files with 25 additions and 8 deletions
  1. 25 8
      src/pages/score/Sheet.tsx

+ 25 - 8
src/pages/score/Sheet.tsx

@@ -86,6 +86,15 @@ const extractDataFromWorkbook = (workbook: XLSX.WorkBook): Record<string, any[]>
   return result;
 };
 
+const columnWidths: Record<string, string> = {
+  발주처: "w-[15%]",
+  공사명: "w-[35%]",
+  계약금액: "w-[15%]",
+  계약일: "w-[11%]",
+  착공일: "w-[11%]",
+  준공일: "w-[13%]",
+};
+
 const Sheet: React.FC = () => {
   const [dataByYear, setDataByYear] = useState<Record<string, any[]>>({});
   const [activeTab, setActiveTab] = useState<string>("");
@@ -139,16 +148,24 @@ const Sheet: React.FC = () => {
           <div className="overflow-x-auto">
             <div className="overflow-y-auto max-h-[500px] sm:max-h-[600px] border border-gray-200 rounded-lg shadow-sm">
               <table className="min-w-full text-xs sm:text-sm table-fixed bg-white">
-              <thead>
+                <colgroup>
+                  <col className={columnWidths["발주처"]} />
+                  <col className={columnWidths["공사명"]} />
+                  <col className={columnWidths["계약금액"]} />
+                  <col className={columnWidths["계약일"]} />
+                  <col className={columnWidths["착공일"]} />
+                  <col className={columnWidths["준공일"]} />
+                </colgroup>
+                <thead>
                 <tr className="bg-blue-50 text-center sticky top-0 z-10">
-                  <th className="border-b border-r border-gray-200 px-2 py-3 w-[10%] bg-blue-50 font-semibold text-gray-700">발주처</th>
-                  <th className="border-b border-r border-gray-200 px-2 py-3 w-[40%] bg-blue-50 font-semibold text-gray-700">공사명</th>
-                  <th className="border-b border-r border-gray-200 px-2 py-3 w-[15%] bg-blue-50 font-semibold text-gray-700">계약금액</th>
-                  <th className="border-b border-r border-gray-200 px-2 py-3 w-[11%] bg-blue-50 font-semibold text-gray-700">계약일</th>
-                  <th className="border-b border-r border-gray-200 px-2 py-3 w-[11%] bg-blue-50 font-semibold text-gray-700">착공일</th>
-                  <th className="border-b border-gray-200 px-2 py-3 w-[13%] bg-blue-50 font-semibold text-gray-700">준공일</th>
+                  <th className="border-b border-r border-gray-200 px-2 py-3 bg-blue-50 font-semibold text-gray-700">발주처</th>
+                  <th className="border-b border-r border-gray-200 px-2 py-3 bg-blue-50 font-semibold text-gray-700">공사명</th>
+                  <th className="border-b border-r border-gray-200 px-2 py-3 bg-blue-50 font-semibold text-gray-700">계약금액</th>
+                  <th className="border-b border-r border-gray-200 px-2 py-3 bg-blue-50 font-semibold text-gray-700">계약일</th>
+                  <th className="border-b border-r border-gray-200 px-2 py-3 bg-blue-50 font-semibold text-gray-700">착공일</th>
+                  <th className="border-b border-gray-200 px-2 py-3 bg-blue-50 font-semibold text-gray-700">준공일</th>
                 </tr>
-              </thead>
+                </thead>
               <tbody>
                 {filteredRows.length > 0 ? (
                   filteredRows.slice(0, -1).map((row: any, index: number) => (