edits for suppliers & projects

This commit is contained in:
Aya
2026-05-20 11:41:38 +03:00
parent 12c4ca8334
commit 61ca570e7a
10 changed files with 1733 additions and 70 deletions

View File

@@ -25,7 +25,6 @@ import Modal from '@/components/Modal'
import { tendersAPI, Tender, TenderDirective, CreateDirectiveData } from '@/lib/api/tenders'
import { contactsAPI } from '@/lib/api/contacts'
import { pipelinesAPI } from '@/lib/api/pipelines'
import { employeesAPI } from '@/lib/api/employees'
import { useLanguage } from '@/contexts/LanguageContext'
const DIRECTIVE_TYPE_LABELS: Record<string, string> = {
@@ -134,9 +133,12 @@ function TenderDetailContent() {
useEffect(() => {
if (showDirectiveModal || showConvertModal) {
employeesAPI
.getAll({ status: 'ACTIVE', pageSize: 500 })
.then((r: any) => setEmployees(r.employees || []))
// Use the directive-scoped employee list so non-HR users (with
// tenders:directives:create) can populate this dropdown without
// being granted hr:employees:read (which would leak salaries etc.).
tendersAPI
.getAssignableEmployees()
.then((list) => setEmployees(list))
.catch(() => {})
}