Some checks are pending
		
		
	
	Build Nginx-based docker image / build-static-assets (push) Waiting to run
				
			
		
			
				
	
	
		
			40 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| /* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/
 | |
| 
 | |
| 'use client';
 | |
| 
 | |
| import { AbstractApi } from '@/app/api/abstract-api';
 | |
| import { TableSimulation, TableSimulationSerializer } from '@/app/lib/tableSimulation';
 | |
| import Arrangement from '@/app/ui/arrangements/arrangement';
 | |
| import ArrangementsTable from '@/app/ui/arrangements/arrangements-table';
 | |
| import CalculatingSummary from '@/app/ui/arrangements/calculating-summary';
 | |
| import { classNames } from '@/app/ui/components/button';
 | |
| import { Toast } from 'primereact/toast';
 | |
| import React, { useEffect, useRef, useState } from 'react';
 | |
| 
 | |
| export default function Page() {
 | |
| 
 | |
| 
 | |
|   const [currentArrangement, setCurrentArrangement] = useState<string | null>(null);
 | |
| 
 | |
| 
 | |
| 
 | |
|   return (
 | |
|     <>
 | |
|       <div className="flex flex-row w-full gap-4">
 | |
|         <div className="flex-1 border rounded-lg">
 | |
|           <ArrangementsTable onArrangementSelected={setCurrentArrangement} />
 | |
|         </div>
 | |
|         <div className="flex-1 border rounded-lg p-5 shadow-md">
 | |
|           <CalculatingSummary />
 | |
|         </div>
 | |
|         <div className="flex-1 border rounded-lg p-5 shadow-md">
 | |
|           <p className="text-lg font-semibold mb-4">Inventory</p>
 | |
|         </div>
 | |
|       </div>
 | |
| 
 | |
|       <>
 | |
|         {currentArrangement && <Arrangement key={currentArrangement} id={currentArrangement} />}
 | |
|       </>
 | |
|     </>
 | |
|   )
 | |
| } |