Skip to content

Commit

Permalink
fixe sale issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mhShohan committed Feb 25, 2024
1 parent 2f8840f commit ebcaed4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@ jobs:
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: change to client directory
run: cd client

- name: Install Dependency
run: npm install
run: cd client && npm install

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
run: cd client && vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
run: cd client && vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
2 changes: 1 addition & 1 deletion client/src/components/modal/SaleModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import toastMessage from '../../lib/toastMessage';
import { useAppDispatch, useAppSelector } from '../../redux/hooks';
import { getSaleModal, getSaleModalData, toggleSaleModel } from '../../redux/services/modal.Slice';
import ModalInput from './ModalInput';
import { useCreateSaleMutation } from '../../redux/features/saleApi';
import { useCreateSaleMutation } from '../../redux/features/management/saleApi';

const SaleModal = () => {
const modalOpen = useAppSelector(getSaleModal);
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Col, Row } from 'antd';
import Loader from '../components/Loader';
import { useCountProductsQuery } from '../redux/features/management/productApi';
import { useYearlySaleQuery } from '../redux/features/saleApi';
import { useYearlySaleQuery } from '../redux/features/management/saleApi';

const Dashboard = () => {
const { data: products, isLoading } = useCountProductsQuery(undefined);
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/SaleHistoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
useMonthlySaleQuery,
useWeeklySaleQuery,
useYearlySaleQuery,
} from '../redux/features/saleApi';
} from '../redux/features/management/saleApi';

const SaleHistoryPage = () => {
const { data: yearlyData, isFetching: isYearlyDataFetching } = useYearlySaleQuery(undefined);
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/managements/SaleManagementPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { PaginationProps, TableColumnsType } from 'antd';
import { Button, Flex, Modal, Pagination, Table } from 'antd';
import { useState } from 'react';
import { FieldValues, useForm } from 'react-hook-form';
import { useGetAllSaleQuery } from '../../redux/features/saleApi';
import { useGetAllSaleQuery } from '../../redux/features/management/saleApi';
import { IProduct } from '../../types/product.types';
import { ITableSale } from '../../types/sale.type';
import formatDate from '../../utils/formatDate';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { baseApi } from "./baseApi";
import { baseApi } from "../baseApi";

const saleApi = baseApi.injectEndpoints({
endpoints: (builder) => ({
Expand Down

0 comments on commit ebcaed4

Please sign in to comment.