관리자·유저 화면 왕복 이동 수단을 추가하고, 상품/게시판 URL 식별자를 사람이 읽을 수 있는 값(상품코드/슬러그)으로 전환한다. 크로스 이동 링크 (전부 새 탭): - 관리자 사이드바 "사이트 보기" + 모바일 드로어 상단 잘림 수정 - 관리자 게시물 조회 ↔ 유저 게시판, 유저 상품 상세 ↔ 관리자 상품 수정 - 유저 화면의 관리자 진입은 is_admin 이 아니라 세부 권한 플래그로 게이트 (게시판 can_access_admin, 상품 can_update) 상품 라우팅 id → product_code: - Product::resolveRouteBinding(code/id) + 공개 라우트 정규식 확장 - 모든 상품 링크(목록·최근본·검색·장바구니·주문내역·문의내역·관리자) 전환 - 상품 검색을 상품코드·번호 양쪽 조회 가능하게 확장(관리자+통합검색) 게시판 라우팅 board id → slug: - Board::resolveRouteBinding(slug/id) + 관리자 라우트 slug 전환 - 생성 후 리다이렉트·토글·삭제·수정·add-to-menu·편집기 스코프 전수 정정 - BoardController::addToAdminMenu 를 Board 바인딩으로 정합 검증: 프론트 레이아웃 Vitest 36건 green, 백엔드 회귀 테스트 추가, g7.dev 라이브 실측(생성/삭제/메뉴추가 slug, 문의내역·검색 상품코드 URL).
327 lines
13 KiB
JSON
327 lines
13 KiB
JSON
{
|
|
"data_sources": [
|
|
{
|
|
"id": "board_list_for_inquiry",
|
|
"label_key": "$t:sirsoft-board.editor.data_source.board_list_for_inquiry",
|
|
"type": "api",
|
|
"endpoint": "/api/modules/sirsoft-board/admin/boards",
|
|
"method": "GET",
|
|
"auto_fetch": true,
|
|
"auth_required": true,
|
|
"params": {
|
|
"per_page": "200"
|
|
},
|
|
"fallback": null
|
|
}
|
|
],
|
|
"extension_point": "inquiry_board_setting",
|
|
"mode": "replace",
|
|
"components": [
|
|
{
|
|
"id": "inquiry_board_setting_active",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "space-y-4"
|
|
},
|
|
"children": [
|
|
{
|
|
"id": "inquiry_board_setting_description",
|
|
"type": "basic",
|
|
"name": "P",
|
|
"props": {
|
|
"className": "text-body"
|
|
},
|
|
"text": "$t:sirsoft-board.admin.ecommerce_settings.inquiry.description"
|
|
},
|
|
{
|
|
"id": "inquiry_board_field",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "row-stack"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"children": [
|
|
{
|
|
"id": "inquiry_board_label",
|
|
"type": "basic",
|
|
"name": "Label",
|
|
"props": {
|
|
"className": "form-label"
|
|
},
|
|
"text": "$t:sirsoft-board.admin.ecommerce_settings.inquiry.board_label"
|
|
},
|
|
{
|
|
"id": "inquiry_board_select",
|
|
"type": "basic",
|
|
"name": "Select",
|
|
"props": {
|
|
"name": "inquiry.board_slug",
|
|
"value": "{{_local.form?.inquiry?.board_slug ?? ''}}",
|
|
"options": "{{[{value: '', label: $t('sirsoft-board.admin.ecommerce_settings.inquiry.board_placeholder')}].concat((board_list_for_inquiry?.data?.data ?? []).map(b => ({value: b.slug, label: b.name})))}}",
|
|
"className": "{{_local.errors?.['inquiry.board_slug'] ? 'input input-error' : 'input'}}",
|
|
"disabled": "{{_computed.isReadOnly}}"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "inquiry_board_select_error",
|
|
"type": "basic",
|
|
"name": "Span",
|
|
"if": "{{_local.errors?.['inquiry.board_slug']}}",
|
|
"props": {
|
|
"className": "form-error"
|
|
},
|
|
"text": "{{_local.errors?.['inquiry.board_slug']?.[0] ?? ''}}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "inquiry_board_hints",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "space-y-3"
|
|
},
|
|
"children": [
|
|
{
|
|
"id": "inquiry_board_hint_secret",
|
|
"type": "basic",
|
|
"name": "P",
|
|
"props": {
|
|
"className": "text-tertiary"
|
|
},
|
|
"text": "$t:sirsoft-board.admin.ecommerce_settings.inquiry.hint_secret"
|
|
},
|
|
{
|
|
"id": "inquiry_board_hint_category",
|
|
"type": "basic",
|
|
"name": "P",
|
|
"props": {
|
|
"className": "text-tertiary"
|
|
},
|
|
"text": "$t:sirsoft-board.admin.ecommerce_settings.inquiry.hint_category"
|
|
},
|
|
{
|
|
"id": "inquiry_board_actions",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"if": "{{!!(board_list_for_inquiry?.data?.data ?? []).find(b => b.slug === (settings?.data?.inquiry?.board_slug ?? ''))?.id}}",
|
|
"props": {
|
|
"className": "flex flex-col gap-2 md:flex-row"
|
|
},
|
|
"children": [
|
|
{
|
|
"id": "inquiry_board_go_edit_card",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "flex flex-col justify-between gap-3 flex-1 p-3 bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "P",
|
|
"props": {
|
|
"className": "flex-start gap-1.5 text-tertiary"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Icon",
|
|
"props": {
|
|
"name": "gear",
|
|
"className": "w-3 h-3 shrink-0 mt-0.5"
|
|
}
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Span",
|
|
"text": "$t:sirsoft-board.admin.ecommerce_settings.inquiry.go_to_board_edit_desc"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "inquiry_board_go_edit",
|
|
"type": "basic",
|
|
"name": "Button",
|
|
"props": {
|
|
"type": "button",
|
|
"className": "self-start inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Icon",
|
|
"props": {
|
|
"name": "pen-to-square",
|
|
"className": "w-3 h-3"
|
|
}
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Span",
|
|
"text": "$t:sirsoft-board.admin.ecommerce_settings.inquiry.go_to_board_edit"
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": "click",
|
|
"handler": "navigate",
|
|
"params": {
|
|
"path": "/admin/boards/{{settings?.data?.inquiry?.board_slug ?? ''}}/edit"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "inquiry_board_go_posts_card",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "flex flex-col justify-between gap-3 flex-1 p-3 bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "P",
|
|
"props": {
|
|
"className": "flex-start gap-1.5 text-tertiary"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Icon",
|
|
"props": {
|
|
"name": "clipboard-list",
|
|
"className": "w-3 h-3 shrink-0 mt-0.5"
|
|
}
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Span",
|
|
"text": "$t:sirsoft-board.admin.ecommerce_settings.inquiry.go_to_posts_desc"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "flex gap-2"
|
|
},
|
|
"children": [
|
|
{
|
|
"id": "inquiry_board_go_posts",
|
|
"type": "basic",
|
|
"name": "Button",
|
|
"props": {
|
|
"type": "button",
|
|
"className": "inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Icon",
|
|
"props": {
|
|
"name": "list",
|
|
"className": "w-3 h-3"
|
|
}
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Span",
|
|
"text": "$t:sirsoft-board.admin.ecommerce_settings.inquiry.go_to_posts"
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": "click",
|
|
"handler": "navigate",
|
|
"params": {
|
|
"path": "/admin/board/{{settings?.data?.inquiry?.board_slug}}"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "inquiry_board_add_menu",
|
|
"type": "basic",
|
|
"name": "Button",
|
|
"props": {
|
|
"type": "button",
|
|
"className": "inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-900 border border-blue-500 dark:border-blue-400 rounded hover:bg-blue-50 dark:hover:bg-blue-900/20 transition-colors"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Icon",
|
|
"props": {
|
|
"name": "plus",
|
|
"className": "w-3 h-3"
|
|
}
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Span",
|
|
"text": "$t:sirsoft-board.admin.ecommerce_settings.inquiry.add_to_admin_menu"
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": "click",
|
|
"handler": "apiCall",
|
|
"target": "/api/modules/sirsoft-board/admin/boards/{{settings?.data?.inquiry?.board_slug ?? ''}}/add-to-menu",
|
|
"params": {
|
|
"method": "POST"
|
|
},
|
|
"auth_required": true,
|
|
"onSuccess": [
|
|
{
|
|
"handler": "toast",
|
|
"params": {
|
|
"type": "success",
|
|
"message": "{{result.message}}"
|
|
}
|
|
},
|
|
{
|
|
"handler": "refetchDataSource",
|
|
"params": {
|
|
"dataSourceId": "admin_menu",
|
|
"sync": true
|
|
}
|
|
}
|
|
],
|
|
"onError": [
|
|
{
|
|
"handler": "toast",
|
|
"params": {
|
|
"type": "error",
|
|
"message": "{{error.message}}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"priority": 100
|
|
}
|