edits for suppliers & projects
This commit is contained in:
@@ -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(() => {})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user