- Пользователь попадает из письма по ссылке вида
/trusted-order-info/[id]
- На клиенте запрашиваем по id из квери параметров ссылки информацию о доверенном заказе (отдельное api) (id-шник это не айди заказа а уникальный айди связки заказа с текущим доверенным лицом которое привязано к заказу)
- Бекенд у себя чекает разрешения доступа по ссылке (проверяются из хедеров данные авторизованного юзера на предмет соответствия номера на который он регился с номером телефона доверенного лица этого заказа)
- Если пользователь не авторизован бэкенд должен выдать ошибку с дополнительными мета данными
phone
- номер телефона который будет вбит в гибридную форму авторизации-регистрации по телефону. После авторизации шлём повторно запрос на инфу о заказе. Сейчас бекенд должен всё успешно вернуть - на ui отображаем верстку.
- Если пользователь не авторизован бэкенд должен выдать ошибку с дополнительными мета данными
- Если пользователь авторизован и телефон не совпадает с номером который привязан к привязанному доверенному лицу заказа - выдавать ошибку
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NextResponse } from 'next/server'; | |
import type { NextRequest } from 'next/server'; | |
import { appConfig } from '@appns/config/app'; | |
import { routes, isAuthRoute, isProtectedRoute, isAdminRoute } from '@/shared/routes'; | |
const redirectTo = ( | |
request: NextRequest, | |
to: string, | |
includeFrom = false, | |
includeReset = false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
айдос |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ralClassicGroupMap = { | |
'ral_classic_1': 'Жёлтые тона', | |
'ral_classic_2': 'Оранжевые тона', | |
'ral_classic_3': 'Красные тона', | |
'ral_classic_4': 'Фиолетовые тона', | |
'ral_classic_5': 'Синие тона', | |
'ral_classic_6': 'Зелёные тона', | |
'ral_classic_7': 'Серые тона', | |
'ral_classic_8': 'Коричневые тона', | |
'ral_classic_9': 'Чёрные и белые тона', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
panic(cpu 0 caller 0xfffffe001fea83fc): DCPEXT0 PANIC - ASSERT: AFKSerialize.cpp:507: [_data] - iomfb_video_async(12) | |
ASSERT: AFKSerialize.cpp:507: [_data] | |
RTKit: RTKit-1827.120.2.debug - Client: local-t600xdcp.release | |
!UUID: 18e3d9e4-33fa-331f-85a8-b18722833e30 | |
Time: 0x000035d91ee1377e | |
Faulting task 12 Call Stack: 0x000000000001d94c 0x000000000001d45c 0x000000000001d318 0x00000000000203e8 0x00000000000326f8 0x0000000000032784 0x000000000003238c 0x00000000000958c4 0x00000000000324cc 0x00000000000323f8 0x00000000000958c4 0x00000000000324cc 0x00000000000322b4 0x0000000000145e30 0x0000000000145cf4 0x00000000001441f4 0x000000000013cd4c 0x0000000000143e14 0x00000000000e73a0 0x00000000000dd0cc 0x000000000001dde0 0x0000000000011230 000000000000000000 | |
RTKit Task List: | |
name | pri | stack use | status | resource | warning | |
0 rtk_background | 007 | 848/2048 | SEMWAIT | 0x859fc0 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface HttpCacheEntry { | |
data: any; | |
expires: number; | |
} | |
export interface SerializeCacheKeyPayload { | |
headers?: Record<string, string>; | |
method?: string; | |
url: string; | |
body?: Record<string, any>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Extend default Tailwind color palette with missing Mantine colors | |
* NOTE: Mantine supports only 10 colors in each color-shade | |
* Because of typescript issues we copypasted tw colors & replaced needed values | |
* We omitted string values like black and white, so we added it only inside tailwind config | |
*/ | |
const colorPalette = { | |
// Mantine colors, that's missing in tw palette | |
dark: { | |
50: '#c1c2c5', |
В next.js для статических страниц доступ к квери параметрам доступен только на клиенте и только после того как роутер на клиенте получит необходимые данные об этих квери параметрах (после чудо-гидрации, когда router.isReady) У нас есть такая схема инициализации юнитов для роутера
/**
* Gate for next router,
* => null, when page is not mounted / on unmount
* => router state, when page is mounted
*/
const RouterGate = createGate<NextRouter | null>(null!);