>(new Set())
// Загружаем сотрудников для селектора ответственных
- const { data: employeesData, loading: employeesLoading } = useQuery(GET_MY_EMPLOYEES)
+ const { data: employeesData, loading: employeesLoading } = useQuery(GET_MY_EMPLOYEES_V2)
// Загружаем партнеров-логистов
const { data: counterpartiesData, loading: counterpartiesLoading } = useQuery(GET_MY_COUNTERPARTIES)
- const employees: Employee[] = employeesData?.myEmployees || []
+ const employees: Employee[] = employeesData?.employeesV2?.items || []
const logisticsPartners = (counterpartiesData?.myCounterparties || []).filter(
(org: Organization) => org.type === 'LOGIST',
)
@@ -569,7 +575,7 @@ export function FulfillmentGoodsTab() {
const getEmployeeName = (employeeId: string) => {
const employee = employees.find((emp) => emp.id === employeeId)
- return employee ? `${employee.firstName} ${employee.lastName}` : 'Не назначен'
+ return employee ? employee.personalInfo.fullName : 'Не назначен'
}
const getLogisticsPartnerName = (partnerId: string) => {
@@ -937,9 +943,9 @@ export function FulfillmentGoodsTab() {
>
- {employee.firstName} {employee.lastName}
+ {employee.personalInfo.fullName}
- {employee.position}
+ {employee.workInfo.position}
))}
diff --git a/src/components/market/market-counterparties.tsx b/src/components/market/market-counterparties.tsx
index e1f853c..a2a5972 100644
--- a/src/components/market/market-counterparties.tsx
+++ b/src/components/market/market-counterparties.tsx
@@ -34,8 +34,8 @@ import {
GET_INCOMING_REQUESTS,
GET_OUTGOING_REQUESTS,
SEARCH_ORGANIZATIONS,
- GET_MY_PARTNER_LINK,
} from '@/graphql/queries'
+import { GET_MY_PARTNER_LINK } from '@/graphql/referral-queries'
import { OrganizationAvatar } from './organization-avatar'
diff --git a/src/components/services/logistics-tab.tsx b/src/components/services/logistics-tab.tsx
index 7ed7b36..68409c7 100644
--- a/src/components/services/logistics-tab.tsx
+++ b/src/components/services/logistics-tab.tsx
@@ -25,7 +25,7 @@ import {
GET_MY_FULFILLMENT_LOGISTICS_V2,
CREATE_FULFILLMENT_LOGISTICS,
UPDATE_FULFILLMENT_LOGISTICS,
- DELETE_FULFILLMENT_LOGISTICS
+ DELETE_FULFILLMENT_LOGISTICS,
} from '@/graphql/queries/fulfillment-services-v2'
import { useAuth } from '@/hooks/useAuth'
import { WildberriesService } from '@/services/wildberries-service'
diff --git a/src/components/services/services-tab.tsx b/src/components/services/services-tab.tsx
index 4b1b560..4e90f76 100644
--- a/src/components/services/services-tab.tsx
+++ b/src/components/services/services-tab.tsx
@@ -25,7 +25,7 @@ import {
GET_MY_FULFILLMENT_SERVICES_V2,
CREATE_FULFILLMENT_SERVICE,
UPDATE_FULFILLMENT_SERVICE,
- DELETE_FULFILLMENT_SERVICE
+ DELETE_FULFILLMENT_SERVICE,
} from '@/graphql/queries/fulfillment-services-v2'
import { useAuth } from '@/hooks/useAuth'
diff --git a/src/components/services/supplies-tab.tsx b/src/components/services/supplies-tab.tsx
index 0b396a8..ea2f2ad 100644
--- a/src/components/services/supplies-tab.tsx
+++ b/src/components/services/supplies-tab.tsx
@@ -105,7 +105,7 @@ export function SuppliesTab() {
editableConsumables: editableConsumables.map(c => ({ id: c.id, name: c.name, stock: c.currentStock })),
isInitialized,
loading,
- error: error?.message
+ error: error?.message,
})
// ИСПРАВЛЕНО: Преобразуем загруженные V2 расходники в редактируемый формат
@@ -114,7 +114,7 @@ export function SuppliesTab() {
hasData: !!data?.myFulfillmentConsumables,
dataLength: data?.myFulfillmentConsumables?.length,
isInitialized,
- firstItem: data?.myFulfillmentConsumables?.[0]
+ firstItem: data?.myFulfillmentConsumables?.[0],
})
if (data?.myFulfillmentConsumables && !isInitialized) {
@@ -146,8 +146,8 @@ export function SuppliesTab() {
stock: c.currentStock,
price: c.pricePerUnit,
unit: c.unit,
- isAvailable: c.isAvailable
- }))
+ isAvailable: c.isAvailable,
+ })),
})
setEditableConsumables(convertedConsumables)
@@ -240,7 +240,7 @@ export function SuppliesTab() {
console.warn('🔥 Frontend calling UPDATE_FULFILLMENT_CONSUMABLE V2 with:', {
id: consumable.id,
input: { pricePerUnit: pricePerUnit },
- consumableName: consumable.name
+ consumableName: consumable.name,
})
await updateConsumable({
@@ -248,8 +248,8 @@ export function SuppliesTab() {
input: {
id: consumable.id,
pricePerUnit: pricePerUnit,
- nameForSeller: consumable.nameForSeller
- }
+ nameForSeller: consumable.nameForSeller,
+ },
},
refetchQueries: [{ query: GET_MY_FULFILLMENT_CONSUMABLES_V2 }],
})
@@ -392,8 +392,8 @@ export function SuppliesTab() {
stock: c.currentStock,
price: c.pricePerUnit,
unit: c.unit,
- isAvailable: c.isAvailable
- }))
+ isAvailable: c.isAvailable,
+ })),
})
return editableConsumables.map((consumable, index) => (
{
if (!context.user) {
throw new GraphQLError('Требуется авторизация', {
@@ -375,7 +374,7 @@ export const fulfillmentServicesMutations = {
updateFulfillmentService: async (
_: unknown,
args: { input: UpdateFulfillmentServiceInput },
- context: Context
+ context: Context,
) => {
if (!context.user) {
throw new GraphQLError('Требуется авторизация', {
@@ -490,7 +489,7 @@ export const fulfillmentServicesMutations = {
createFulfillmentConsumable: async (
_: unknown,
args: { input: CreateFulfillmentConsumableInput },
- context: Context
+ context: Context,
) => {
if (!context.user) {
throw new GraphQLError('Требуется авторизация', {
@@ -546,7 +545,7 @@ export const fulfillmentServicesMutations = {
updateFulfillmentConsumable: async (
_: unknown,
args: { input: UpdateFulfillmentConsumableInput },
- context: Context
+ context: Context,
) => {
if (!context.user) {
throw new GraphQLError('Требуется авторизация', {
@@ -667,7 +666,7 @@ export const fulfillmentServicesMutations = {
createFulfillmentLogistics: async (
_: unknown,
args: { input: CreateFulfillmentLogisticsInput },
- context: Context
+ context: Context,
) => {
if (!context.user) {
throw new GraphQLError('Требуется авторизация', {
@@ -723,7 +722,7 @@ export const fulfillmentServicesMutations = {
updateFulfillmentLogistics: async (
_: unknown,
args: { input: UpdateFulfillmentLogisticsInput },
- context: Context
+ context: Context,
) => {
if (!context.user) {
throw new GraphQLError('Требуется авторизация', {
@@ -836,7 +835,7 @@ export const fulfillmentServicesMutations = {
console.warn('🔥 FULFILLMENT QUERIES ОБЪЕКТ СОЗДАН:', {
keys: Object.keys(fulfillmentServicesQueries),
- hasMyFulfillmentConsumables: 'myFulfillmentConsumables' in fulfillmentServicesQueries
+ hasMyFulfillmentConsumables: 'myFulfillmentConsumables' in fulfillmentServicesQueries,
})
// Объединяем резолверы в основной объект