mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 13:55:45 +00:00
Merge branch 'development' of gitlab.com:mbugroup/lti-web-client into dev/restu
This commit is contained in:
@@ -96,11 +96,6 @@ const ClosingProductionDataTabContent = ({
|
||||
value={formatNumber(purchase.feed_used)}
|
||||
unit='Kg'
|
||||
/>
|
||||
<DataRow
|
||||
label='Pakan Terpakai per Ekor'
|
||||
value={formatNumber(purchase.feed_used_per_head)}
|
||||
unit='Kg'
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -124,14 +119,12 @@ const ClosingProductionDataTabContent = ({
|
||||
/>
|
||||
<DataRow
|
||||
label='Bobot Rata-Rata'
|
||||
value={formatNumber(sales.chicken.average_weight)}
|
||||
value={formatNumber(sales.chicken.avg_weight)}
|
||||
unit='Kg/Ekor'
|
||||
/>
|
||||
<DataRow
|
||||
label='Harga Jual Rata-Rata'
|
||||
value={formatNumber(
|
||||
sales.chicken.chicken_average_selling_price
|
||||
)}
|
||||
value={formatNumber(sales.chicken.avg_selling_price)}
|
||||
unit='Rupiah'
|
||||
/>
|
||||
</div>
|
||||
@@ -148,17 +141,17 @@ const ClosingProductionDataTabContent = ({
|
||||
/>
|
||||
<DataRow
|
||||
label='Telur (Kg)'
|
||||
value={formatNumber(sales.egg.egg_mass_kg)}
|
||||
value={formatNumber(sales.egg.egg_mass)}
|
||||
unit='Kg'
|
||||
/>
|
||||
<DataRow
|
||||
label='Berat Telur Rata-Rata'
|
||||
value={formatNumber(sales.egg.average_egg_weight_kg)}
|
||||
value={formatNumber(sales.egg.avg_egg_weight)}
|
||||
unit='Kg'
|
||||
/>
|
||||
<DataRow
|
||||
label='Harga Jual Telur Rata-Rata'
|
||||
value={formatNumber(sales.egg.egg_average_selling_price)}
|
||||
value={formatNumber(sales.egg.avg_selling_price)}
|
||||
unit='Rupiah'
|
||||
/>
|
||||
</div>
|
||||
@@ -191,17 +184,37 @@ const ClosingProductionDataTabContent = ({
|
||||
/>
|
||||
<DataRow
|
||||
label='Mortalitas Std'
|
||||
value={formatNumber(performance.mortality_std)}
|
||||
value={formatNumber(performance.mor_std)}
|
||||
unitClassName='hidden'
|
||||
/>
|
||||
<DataRow
|
||||
label='Mortalitas Act'
|
||||
value={formatNumber(performance.mortality_act)}
|
||||
value={formatNumber(performance.mor_act)}
|
||||
unitClassName='hidden'
|
||||
/>
|
||||
<DataRow
|
||||
label='DEFF Mortalitas'
|
||||
value={formatNumber(performance.deff_mortality)}
|
||||
value={formatNumber(performance.mor_diff)}
|
||||
unitClassName='hidden'
|
||||
/>
|
||||
<DataRow
|
||||
label='AWG Std'
|
||||
value={formatNumber(performance.awg_std)}
|
||||
unit='Gr/Hari'
|
||||
/>
|
||||
<DataRow
|
||||
label='AWG Act'
|
||||
value={formatNumber(performance.awg_act)}
|
||||
unit='Gr/Hari'
|
||||
/>
|
||||
<DataRow
|
||||
label='Feed Intake Std'
|
||||
value={formatNumber(performance.feed_intake_std)}
|
||||
unitClassName='hidden'
|
||||
/>
|
||||
<DataRow
|
||||
label='Feed Intake Act'
|
||||
value={formatNumber(performance.feed_intake)}
|
||||
unitClassName='hidden'
|
||||
/>
|
||||
<DataRow
|
||||
@@ -216,14 +229,70 @@ const ClosingProductionDataTabContent = ({
|
||||
/>
|
||||
<DataRow
|
||||
label='DEFF FCR'
|
||||
value={formatNumber(performance.deff_fcr)}
|
||||
value={formatNumber(performance.fcr_diff)}
|
||||
unitClassName='hidden'
|
||||
/>
|
||||
<DataRow
|
||||
label='AWG'
|
||||
value={formatNumber(performance.awg)}
|
||||
unit='Gr/Hari'
|
||||
/>
|
||||
|
||||
{/* Laying Specific Fields */}
|
||||
{performance.hen_day_act !== undefined && (
|
||||
<>
|
||||
<DataRow
|
||||
label='Hen Day Std'
|
||||
value={formatNumber(performance.hen_day_std!)}
|
||||
unit='%'
|
||||
/>
|
||||
<DataRow
|
||||
label='Hen Day Act'
|
||||
value={formatNumber(performance.hen_day_act)}
|
||||
unit='%'
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
{performance.egg_mass !== undefined && (
|
||||
<>
|
||||
<DataRow
|
||||
label='Egg Mass Std'
|
||||
value={formatNumber(performance.egg_mass_std!)}
|
||||
unit='Kg'
|
||||
/>
|
||||
<DataRow
|
||||
label='Egg Mass Act'
|
||||
value={formatNumber(performance.egg_mass)}
|
||||
unit='Kg'
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
{performance.egg_weight !== undefined && (
|
||||
<>
|
||||
<DataRow
|
||||
label='Egg Weight Std'
|
||||
value={formatNumber(performance.egg_weight_std!)}
|
||||
unit='Gr'
|
||||
/>
|
||||
<DataRow
|
||||
label='Egg Weight Act'
|
||||
value={formatNumber(performance.egg_weight)}
|
||||
unit='Gr'
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
{performance.hen_housed_act !== undefined && (
|
||||
<>
|
||||
<DataRow
|
||||
label='Hen Housed Std'
|
||||
value={formatNumber(performance.hen_housed_std!)}
|
||||
unit='%'
|
||||
/>
|
||||
<DataRow
|
||||
label='Hen Housed Act'
|
||||
value={formatNumber(performance.hen_housed_act)}
|
||||
unit='%'
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -162,7 +162,7 @@ const FinanceDetail = ({ finance }: { finance: Finance }) => {
|
||||
</Button>
|
||||
</RequirePermission>
|
||||
)}
|
||||
<RequirePermission permissions='lti.finance.transaction.delete'>
|
||||
<RequirePermission permissions='lti.finance.transactions.delete'>
|
||||
<Button
|
||||
color='error'
|
||||
className='min-w-24'
|
||||
|
||||
@@ -49,7 +49,7 @@ const RowOptionsMenu = ({
|
||||
}) => {
|
||||
return (
|
||||
<RowOptionsMenuWrapper type={type}>
|
||||
<RequirePermission permissions='lti.finance.transaction.detail'>
|
||||
<RequirePermission permissions='lti.finance.transactions.detail'>
|
||||
<Button
|
||||
href={`/finance/detail?financeId=${props.row.original.id}`}
|
||||
variant='ghost'
|
||||
@@ -109,7 +109,7 @@ const RowOptionsMenu = ({
|
||||
</RequirePermission>
|
||||
)}
|
||||
|
||||
<RequirePermission permissions='lti.finance.transaction.delete'>
|
||||
<RequirePermission permissions='lti.finance.transactions.delete'>
|
||||
<Button
|
||||
onClick={deleteClickHandler}
|
||||
variant='ghost'
|
||||
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
import { ProjectFlockKandang } from '@/types/api/production/project-flock-kandang';
|
||||
import { isResponseError } from '@/lib/api-helper';
|
||||
import Pagination from '@/components/Pagination';
|
||||
import { ProductionResultReportApi } from '@/services/api/report/production-result';
|
||||
|
||||
const ProductionResultContent = () => {
|
||||
const [projectFlockKandangs, setProjectFlockKandangs] = useState<
|
||||
@@ -145,8 +146,11 @@ const ProductionResultContent = () => {
|
||||
|
||||
const exportToExcelHandler = async () => {
|
||||
setIsLoadingExportingToExcel(true);
|
||||
// TODO: Implement export functionality in API service first if needed
|
||||
toast.error('Fitur export belum tersedia');
|
||||
|
||||
await ProductionResultReportApi.exportProductionResultToExcel(
|
||||
projectFlockKandangs
|
||||
);
|
||||
|
||||
setIsLoadingExportingToExcel(false);
|
||||
};
|
||||
|
||||
@@ -319,7 +323,13 @@ const ProductionResultContent = () => {
|
||||
align='end'
|
||||
direction='bottom'
|
||||
trigger={
|
||||
<Button>
|
||||
<Button
|
||||
disabled={
|
||||
!selectedArea ||
|
||||
!selectedLocation ||
|
||||
!selectedProjectFlock
|
||||
}
|
||||
>
|
||||
Export{' '}
|
||||
<Icon
|
||||
icon='heroicons-outline:download'
|
||||
|
||||
+1
-1
@@ -352,7 +352,7 @@ const ProductionResultProjectFlockKandangTable = ({
|
||||
productionResults?.data?.length === 0,
|
||||
}),
|
||||
headerColumnClassName:
|
||||
'px-4 py-3 border-base-content/10 text-base-content/50',
|
||||
'px-4 py-3 border-x border-base-content/10 text-base-content/50',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user