rename cost into value
This commit is contained in:
parent
84cbf5025a
commit
d73acd947b
@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { ChevronLeft, ChevronRight, Pause } from 'lucide-react';
|
||||
import { CalendarDays, Clock3 } from 'lucide-react';
|
||||
import { GrTasks } from "react-icons/gr";
|
||||
import { fetchSubmissionDetail } from '@/services/submissions/submissionService';
|
||||
|
||||
const SurveyCarousel = ({
|
||||
@ -57,6 +58,7 @@ const SurveyCarousel = ({
|
||||
</span>
|
||||
|
||||
<span className="flex items-center gap-1">
|
||||
<GrTasks size={14} className="text-[#92722A] flex-shrink-0" />
|
||||
<span className="font-semibold">Status:</span>
|
||||
<span className="font-medium">{current?.status || '—'}</span>
|
||||
</span>
|
||||
|
||||
@ -425,7 +425,7 @@ export const DetailedOverview = ({ submission, onBack }) => {
|
||||
'Product',
|
||||
'Unit',
|
||||
'Quantity',
|
||||
'Cost(AED)',
|
||||
'Value (AED)',
|
||||
'Status',
|
||||
'Submission Date & Time',
|
||||
'Action'
|
||||
@ -436,7 +436,7 @@ export const DetailedOverview = ({ submission, onBack }) => {
|
||||
'Product': '1%',
|
||||
'Unit': '15%',
|
||||
'Quantity': '10%',
|
||||
'Cost(AED)': '10%',
|
||||
'Value (AED)': '10%',
|
||||
'Status': '15%',
|
||||
'Submission Date & Time': '15%',
|
||||
'Action': { width: '10%', className: 'justify-start' }
|
||||
|
||||
@ -523,7 +523,7 @@ const ProductDetails = ({
|
||||
{/* Cost Row */}
|
||||
<tr>
|
||||
<td className="border border-gray-300 py-2 px-3 text-left font-medium">
|
||||
Cost (AED)
|
||||
Value (AED)
|
||||
</td>
|
||||
<td className="border border-gray-300 py-2">{formattedProduct.q4_oct_cost}</td>
|
||||
<td className="border border-gray-300 py-2">{formattedProduct.q4_nov_cost}</td>
|
||||
|
||||
@ -1760,7 +1760,7 @@ useEffect(() => {
|
||||
</div>
|
||||
)}
|
||||
<div className="flex justify-between items-center mb-2">
|
||||
<h2 className="text-xl font-semibold text-[#232528]">Step 2: Product Data — Monthly Output & Cost</h2>
|
||||
<h2 className="text-xl font-semibold text-[#232528]">Step 2: Product Data — Monthly Output & Value</h2>
|
||||
{(() => {
|
||||
// Try to get survey period from localStorage first
|
||||
const savedSurveyPeriod = localStorage.getItem('currentSurveyPeriod');
|
||||
@ -1829,7 +1829,7 @@ useEffect(() => {
|
||||
<div className="text-[#6C4527] space-y-2">
|
||||
<h3 className="text-base font-semibold mb-2">Why we collect monthly product data</h3>
|
||||
<p className="text-sm mb-4">
|
||||
This step collects <strong>monthly output quantity and production cost</strong> for each product you manufacture or process. The data inform the <strong>Index of Industrial Production (IIP)</strong> and capacity-utilization statistics. Results are published <strong>only in aggregated form</strong> and your information is protected by national statistics confidentiality provisions.
|
||||
This step collects <strong>monthly output quantity and production value</strong> for each product you manufacture or process. The data inform the <strong>Index of Industrial Production (IIP)</strong> and capacity-utilization statistics. Results are published <strong>only in aggregated form</strong> and your information is protected by national statistics confidentiality provisions.
|
||||
</p>
|
||||
|
||||
<div className="flex gap-2 text-sm">
|
||||
@ -1869,7 +1869,7 @@ useEffect(() => {
|
||||
<div className="flex items-center space-x-1">
|
||||
<img src={nextIcon} alt="" className="h-4 w-4 ml-2" />
|
||||
<span className="font-medium">What you'll do:</span>
|
||||
<span>Add products → select HS code & unit → enter monthly Qty & Cost →set next-quarter targets.</span>
|
||||
<span>Add products → select HS code & unit → enter monthly Qty & Value →set next-quarter targets.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1899,7 +1899,7 @@ useEffect(() => {
|
||||
<h3 className="font-semibold mb-4 text-base">Data definitions</h3>
|
||||
<p className="mb-3"><strong>Product (HS Code – Name):</strong> Standard trade classification. Start typing to search by code or name.</p>
|
||||
<p className="mb-3"><strong>Quantity (Qty):</strong> Physical output produced in the month, measured in the selected unit.</p>
|
||||
<p className="mb-3"><strong>Value (AED <img src={uae_currency} alt="AED" className="inline-block w-5 h-5 -mt-0.5" />):</strong> Total production cost for that month for a single product, excluding VAT/ duties. sales value for that product - VAT.</p>
|
||||
<p className="mb-3"><strong>Value (AED <img src={uae_currency} alt="AED" className="inline-block w-5 h-5 -mt-0.5" />):</strong> Total production value for that month for a single product, excluding VAT/ duties. sales value for that product - VAT.</p>
|
||||
<p className="mb-0"><strong>Annual Installed Capacity:</strong> Maximum achievable annual output under normal operating conditions with existing equipment; do not include extraordinary overtime.</p>
|
||||
</div>
|
||||
)}
|
||||
@ -1909,7 +1909,7 @@ useEffect(() => {
|
||||
<div className="bg-[#F2ECCF] rounded-md p-4 text-[#6C4527] text-sm">
|
||||
<h3 className="font-semibold mb-4 text-base">Entry rules & validation</h3>
|
||||
<p className="mb-3"><strong>Mandatory:</strong> All fields in this step are required except "Reason for variation/0 Target" and free-text Notes.</p>
|
||||
<p className="mb-3"><strong>Monthly entries:</strong> Enter Qty and Cost for each month in the Current and Forecast quarters. Use 0 where there is no output or cost.</p>
|
||||
<p className="mb-3"><strong>Monthly entries:</strong> Enter Qty and Value for each month in the Current and Forecast quarters. Use 0 where there is no output or value.</p>
|
||||
<p className="mb-3"><strong>Number only:</strong> Use a decimal point where needed. No negative values.</p>
|
||||
<p className="mb-3"><strong>Units:</strong> Use one measurement unit per product across all months.</p>
|
||||
{/* <p className="mb-0"><strong>Delete:</strong> Removing a product here affects this survey only; it does not change your profile.</p> */}
|
||||
|
||||
@ -1108,7 +1108,7 @@ if (!establishment) {
|
||||
{/* Cost Row */}
|
||||
<tr>
|
||||
<td className="border border-gray-300 py-2 px-3 text-left font-medium">
|
||||
Cost (AED)
|
||||
Value (AED)
|
||||
</td>
|
||||
<td className="border border-gray-300 py-2">{product.q4_oct_cost || '—'}</td>
|
||||
<td className="border border-gray-300 py-2">{product.q4_nov_cost || '—'}</td>
|
||||
|
||||
@ -165,7 +165,7 @@ const ProductChart = ({ product, establishmentId }) => {
|
||||
// Cost bars
|
||||
{
|
||||
type: 'bar',
|
||||
label: 'Cost (AED)',
|
||||
label: 'Value (AED)',
|
||||
data: costData,
|
||||
backgroundColor: backgroundColors,
|
||||
borderColor: backgroundColors.map(c => c.replace('0.8', '1')),
|
||||
@ -198,7 +198,7 @@ const ProductChart = ({ product, establishmentId }) => {
|
||||
position: 'left',
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Total Cost (AED)',
|
||||
text: 'Total Value (AED)',
|
||||
font: {
|
||||
weight: 'bold'
|
||||
}
|
||||
@ -1511,7 +1511,7 @@ setAdditionalForecastMonths([
|
||||
|
||||
<tr className="border-t border-[#E5E7EB]">
|
||||
<td className="bg-[#FFFCF2] px-4 py-3 font-medium text-[#232528] border border-[#E5E7EB]">
|
||||
Cost (AED)
|
||||
Value (AED)
|
||||
</td>
|
||||
|
||||
{showPreviousNext ? (
|
||||
|
||||
@ -812,6 +812,8 @@ const EditCompanyProfile = () => {
|
||||
width="100%"
|
||||
required
|
||||
readOnly
|
||||
disabled
|
||||
style={{ pointerEvents: 'none' }}
|
||||
error={fieldErrors.contactEmirate}
|
||||
/>
|
||||
<SelectField
|
||||
|
||||
@ -303,7 +303,7 @@ const showToast = (message, type = 'success') => {
|
||||
const downloadCsv = React.useCallback(() => {
|
||||
if (!filteredRows.length) return;
|
||||
|
||||
const headers = ['Year', 'Quarter', 'Submission Window', 'Total Products', 'Products Submitted', 'Total Cost (AED)', 'Status', 'Date Submitted', 'Action'];
|
||||
const headers = ['Year', 'Quarter', 'Submission Window', 'Total Products', 'Products Submitted', 'Total Value (AED)', 'Status', 'Date Submitted', 'Action'];
|
||||
const csvRows = [headers.join(',')];
|
||||
|
||||
filteredRows.forEach((record) => {
|
||||
@ -467,7 +467,7 @@ const showToast = (message, type = 'success') => {
|
||||
</div>
|
||||
<section className="bg-white rounded-lg border border-[#E2E8F0] shadow-sm">
|
||||
<Table
|
||||
headers={['Year', 'Quarter', 'Submission Window', 'Total Products', 'Products Submitted', 'Total Cost (AED)', 'Status', 'Date Submitted', 'Action']}
|
||||
headers={['Year', 'Quarter', 'Submission Window', 'Total Products', 'Products Submitted', 'Total Value (AED)', 'Status', 'Date Submitted', 'Action']}
|
||||
rows={rows}
|
||||
beforeHeader={toolbar}
|
||||
separated
|
||||
|
||||
@ -100,7 +100,7 @@ const Overview = () => {
|
||||
|
||||
const downloadCsv = React.useCallback(() => {
|
||||
if (!filteredRows.length) return;
|
||||
const headers = ['Year', 'Quarter', 'Submission Window', 'Total Products', 'Products Submitted', 'Total Cost (AED)', 'Status', 'Date Submitted'];
|
||||
const headers = ['Year', 'Quarter', 'Submission Window', 'Total Products', 'Products Submitted', 'Total Value (AED)', 'Status', 'Date Submitted'];
|
||||
const csvRows = [headers.join(',')];
|
||||
filteredRows.forEach((record) => {
|
||||
csvRows.push([
|
||||
@ -202,7 +202,7 @@ const Overview = () => {
|
||||
</div>
|
||||
<section className="bg-white rounded-lg border border-[#E2E8F0] shadow-sm">
|
||||
<Table
|
||||
headers={['Year', 'Quarter', 'Submission Window', 'Total Products', 'Products Submitted', 'Total Cost (AED)', 'Status', 'Date Submitted', 'Action']}
|
||||
headers={['Year', 'Quarter', 'Submission Window', 'Total Products', 'Products Submitted', 'Total Value (AED)', 'Status', 'Date Submitted', 'Action']}
|
||||
rows={rows}
|
||||
beforeHeader={toolbar}
|
||||
separated
|
||||
|
||||
Loading…
Reference in New Issue
Block a user