Реализация реферальной системы и улучшение системы авторизации
- Добавлена полная реферальная система с GraphQL резолверами и UI компонентами - Улучшена система регистрации с поддержкой ВКонтакте и реферальных ссылок - Обновлена схема Prisma для поддержки реферальной системы - Добавлены новые файлы документации правил системы - Улучшена система партнерства и контрагентов - Обновлены компоненты авторизации для поддержки новых функций - Удален устаревший server.log 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -73,6 +73,8 @@ interface UseAuthReturn {
|
||||
phone: string,
|
||||
inn: string,
|
||||
type: 'FULFILLMENT' | 'LOGIST' | 'WHOLESALE',
|
||||
referralCode?: string | null,
|
||||
partnerCode?: string | null,
|
||||
) => Promise<{
|
||||
success: boolean
|
||||
message: string
|
||||
@ -83,6 +85,8 @@ interface UseAuthReturn {
|
||||
wbApiKey?: string
|
||||
ozonApiKey?: string
|
||||
ozonClientId?: string
|
||||
referralCode?: string | null
|
||||
partnerCode?: string | null
|
||||
}) => Promise<{
|
||||
success: boolean
|
||||
message: string
|
||||
@ -290,7 +294,13 @@ export const useAuth = (): UseAuthReturn => {
|
||||
phone: string,
|
||||
inn: string,
|
||||
type: 'FULFILLMENT' | 'LOGIST' | 'WHOLESALE',
|
||||
referralCode?: string | null,
|
||||
partnerCode?: string | null,
|
||||
) => {
|
||||
console.log('🎬 useAuth - registerFulfillmentOrganization вызван с параметрами:', {
|
||||
phone, inn, type, referralCode, partnerCode
|
||||
})
|
||||
|
||||
try {
|
||||
setIsLoading(true)
|
||||
|
||||
@ -301,11 +311,17 @@ export const useAuth = (): UseAuthReturn => {
|
||||
currentToken ? `${currentToken.substring(0, 20)}...` : 'No token',
|
||||
)
|
||||
|
||||
console.log('🎬 useAuth - Отправка GraphQL мутации с input:', {
|
||||
phone, inn, type, referralCode, partnerCode
|
||||
})
|
||||
|
||||
const { data } = await registerFulfillmentMutation({
|
||||
variables: {
|
||||
input: { phone, inn, type },
|
||||
input: { phone, inn, type, referralCode, partnerCode },
|
||||
},
|
||||
})
|
||||
|
||||
console.log('🎬 useAuth - Ответ GraphQL мутации:', data)
|
||||
|
||||
const result = data.registerFulfillmentOrganization
|
||||
|
||||
@ -340,6 +356,8 @@ export const useAuth = (): UseAuthReturn => {
|
||||
wbApiKey?: string
|
||||
ozonApiKey?: string
|
||||
ozonClientId?: string
|
||||
referralCode?: string | null
|
||||
partnerCode?: string | null
|
||||
}) => {
|
||||
try {
|
||||
setIsLoading(true)
|
||||
|
Reference in New Issue
Block a user