Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove certain home statistics #4480

Merged
merged 3 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 3 additions & 24 deletions locale/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1097,9 +1097,6 @@
"context": "references attribute type",
"string": "References"
},
"5dyOs0": {
"string": "No payments waiting for capture"
},
"5elC9k": {
"context": "taxes section name",
"string": "Taxes"
Expand Down Expand Up @@ -2170,9 +2167,6 @@
"context": "Order summary refunds header",
"string": "Refunds"
},
"E9Jssl": {
"string": "No orders ready to fulfill"
},
"EA7rjI": {
"context": "disabled status label",
"string": "Disabled"
Expand Down Expand Up @@ -3566,9 +3560,6 @@
"context": "weight",
"string": "{value} {unit}"
},
"Nuq83+": {
"string": "Create new channel"
},
"Nv/toB": {
"context": "button",
"string": "Assign and save"
Expand Down Expand Up @@ -4752,6 +4743,9 @@
"context": "order refund amount",
"string": "Shipment Cost"
},
"WHgdsk": {
"string": "Out of stock"
},
"WIxSDm": {
"context": "card header",
"string": "{country} class rates"
Expand Down Expand Up @@ -4875,9 +4869,6 @@
"context": "title",
"string": "Reserved stock"
},
"X7jl6w": {
"string": "Orders"
},
"X8qjg3": {
"context": "inactive",
"string": "Inactive"
Expand Down Expand Up @@ -5467,9 +5458,6 @@
"context": "success gift card enable message",
"string": "Successfully enabled gift card"
},
"bFhzRX": {
"string": "No products are out of stock"
},
"bHdFph": {
"context": "subsection header",
"string": "Address"
Expand Down Expand Up @@ -5584,9 +5572,6 @@
"byP6IC": {
"string": "Selected"
},
"c0H45L": {
"string": "{amount, plural,one {One order is ready to fulfill} other {{amount} orders are ready to fulfill}}"
},
"c24hjq": {
"context": "status",
"string": "Active"
Expand Down Expand Up @@ -5688,9 +5673,6 @@
"context": "WarehouseSettings no shipping zones assigned",
"string": "This warehouse has no shipping zones assigned."
},
"cdxwA8": {
"string": "{amount, plural,one {One product out of stock}other {{amount} products out of stock}}"
},
"cfQf0w": {
"context": "button",
"string": "Create Order"
Expand Down Expand Up @@ -6916,9 +6898,6 @@
"context": "bulk issue gift cards success alert description",
"string": "Requested {cardsAmount} were successfully issued"
},
"md326v": {
"string": "{amount, plural,one {One payment to capture}other {{amount} payments to capture}}"
},
"me585h": {
"context": "navigator section header",
"string": "Quick Actions"
Expand Down
12 changes: 1 addition & 11 deletions src/graphql/hooks.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8136,22 +8136,13 @@ export type CustomerGiftCardListQueryHookResult = ReturnType<typeof useCustomerG
export type CustomerGiftCardListLazyQueryHookResult = ReturnType<typeof useCustomerGiftCardListLazyQuery>;
export type CustomerGiftCardListQueryResult = Apollo.QueryResult<Types.CustomerGiftCardListQuery, Types.CustomerGiftCardListQueryVariables>;
export const HomeDocument = gql`
query Home($channel: String!, $datePeriod: DateRangeInput!, $PERMISSION_MANAGE_PRODUCTS: Boolean!, $PERMISSION_MANAGE_ORDERS: Boolean!) {
query Home($channel: String!, $PERMISSION_MANAGE_PRODUCTS: Boolean!, $PERMISSION_MANAGE_ORDERS: Boolean!) {
salesToday: ordersTotal(period: TODAY, channel: $channel) @include(if: $PERMISSION_MANAGE_ORDERS) {
gross {
amount
currency
}
}
ordersToday: orders(filter: {created: $datePeriod}, channel: $channel) @include(if: $PERMISSION_MANAGE_ORDERS) {
totalCount
}
ordersToFulfill: orders(filter: {status: READY_TO_FULFILL}, channel: $channel) @include(if: $PERMISSION_MANAGE_ORDERS) {
totalCount
}
ordersToCapture: orders(filter: {status: READY_TO_CAPTURE}, channel: $channel) @include(if: $PERMISSION_MANAGE_ORDERS) {
totalCount
}
productsOutOfStock: products(
filter: {stockAvailability: OUT_OF_STOCK}
channel: $channel
Expand Down Expand Up @@ -8222,7 +8213,6 @@ export const HomeDocument = gql`
* const { data, loading, error } = useHomeQuery({
* variables: {
* channel: // value for 'channel'
* datePeriod: // value for 'datePeriod'
* PERMISSION_MANAGE_PRODUCTS: // value for 'PERMISSION_MANAGE_PRODUCTS'
* PERMISSION_MANAGE_ORDERS: // value for 'PERMISSION_MANAGE_ORDERS'
* },
Expand Down
3 changes: 1 addition & 2 deletions src/graphql/types.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9351,13 +9351,12 @@ export type CustomerGiftCardListQuery = { __typename: 'Query', giftCards: { __ty

export type HomeQueryVariables = Exact<{
channel: Scalars['String'];
datePeriod: DateRangeInput;
PERMISSION_MANAGE_PRODUCTS: Scalars['Boolean'];
PERMISSION_MANAGE_ORDERS: Scalars['Boolean'];
}>;


export type HomeQuery = { __typename: 'Query', salesToday: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } } | null, ordersToday: { __typename: 'OrderCountableConnection', totalCount: number | null } | null, ordersToFulfill: { __typename: 'OrderCountableConnection', totalCount: number | null } | null, ordersToCapture: { __typename: 'OrderCountableConnection', totalCount: number | null } | null, productsOutOfStock: { __typename: 'ProductCountableConnection', totalCount: number | null } | null, productTopToday: { __typename: 'ProductVariantCountableConnection', edges: Array<{ __typename: 'ProductVariantCountableEdge', node: { __typename: 'ProductVariant', id: string, quantityOrdered: number | null, revenue: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } } | null, attributes: Array<{ __typename: 'SelectedAttribute', values: Array<{ __typename: 'AttributeValue', id: string, name: string | null }> }>, product: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null } } }> } | null, activities: { __typename: 'OrderEventCountableConnection', edges: Array<{ __typename: 'OrderEventCountableEdge', node: { __typename: 'OrderEvent', amount: number | null, composedId: string | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, id: string, message: string | null, orderNumber: string | null, oversoldItems: Array<string> | null, quantity: number | null, type: OrderEventsEnum | null, user: { __typename: 'User', id: string, email: string } | null } }> } | null };
export type HomeQuery = { __typename: 'Query', salesToday: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } } | null, productsOutOfStock: { __typename: 'ProductCountableConnection', totalCount: number | null } | null, productTopToday: { __typename: 'ProductVariantCountableConnection', edges: Array<{ __typename: 'ProductVariantCountableEdge', node: { __typename: 'ProductVariant', id: string, quantityOrdered: number | null, revenue: { __typename: 'TaxedMoney', gross: { __typename: 'Money', amount: number, currency: string } } | null, attributes: Array<{ __typename: 'SelectedAttribute', values: Array<{ __typename: 'AttributeValue', id: string, name: string | null }> }>, product: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null } } }> } | null, activities: { __typename: 'OrderEventCountableConnection', edges: Array<{ __typename: 'OrderEventCountableEdge', node: { __typename: 'OrderEvent', amount: number | null, composedId: string | null, date: any | null, email: string | null, emailType: OrderEventsEmailsEnum | null, id: string, message: string | null, orderNumber: string | null, oversoldItems: Array<string> | null, quantity: number | null, type: OrderEventsEnum | null, user: { __typename: 'User', id: string, email: string } | null } }> } | null };

export type MenuCreateMutationVariables = Exact<{
input: MenuCreateInput;
Expand Down
172 changes: 0 additions & 172 deletions src/home/components/HomeNotificationTable/HomeNotificationTable.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/home/components/HomeNotificationTable/index.ts

This file was deleted.

35 changes: 0 additions & 35 deletions src/home/components/HomeNotificationTable/messages.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/home/components/HomePage/HomePage.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ const homePageProps: Omit<HomePageProps, "classes"> = {
activities: mapEdgesToItems(shop.activities),
noChannel: false,
createNewChannelHref: "",
ordersToFulfillHref: "",
ordersToCaptureHref: "",
productsOutOfStockHref: "",
orders: shop.ordersToday.totalCount,
ordersToCapture: shop.ordersToCapture.totalCount,
ordersToFulfill: shop.ordersToFulfill.totalCount,
productsOutOfStock: shop.productsOutOfStock.totalCount,
sales: shop.salesToday.gross,
topProducts: mapEdgesToItems(shop.productTopToday),
Expand Down
Loading
Loading