feat: add company detail page and transfer ownership UI

- Add company-detail.html with status cards, info sections, vendors list
- Add company-edit.html with transfer ownership modal
- Add company-detail.js and company-edit.js
- Add user search autocomplete for transfer ownership
- Add inline validation errors for transfer form
- Add View button to companies list page
- Add route for /admin/companies/{id} detail page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-02 19:39:40 +01:00
parent 66c967a04e
commit 4ef3e6eba3
7 changed files with 1385 additions and 9 deletions

View File

@@ -33,15 +33,17 @@
<span x-html="$icon('check-circle', 'w-5 h-5 mr-3 mt-0.5 flex-shrink-0')"></span>
<div class="flex-1">
<p class="font-semibold">Company Created Successfully!</p>
<div x-show="ownerCredentials" class="mt-2 p-3 bg-white rounded border border-green-300">
<p class="text-sm font-semibold mb-2">Owner Login Credentials (Save these!):</p>
<div class="space-y-1 text-sm font-mono">
<div><span class="font-bold">Email:</span> <span x-text="ownerCredentials.email"></span></div>
<div><span class="font-bold">Password:</span> <span x-text="ownerCredentials.password" class="bg-yellow-100 px-2 py-1 rounded"></span></div>
<div><span class="font-bold">Login URL:</span> <span x-text="ownerCredentials.login_url"></span></div>
<template x-if="ownerCredentials">
<div class="mt-2 p-3 bg-white rounded border border-green-300">
<p class="text-sm font-semibold mb-2">Owner Login Credentials (Save these!):</p>
<div class="space-y-1 text-sm font-mono">
<div><span class="font-bold">Email:</span> <span x-text="ownerCredentials.email"></span></div>
<div><span class="font-bold">Password:</span> <span x-text="ownerCredentials.password" class="bg-yellow-100 px-2 py-1 rounded"></span></div>
<div><span class="font-bold">Login URL:</span> <span x-text="ownerCredentials.login_url"></span></div>
</div>
<p class="mt-2 text-xs text-red-600">⚠️ The password will only be shown once. Please save it now!</p>
</div>
<p class="mt-2 text-xs text-red-600">⚠️ The password will only be shown once. Please save it now!</p>
</div>
</template>
</div>
</div>
</div>
@@ -259,7 +261,7 @@ function adminCompanyCreate() {
try {
console.log('Creating company:', this.formData);
const response = await apiClient.post('/api/v1/admin/companies', this.formData);
const response = await apiClient.post('/admin/companies', this.formData);
console.log('Company created successfully:', response);