refactored item module → stock, added legacy database creation methods

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-10-12 21:51:14 +02:00
parent fea21872e3
commit 74e602eec7
21 changed files with 208 additions and 188 deletions

View File

@@ -38,7 +38,7 @@ public class CompanyModule extends BaseHandler implements CompanyService {
var company = get(companyId);
if (!membership(companyId,user.id())) throw forbidden("You are mot a member of company {0}",company.name());
if (!documentService().list(companyId).isEmpty()) throw forbidden("There are documents owned by {0}",company.name());
if (!itemService().list(companyId).isEmpty()) throw forbidden("There are items owned by {0}",company.name());
if (!itemService().redefineMe(companyId).isEmpty()) throw forbidden("There are items owned by {0}",company.name());
if (!projectService().listCompanyProjects(companyId,true).isEmpty()) throw forbidden("There are projects owned by {0}",company.name());
return sendContent(ex, companyDb.drop(companyId));
}