Add contract management and invoice settings pages

- Created a new Blade view for managing brand contracts with forms for adding and editing contracts, including client and category selection.
- Implemented success message notifications for contract actions.
- Added a new Blade view for invoice settings, allowing customization of invoice number format, header branding, and default values for new invoices.
- Introduced a new PDF view for generating rate cards with customizable styles based on user profile settings.
- Developed a profile management page for rate cards, enabling users to update their identity, appearance, and visibility settings.
This commit is contained in:
I-Fun
2026-04-01 21:47:34 +07:00
parent d3c35ad730
commit 22f03ccca7
48 changed files with 2415 additions and 296 deletions

View File

@@ -134,11 +134,12 @@
</div>
@elseif($setting->channel === 'whatsapp')
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
<div>
<label class="text-xs font-semibold text-gray-600 block mb-1">WAHA URL</label>
<input type="url" name="config[waha_url]"
value="{{ $setting->config['waha_url'] ?? '' }}"
class="input-soft text-sm" placeholder="http://localhost:3000">
<div class="sm:col-span-2">
<label class="text-xs font-semibold text-gray-600 block mb-1">WAHA Endpoint</label>
<input type="url" name="config[waha_endpoint]"
value="{{ $setting->config['waha_endpoint'] ?? '' }}"
class="input-soft text-sm" placeholder="http://localhost:3000/api/sendText">
<p class="text-xs text-gray-400 mt-1">Full URL to the sendText endpoint</p>
</div>
<div>
<label class="text-xs font-semibold text-gray-600 block mb-1">Session Name</label>
@@ -146,11 +147,21 @@
value="{{ $setting->config['waha_session'] ?? 'default' }}"
class="input-soft text-sm" placeholder="default">
</div>
<div>
<label class="text-xs font-semibold text-gray-600 block mb-1">API Key
<span class="font-normal text-gray-400">(if required)</span>
</label>
<input type="text" name="config[api_key]"
value="{{ $setting->config['api_key'] ?? '' }}"
class="input-soft text-sm" placeholder="your-waha-api-key">
<p class="text-xs text-gray-400 mt-1">Sent as <code>X-Api-Key</code> header. Leave blank if WAHA has no auth.</p>
</div>
<div class="sm:col-span-2">
<label class="text-xs font-semibold text-gray-600 block mb-1">Phone Number</label>
<input type="text" name="config[phone]"
value="{{ $setting->config['phone'] ?? '' }}"
class="input-soft text-sm" placeholder="628123456789">
<label class="text-xs font-semibold text-gray-600 block mb-1">Chat ID</label>
<input type="text" name="config[chat_id]"
value="{{ $setting->config['chat_id'] ?? '' }}"
class="input-soft text-sm" placeholder="628123456789@c.us or 120363xxx@g.us">
<p class="text-xs text-gray-400 mt-1">Individual: <code>628xxx@c.us</code> · Group: <code>120363xxx@g.us</code></p>
</div>
</div>
@endif
@@ -238,20 +249,29 @@
{{-- WhatsApp / WAHA --}}
<div x-show="channel === 'whatsapp'" x-transition class="grid grid-cols-1 sm:grid-cols-2 gap-3">
<div>
<label class="text-xs font-semibold text-gray-600 block mb-1">WAHA API URL <span class="text-pink-400">*</span></label>
<input type="url" name="config[waha_url]" class="input-soft text-sm"
placeholder="http://localhost:3000">
<p class="text-xs text-gray-400 mt-1">Your self-hosted WAHA instance</p>
<div class="sm:col-span-2">
<label class="text-xs font-semibold text-gray-600 block mb-1">WAHA Endpoint <span class="text-pink-400">*</span></label>
<input type="url" name="config[waha_endpoint]" class="input-soft text-sm"
placeholder="http://localhost:3000/api/sendText">
<p class="text-xs text-gray-400 mt-1">Full URL to the sendText endpoint of your WAHA instance</p>
</div>
<div>
<label class="text-xs font-semibold text-gray-600 block mb-1">Session Name</label>
<input type="text" name="config[waha_session]" value="default" class="input-soft text-sm">
</div>
<div>
<label class="text-xs font-semibold text-gray-600 block mb-1">API Key
<span class="font-normal text-gray-400">(if required)</span>
</label>
<input type="text" name="config[api_key]" class="input-soft text-sm"
placeholder="your-waha-api-key">
<p class="text-xs text-gray-400 mt-1">Sent as <code class="bg-gray-100 px-1 rounded">X-Api-Key</code> header. Leave blank if WAHA has no auth.</p>
</div>
<div class="sm:col-span-2">
<label class="text-xs font-semibold text-gray-600 block mb-1">Phone Number <span class="text-pink-400">*</span></label>
<input type="text" name="config[phone]" class="input-soft text-sm"
placeholder="628123456789 (country code, no +)">
<label class="text-xs font-semibold text-gray-600 block mb-1">Chat ID <span class="text-pink-400">*</span></label>
<input type="text" name="config[chat_id]" class="input-soft text-sm"
placeholder="628123456789@c.us or 120363xxx@g.us">
<p class="text-xs text-gray-400 mt-1">Individual: <code class="bg-gray-100 px-1 rounded">628xxx@c.us</code> · Group: <code class="bg-gray-100 px-1 rounded">120363xxx@g.us</code></p>
</div>
</div>