docs(website): knowledge-base guides for notifications & roles + sitemap docs pages
CI/CD / CI · API (dotnet build + test) (push) Successful in 45s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 28s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m9s
CI/CD / CI · Admin Web (tsc) (push) Successful in 37s
CI/CD / CI · Website (tsc) (push) Successful in 44s
CI/CD / CI · Koja (tsc) (push) Successful in 48s
CI/CD / Deploy · all services (push) Successful in 1m51s

The recent dashboard features shipped without knowledge-base coverage. Adds two
fa/en guides at meezi.ir/docs:
- "Notifications & sound" — bell/unread count, configurable sound (chime + volume
  + preview), desktop/Windows popups, browser-tab counter, and click-to-navigate
  to the related page.
- "Roles & permissions" — base roles, defining custom roles via the permission
  matrix (CRUD + sensitive actions), assigning them, and how page/action access
  is enforced.

Also fixes a standing SEO gap: the sitemap listed only /docs, never the
per-feature /docs/{slug} pages — now all guide pages (fa+en) are included so the
whole knowledge base is crawlable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-21 07:19:23 +03:30
parent 3dfcb1585b
commit 97bd63015f
2 changed files with 98 additions and 0 deletions
@@ -21,6 +21,8 @@ import {
Settings,
Smartphone,
MapPin,
Bell,
ShieldCheck,
} from "lucide-react";
export type GuideGroup =
@@ -277,6 +279,50 @@ export const GUIDE_FEATURES: GuideFeature[] = [
},
},
{
slug: "notifications",
icon: Bell,
group: "operations",
tier: "free",
wireframe: "form",
fa: {
title: "اعلان‌ها و صدا",
tagline:
"هشدار لحظه‌ای سفارش و درخواست میز با صدا، پاپ‌آپ ویندوز و شمارشگر روی تب — با یک کلیک به صفحهٔ مربوطه بروید.",
steps: [
"هر سفارش جدید مهمان یا درخواست میز، هم‌زمان روی زنگولهٔ بالای پنل (با شمارش خوانده‌نشده‌ها)، یک نوتیف کوچک و یک صدا اعلام می‌شود.",
"برای تنظیم، وارد «تنظیمات ← اعلان‌ها و صدا» شوید.",
"صدا: روشن/خاموش کردن، انتخاب نوع زنگ از بین چند گزینه، تنظیم بلندی صدا و دکمهٔ «پیش‌نمایش» برای شنیدن.",
"اعلان دسکتاپ: با زدن «فعال‌سازی» و تأیید مرورگر، حتی وقتی پنل در تب دیگری باز یا پنجره کوچک شده باشد، پاپ‌آپ ویندوز نمایش داده می‌شود.",
"شمارشگر تب: تعداد اعلان‌های خوانده‌نشده روی عنوان تب مرورگر و آیکن (فاویکون) دیده می‌شود.",
"با کلیک روی هر اعلان (روی زنگوله، دکمهٔ «مشاهده» در نوتیف، یا پاپ‌آپ دسکتاپ) مستقیم به صفحهٔ مرتبط می‌روید: سفارش جدید ← آشپزخانه/صندوق، درخواست میز ← صفحهٔ میزها.",
"دکمهٔ «ارسال اعلان آزمایشی» در تنظیمات اجازه می‌دهد صدا و پاپ‌آپ را آزمایش کنید.",
],
tips: [
"این تنظیمات روی همان دستگاه/مرورگر ذخیره می‌شوند؛ هر تبلت یا کامپیوتر صدا و اعلان مخصوص خودش را دارد.",
"اعلان شما را فقط به صفحه‌ای می‌برد که نقش‌تان به آن دسترسی دارد؛ مثلاً صندوق‌دار سفارش جدید را در «صندوق» می‌بیند.",
],
},
en: {
title: "Notifications & Sound",
tagline:
"Real-time order & waiter-call alerts with sound, a Windows popup, and a tab counter — one click jumps you to the right page.",
steps: [
"Every new guest order or waiter call appears at once on the bell in the top bar (with an unread count), as a small toast, and with a sound.",
"To configure, open “Settings → Notifications & sound”.",
"Sound: turn it on/off, pick a chime from several options, set the volume, and press “Preview” to hear it.",
"Desktop notifications: press “Enable” and approve the browser prompt — a Windows popup then appears even when the panel is in another tab or minimized.",
"Tab counter: the number of unread notifications shows on the browser tab title and the favicon.",
"Click any notification (on the bell, the toasts “View” button, or the desktop popup) to jump straight to the related page: new order → Kitchen/POS, waiter call → Tables.",
"Use “Send a test notification” in settings to check the sound and popup.",
],
tips: [
"These preferences are saved per device/browser — each tablet or computer has its own sound and alerts.",
"A notification only opens a page your role can access; e.g. a cashier sees a new order in POS.",
],
},
},
// ─────────────── menu ───────────────
{
slug: "menu",
@@ -646,6 +692,47 @@ export const GUIDE_FEATURES: GuideFeature[] = [
},
// ─────────────── management ───────────────
{
slug: "roles",
icon: ShieldCheck,
group: "management",
tier: "free",
wireframe: "form",
fa: {
title: "نقش‌ها و دسترسی‌ها",
tagline:
"برای هر کارمند دقیقاً مشخص کنید به کدام صفحه‌ها و کدام عملیات‌ها دسترسی داشته باشد.",
steps: [
"هر کارمند یک نقش پایه دارد: مالک، مدیر، صندوق‌دار، گارسون، آشپز یا پیک — که دسترسی‌های پیش‌فرض منطقی دارند.",
"برای دسترسی دلخواه، وارد «تنظیمات ← نقش‌های سفارشی» شوید (فقط مالک).",
"روی «نقش جدید» بزنید و یک نام و رنگ انتخاب کنید.",
"از ماتریس دسترسی، دقیقاً تیک بزنید چه کاری مجاز است: مشاهده/افزودن/ویرایش/حذف در هر بخش (منو، انبار، مشتریان، …) و عملیات حساس مثل ابطال سفارش، استرداد وجه، تخفیف، خروجی گزارش و باز کردن کشوی پول.",
"نقش را ذخیره و سپس از بخش «منابع انسانی» به کارمند موردنظر اختصاص دهید.",
"از این پس کارمند فقط صفحه‌ها و دکمه‌هایی را می‌بیند که مجاز است؛ و سرور هم هر درخواست غیرمجاز را رد می‌کند.",
],
tips: [
"دسترسی‌های حاکمیتی مثل صورت‌حساب/اشتراک، مدیریت شعب و تعریف نقش‌ها فقط برای مالک است.",
"نقش سفارشی، دسترسی پیش‌فرض نقش پایه را بازنویسی می‌کند؛ با حذف نقش، کارمند به دسترسی پایه برمی‌گردد.",
],
},
en: {
title: "Roles & Permissions",
tagline:
"Define exactly which pages and which actions each employee can use.",
steps: [
"Every employee has a base role — Owner, Manager, Cashier, Waiter, Chef, or Delivery — each with sensible default access.",
"For tailored access, open “Settings → Custom Roles” (owner only).",
"Press “New Role” and pick a name and color.",
"In the permission matrix, tick exactly whats allowed: View/Add/Edit/Delete per area (menu, inventory, customers, …) plus sensitive actions like void order, refund, discount, export reports, and open cash drawer.",
"Save the role, then assign it to an employee from “Human Resources”.",
"From then on the employee only sees the pages and buttons theyre allowed to use, and the server rejects any unauthorized request.",
],
tips: [
"Governance permissions — billing/subscription, managing branches, and defining roles — stay owner-only.",
"A custom role overrides the base roles defaults; delete the role and the employee reverts to base access.",
],
},
},
{
slug: "hr",
icon: UserCog,
+11
View File
@@ -1,5 +1,6 @@
import { MetadataRoute } from "next";
import { getAllPosts } from "@/lib/blog";
import { GUIDE_FEATURES } from "./[locale]/docs/guide-data";
const BASE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? "https://meezi.ir";
const LOCALES = ["fa", "en"] as const;
@@ -40,6 +41,16 @@ export default function sitemap(): MetadataRoute.Sitemap {
});
}
// Knowledge-base guide pages (/docs/{slug}) — one per feature.
for (const feature of GUIDE_FEATURES) {
entries.push({
url: `${BASE_URL}/${locale}/docs/${feature.slug}`,
lastModified: now,
changeFrequency: "monthly",
priority: 0.6,
});
}
const posts = getAllPosts(locale);
for (const post of posts) {
const postDate = post.date ? new Date(post.date) : null;