fix: run linter
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { Mutex } from "async-mutex"
|
||||
import { useState } from "react"
|
||||
import styled from "styled-components"
|
||||
import useAsyncEffect from "use-async-effect"
|
||||
import { GetItemHistory } from "../client/controllers"
|
||||
import { ItemHistoryResponse } from "../client/response"
|
||||
import styled from "styled-components"
|
||||
|
||||
type ItemHistoryTableProps = {
|
||||
itemId: number
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Mutex } from "async-mutex"
|
||||
import useAsyncEffect from "use-async-effect"
|
||||
import { useItemStore } from "../providers/ItemsProvider"
|
||||
import { Mutex } from "async-mutex"
|
||||
import { ItemTableListRow } from "./ItemTableListRow"
|
||||
|
||||
const itemApiMutex = new Mutex()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Mutex } from "async-mutex"
|
||||
import { useState } from "react"
|
||||
import styled from "styled-components"
|
||||
import { ItemPriceResponse } from "../client/response"
|
||||
import { ItemHistoryTable } from "./ItemHistoryTable"
|
||||
import useAsyncEffect from "use-async-effect"
|
||||
import { useItemStore } from "../providers/ItemsProvider"
|
||||
import { Mutex } from "async-mutex"
|
||||
import { useCurrentAuthenticatedUserStore } from "../providers"
|
||||
import { useShallow } from "zustand/shallow"
|
||||
import { ItemPriceResponse } from "../client/response"
|
||||
import { useCurrentAuthenticatedUserStore } from "../providers"
|
||||
import { useItemStore } from "../providers/ItemsProvider"
|
||||
import { ItemHistoryTable } from "./ItemHistoryTable"
|
||||
|
||||
type ItemTableListRowProps = {
|
||||
item: ItemPriceResponse
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
'use client'
|
||||
import Link from "next/link"
|
||||
import { useCurrentAuthenticatedUserStore } from "../providers"
|
||||
import useAsyncEffect from "use-async-effect"
|
||||
import { Mutex } from "async-mutex"
|
||||
import Link from "next/link"
|
||||
import useAsyncEffect from "use-async-effect"
|
||||
import { useShallow } from "zustand/shallow"
|
||||
import { useCurrentAuthenticatedUserStore } from "../providers"
|
||||
|
||||
const navBarMutex = new Mutex()
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
'for client'
|
||||
import { useItemStore } from "../providers/ItemsProvider"
|
||||
import { useState } from "react"
|
||||
import useAsyncEffect from "use-async-effect"
|
||||
import styled from "styled-components"
|
||||
import { Mutex } from "async-mutex"
|
||||
import { useState } from "react"
|
||||
import styled from "styled-components"
|
||||
import useAsyncEffect from "use-async-effect"
|
||||
import { useItemStore } from "../providers/ItemsProvider"
|
||||
|
||||
type OrderItemTableProps = {
|
||||
orderId: number
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
'for client'
|
||||
import { useOrderStore } from "../providers/OrderProvider"
|
||||
import { useShallow } from "zustand/shallow"
|
||||
import useAsyncEffect from "use-async-effect"
|
||||
import { Mutex } from "async-mutex"
|
||||
import styled from "styled-components"
|
||||
import useAsyncEffect from "use-async-effect"
|
||||
import { useShallow } from "zustand/shallow"
|
||||
import { useOrderStore } from "../providers/OrderProvider"
|
||||
import { OrderTableRow } from "./OrderTableRow"
|
||||
|
||||
type OrderTableProps = {
|
||||
|
||||
@@ -51,7 +51,7 @@ const OrderDetailsContainer = styled.div`
|
||||
}
|
||||
`
|
||||
|
||||
export const OrderTableRow = ({orderId, orderer, dateDue, datePlaced, amountPaid, orderTotal, amountDue, filled, delivered}: OrderTableRowProps) => {
|
||||
export const OrderTableRow = ({orderId, orderer, dateDue, datePlaced, amountDue, filled, delivered}: OrderTableRowProps) => {
|
||||
const dateDueDate = new Date(dateDue)
|
||||
const datePlacedDate = new Date(datePlaced)
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
'use client'
|
||||
import { useShallow } from "zustand/shallow"
|
||||
import { useUserStore } from "../providers/UsersProvider"
|
||||
import useAsyncEffect from "use-async-effect"
|
||||
import styled from "styled-components"
|
||||
import { useRef, useState } from "react"
|
||||
import { useCurrentAuthenticatedUserStore } from "../providers"
|
||||
import { Mutex } from "async-mutex"
|
||||
import { useRef, useState } from "react"
|
||||
import styled from "styled-components"
|
||||
import useAsyncEffect from "use-async-effect"
|
||||
import { useShallow } from "zustand/shallow"
|
||||
import { useCurrentAuthenticatedUserStore } from "../providers"
|
||||
import { useUserStore } from "../providers/UsersProvider"
|
||||
|
||||
type UserTableProps = {
|
||||
page: number
|
||||
@@ -86,13 +86,13 @@ export const UserTable = ({page}: UserTableProps) => {
|
||||
<UserTableItem>{u.Id}</UserTableItem>
|
||||
<UserTableItem>{u.Name}</UserTableItem>
|
||||
<UserTableItem>{u.JobPosition}</UserTableItem>
|
||||
<UserTableItem><input type="checkbox" onChange={async (e) => {
|
||||
<UserTableItem><input type="checkbox" onChange={async () => {
|
||||
if(u.Active)
|
||||
await userStore.deactivateUser(u.Id)
|
||||
else
|
||||
await userStore.activateUser(u.Id)
|
||||
}} checked={u.Active}/></UserTableItem>
|
||||
<UserTableItem><input type="checkbox" onChange={async (e) => {
|
||||
<UserTableItem><input type="checkbox" onChange={async () => {
|
||||
if(u.Admin)
|
||||
await userStore.demoteUser(u.Id)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user