Package cleanup & transition to latest apollo.

This commit is contained in:
Patrick Fic
2021-02-24 08:48:55 -08:00
parent 359edea97c
commit 46014261d6
202 changed files with 31740 additions and 1174 deletions

View File

@@ -1,14 +1,16 @@
import { useMutation, useQuery } from "@apollo/react-hooks";
import { useMutation, useQuery } from "@apollo/client";
import { notification } from "antd";
import React, { useState } from "react";
//import SpinComponent from "../../components/loading-spinner/loading-spinner.component";
import { useTranslation } from "react-i18next";
import AlertComponent from "../../components/alert/alert.component";
import { logImEXEvent } from "../../firebase/firebase.utils";
import { DELETE_NOTE, QUERY_NOTES_BY_JOB_PK } from "../../graphql/notes.queries";
import {
DELETE_NOTE,
QUERY_NOTES_BY_JOB_PK,
} from "../../graphql/notes.queries";
import JobNotesComponent from "./jobs.notes.component";
export default function JobNotesContainer({ jobId }) {
const { loading, error, data, refetch } = useQuery(QUERY_NOTES_BY_JOB_PK, {
variables: { id: jobId },

View File

@@ -7,9 +7,9 @@ import {
import { Button, Table } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import Moment from "react-moment";
import { connect } from "react-redux";
import { setModalContext } from "../../redux/modals/modals.actions";
import { DateTimeFormatter } from "../../utils/DateFormatter";
import NoteUpsertModal from "../note-upsert-modal/note-upsert-modal.container";
const mapDispatchToProps = (dispatch) => ({
@@ -58,9 +58,7 @@ export function JobNotesComponent({
width: 200,
sorter: (a, b) => new Date(a.updated_at) - new Date(b.updated_at),
render: (text, record) => (
<span>
<Moment format="MM/DD/YYYY @ HH:mm">{record.updated_at}</Moment>
</span>
<DateTimeFormatter>{record.updated_at}</DateTimeFormatter>
),
},
{