feat: add works import from Excel (check and plan)
New "Импорт работ из Excel" section checks the planned volumes file against /Import/StroyBot/Works as soon as it is picked. The builder turns checked rows into works and decides per work whether to create it or update the volume and unit of an existing work with the same title on the object. Saving comes next. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,7 @@ export function getStatusKind(status: string | undefined): ProjectStatusKind {
|
||||
* - нет права edit0 — нельзя «Отправить отчёт».
|
||||
* Импорт отчёта из Excel создаёт отчёты — те же правила, что у «Отправить отчёт».
|
||||
* Привязка к справочнику — только с правом редактирования (решение при объединении).
|
||||
* Импорт работ из Excel меняет работы проекта — тоже только с правом редактирования.
|
||||
*/
|
||||
export function isSectionAvailable(page: PageId, project: IAccessibleProject): boolean {
|
||||
if (page === 'hub') return true;
|
||||
@@ -82,7 +83,7 @@ export function isSectionAvailable(page: PageId, project: IAccessibleProject): b
|
||||
const kind = getStatusKind(project.status);
|
||||
if (kind === 'archive') return false;
|
||||
if (page === 'report' || page === 'reportImport') return kind !== 'done' && project.canEdit;
|
||||
if (page === 'binder') return project.canEdit;
|
||||
if (page === 'binder' || page === 'worksImport') return project.canEdit;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user