removed unused components
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { StyleSheet, View } from "react-native";
|
||||
import { GET_LINE_TICKET_BY_PK } from "../../graphql/jobs.queries";
|
||||
import ErrorDisplay from "../error-display/error-display.component";
|
||||
import { useQuery } from "@apollo/client";
|
||||
import { connect } from "react-redux";
|
||||
|
||||
export function LaborAllocationsTableContainer({ jobId }) {
|
||||
// console.log("LaborAllocationsTableContainer, jobId", jobId);
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(GET_LINE_TICKET_BY_PK, {
|
||||
variables: { id: jobId },
|
||||
skip: !!!jobId,
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
});
|
||||
// console.log("LaborAllocationsTableContainer, data", data);
|
||||
if (error) return <ErrorDisplay errorMessage={error.message} />;
|
||||
|
||||
return (
|
||||
<View>
|
||||
{data ? (
|
||||
<LaborAllocationsTableContainer
|
||||
loading={loading}
|
||||
refetch={refetch}
|
||||
jobId={jobId}
|
||||
joblines={data ? data.joblines : []}
|
||||
timetickets={data ? data.timetickets : []}
|
||||
adjustments={data ? data.jobs_by_pk.lbr_adjustments : []}
|
||||
/>
|
||||
) : null}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const localStyles = StyleSheet.create({});
|
||||
export default connect(null, null)(LaborAllocationsTableContainer);
|
||||
Reference in New Issue
Block a user