// FILE: src/config/permissions.js
// Reference enum สำหรับฝั่งโค้ด/ฟรอนต์เท่านั้น
// แหล่งจริงของ scope อ่านจาก DB: permissions.scope_level (ผ่าน requirePerm())

const PERM = {
  organizations: {
    view: "organizations.view",
    manage: "organizations.manage",
  },
  projects: {
    view: "projects.view",
    manage: "projects.manage",
    partiesManage: "project_parties.manage",
  },
  drawings: {
    view: "drawings.view",
    upload: "drawings.upload",
    delete: "drawings.delete",
  },
  documents: {
    view: "documents.view",
    manage: "documents.manage",
  },
  materials: {
    view: "materials.view",
    manage: "materials.manage",
  },
  ms: {
    view: "ms.view",
    manage: "ms.manage",
  },
  rfas: {
    view: "rfas.view",
    create: "rfas.create",
    respond: "rfas.respond",
    delete: "rfas.delete",
  },
  correspondences: {
    view: "corr.view",
    manage: "corr.manage",
  },
  transmittals: {
    manage: "transmittals.manage",
  },
  circulations: {
    manage: "cirs.manage",
  },
  admin: {
    access: "admin.access",
  },
  reports: {
    view: "reports.view",
  },
  settings: {
    manage: "settings.manage",
  },
};

export { PERM };
export default PERM;
