Enhancement version3

This commit is contained in:
seranjivi 2026-04-29 11:44:00 +05:30
parent 9e5088eb42
commit d7bd261cea

View File

@ -1196,7 +1196,7 @@ setAdditionalForecastMonths([
</th> </th>
{!shouldHideForecast && ( {!shouldHideForecast && (
<th colSpan="3" className="bg-[#F2ECCF] text-[#92722A] px-4 py-2 text-xs font-semibold uppercase text-center border border-[#E5E7EB]"> <th colSpan="3" className="bg-[#F2ECCF] text-[#92722A] px-4 py-2 text-xs font-semibold uppercase text-center border border-[#E5E7EB]">
{forecastLabel || 'Q3 2024'} (NEXT YEAR FORECAST) {forecastLabel || 'Q3 2024'} (NEXT QUARTER FORECAST)
</th> </th>
)} )}
</> </>
@ -1213,7 +1213,7 @@ setAdditionalForecastMonths([
</th> </th>
{!shouldHideForecast && ( {!shouldHideForecast && (
<th colSpan="3" className="bg-[#F2ECCF] text-[#92722A] px-4 py-2 text-xs font-semibold uppercase text-center border border-[#E5E7EB]"> <th colSpan="3" className="bg-[#F2ECCF] text-[#92722A] px-4 py-2 text-xs font-semibold uppercase text-center border border-[#E5E7EB]">
{forecastLabel || 'Q3 2024'} (NEXT YEAR FORECAST) {forecastLabel || 'Q3 2024'} (NEXT QUARTER FORECAST)
</th> </th>
)} )}
</> </>
@ -1414,7 +1414,7 @@ setAdditionalForecastMonths([
</td> </td>
{/* HISTORICAL Data (from API) */} {/* HISTORICAL Data (from API) */}
{(() => { {showPreviousNext && (() => {
const historicalData = getCurrentYearForecastData(product?.product?.id); const historicalData = getCurrentYearForecastData(product?.product?.id);
return ( return (
<> <>
@ -1535,6 +1535,7 @@ setAdditionalForecastMonths([
</td> </td>
{/* Next Year Forecast Month 1 */} {/* Next Year Forecast Month 1 */}
{!shouldHideForecast && (
<td className={`px-3 py-3 border border-[#E5E7EB] text-center ${getCellClass(product.current_quantity_period_three, product.forecast_quantity_period_one, false)} ${getBorderClass(product.current_quantity_period_three, product.forecast_quantity_period_one, false)}`}> <td className={`px-3 py-3 border border-[#E5E7EB] text-center ${getCellClass(product.current_quantity_period_three, product.forecast_quantity_period_one, false)} ${getBorderClass(product.current_quantity_period_three, product.forecast_quantity_period_one, false)}`}>
<div className="flex flex-col items-center justify-center"> <div className="flex flex-col items-center justify-center">
<span className="font-medium">{product.forecast_quantity_period_one || '0'}</span> <span className="font-medium">{product.forecast_quantity_period_one || '0'}</span>
@ -1544,8 +1545,10 @@ setAdditionalForecastMonths([
)} )}
</div> </div>
</td> </td>
)}
{/* Next Year Forecast Month 2 */} {/* Next Year Forecast Month 2 */}
{!shouldHideForecast && (
<td className={`px-3 py-3 border border-[#E5E7EB] text-center ${getCellClass(product.forecast_quantity_period_one, product.forecast_quantity_period_two, false)} ${getBorderClass(product.forecast_quantity_period_one, product.forecast_quantity_period_two, false)}`}> <td className={`px-3 py-3 border border-[#E5E7EB] text-center ${getCellClass(product.forecast_quantity_period_one, product.forecast_quantity_period_two, false)} ${getBorderClass(product.forecast_quantity_period_one, product.forecast_quantity_period_two, false)}`}>
<div className="flex flex-col items-center justify-center"> <div className="flex flex-col items-center justify-center">
<span className="font-medium">{product.forecast_quantity_period_two || '0'}</span> <span className="font-medium">{product.forecast_quantity_period_two || '0'}</span>
@ -1555,8 +1558,10 @@ setAdditionalForecastMonths([
)} )}
</div> </div>
</td> </td>
)}
{/* Next Year Forecast Month 3 */} {/* Next Year Forecast Month 3 */}
{!shouldHideForecast && (
<td className={`px-3 py-3 border border-[#E5E7EB] text-center ${getCellClass(product.forecast_quantity_period_two, product.forecast_quantity_period_three, false)} ${getBorderClass(product.forecast_quantity_period_two, product.forecast_quantity_period_three, false)}`}> <td className={`px-3 py-3 border border-[#E5E7EB] text-center ${getCellClass(product.forecast_quantity_period_two, product.forecast_quantity_period_three, false)} ${getBorderClass(product.forecast_quantity_period_two, product.forecast_quantity_period_three, false)}`}>
<div className="flex flex-col items-center justify-center"> <div className="flex flex-col items-center justify-center">
<span className="font-medium">{product.forecast_quantity_period_three || '0'}</span> <span className="font-medium">{product.forecast_quantity_period_three || '0'}</span>
@ -1566,6 +1571,7 @@ setAdditionalForecastMonths([
)} )}
</div> </div>
</td> </td>
)}
</> </>
)} )}
</tr> </tr>
@ -1637,7 +1643,7 @@ setAdditionalForecastMonths([
</td> </td>
{/* HISTORICAL Cost (from API) */} {/* HISTORICAL Cost (from API) */}
{(() => { {showPreviousNext && (() => {
const historicalData = getCurrentYearForecastData(product?.product?.id); const historicalData = getCurrentYearForecastData(product?.product?.id);
return ( return (
<> <>