From cbe9f16dcd1d0b2570123caebe43c7bc41cd21d5 Mon Sep 17 00:00:00 2001 From: suraj kashyap Date: Mon, 24 Jun 2024 15:00:42 +0530 Subject: [PATCH 1/8] Add expires_at column to personal access token. --- .../2019_12_14_000001_create_personal_access_tokens_table.php | 1 + 1 file changed, 1 insertion(+) diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php index 3ce00023a..5e35c1669 100644 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -20,6 +20,7 @@ public function up() $table->string('token', 64)->unique(); $table->text('abilities')->nullable(); $table->timestamp('last_used_at')->nullable(); + $table->timestamp('expires_at')->nullable(); $table->timestamps(); }); } From 15a614c5085ba148333eca0892359f21450fe88a Mon Sep 17 00:00:00 2001 From: suraj kashyap Date: Tue, 25 Jun 2024 10:11:02 +0530 Subject: [PATCH 2/8] Update User profile updatation. --- .../Controllers/User/AccountController.php | 43 ++++++++++++++++--- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/packages/Webkul/Admin/src/Http/Controllers/User/AccountController.php b/packages/Webkul/Admin/src/Http/Controllers/User/AccountController.php index 5d0447e5e..b9edb5a0c 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/User/AccountController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/User/AccountController.php @@ -4,6 +4,7 @@ use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Event; +use Illuminate\Support\Facades\Storage; use Webkul\Admin\Http\Controllers\Controller; class AccountController extends Controller @@ -61,13 +62,7 @@ public function update() $data['password'] = bcrypt($data['password']); } - if (request()->hasFile('image')) { - $data['image'] = request()->file('image')->store('users/' . $user->id); - } - - if (isset($data['remove_image']) && $data['remove_image'] !== '') { - $data['image'] = null; - } + $this->handleProfileImageUpload($data, $user); $user->update($data); @@ -79,4 +74,38 @@ public function update() return redirect()->route('admin.dashboard.index'); } + + /** + * Handle profile image upload. + * + * @param array $data + * @param Object $user + * @return void + */ + public function handleProfileImageUpload(&$data, $user) + { + $oldImage = $user->image; + + if (! isset($data['image'])) { + $data['image'] = $user->image; + } + + if (request()->hasFile('image')) { + $data['image'] = request()->file('image')->store('users/' . $user->id); + } + + if ( + isset($data['remove_image']) + && $data['remove_image'] !== '' + ) { + $data['image'] = null; + } + + if ( + $oldImage + && ($data['image'] !== $oldImage) + ) { + Storage::delete($oldImage); + } + } } From f996e2bda9fdadea1f0b61b3ffed8e65db055c07 Mon Sep 17 00:00:00 2001 From: suraj kashyap Date: Tue, 25 Jun 2024 11:40:44 +0530 Subject: [PATCH 3/8] Leads Creation handle validation errros. --- .../Admin/src/Http/Requests/LeadForm.php | 22 +- .../Admin/src/Resources/lang/ar/app.php | 214 +++++++++--------- .../Admin/src/Resources/lang/en/app.php | 214 +++++++++--------- .../Admin/src/Resources/lang/es/app.php | 214 +++++++++--------- .../Admin/src/Resources/lang/fa/app.php | 214 +++++++++--------- .../Admin/src/Resources/lang/tr/app.php | 214 +++++++++--------- 6 files changed, 566 insertions(+), 526 deletions(-) diff --git a/packages/Webkul/Admin/src/Http/Requests/LeadForm.php b/packages/Webkul/Admin/src/Http/Requests/LeadForm.php index fc6839e00..f8417da74 100644 --- a/packages/Webkul/Admin/src/Http/Requests/LeadForm.php +++ b/packages/Webkul/Admin/src/Http/Requests/LeadForm.php @@ -129,6 +129,26 @@ public function rules() } } - return $this->rules; + return [ + ...$this->rules, + 'products' => 'array', + 'products.*.product_id' => 'sometimes|required|exists:products,id', + 'products.*.name' => 'required_with:products.*.product_id', + 'products.*.price' => 'required_with:products.*.product_id', + 'products.*.quantity' => 'required_with:products.*.product_id', + ]; + } + + /** + * Get the validation messages that apply to the request. + */ + public function messages(): array + { + return [ + 'products.*.product_id.exists' => trans('admin::app.leads.selected-product-not-exist'), + 'products.*.name.required_with' => trans('admin::app.leads.product-name-required'), + 'products.*.price.required_with' => trans('admin::app.leads.product-price-required'), + 'products.*.quantity.required_with' => trans('admin::app.leads.product-quantity-required'), + ]; } } diff --git a/packages/Webkul/Admin/src/Resources/lang/ar/app.php b/packages/Webkul/Admin/src/Resources/lang/ar/app.php index 6861888fa..a7d285a11 100644 --- a/packages/Webkul/Admin/src/Resources/lang/ar/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/ar/app.php @@ -118,111 +118,115 @@ ], 'leads' => [ - 'title' => 'يؤدي', - 'lead' => 'قيادة', - 'create-title' => 'خلق الرصاص', - 'edit-title' => 'تحرير الرصاص', - 'save-btn-title' => 'حفظ كقائد', - 'save' => 'يحفظ', - 'upload' => 'تحميل', - 'back' => 'خلف', - 'cancel' => 'يلغي', - 'no-lead' => 'لا يؤدي', - 'lead-source-name' => 'مصدر الدليل', - 'details' => 'تفاصيل', - 'rotten-info' => 'الرصاص قد تعفن ل :days day(s)', - 'stage' => 'المسرح', - 'new' => 'جديد', - 'won-lost' => 'فاز / خسر', - 'won' => 'وون', - 'lost' => 'ضائع', - 'change-stage' => 'مرحلة التغيير', - 'lost-reason' => 'سبب ضائع', - 'won-value' => 'قيمة الفوز', - 'created-date:' => 'تاريخ الإنشاء:', - 'closed-date:' => 'تاريخ مغلق:', - 'closed-date' => 'تاريخ مغلق', - 'expected-close-date:' => 'تاريخ الإغلاق المتوقع:', - 'contact-person' => 'الشخص الذي يمكن الاتصال به', - 'add-tag' => 'إضافة علامة', - 'search-tag' => 'بحث الوسم', - 'name' => 'اسم', - 'color' => 'اللون', - 'email' => 'بريد الالكتروني', - 'contact-numbers' => 'ارقام التواصل', - 'organization' => 'منظمة', - 'address' => 'عنوان', - 'products' => 'منتجات', - 'item' => 'غرض', - 'price' => 'سعر', - 'quantity' => 'كمية', - 'amount' => 'كمية', - 'create-success' => 'تم إنشاء العميل المحتمل بنجاح.', - 'update-success' => 'تم تحديث العميل المحتمل بنجاح.', - 'delete-success' => 'تم حذف الرصاص بنجاح.', - 'delete-failed' => 'لا يمكن حذف الرصاص.', - 'note' => 'ملحوظة', - 'activity' => 'نشاط', - 'title-control' => 'عنوان', - 'call' => 'مكالمة', - 'meeting' => 'لقاء', - 'lunch' => 'غداء', - 'file' => 'ملف', - 'quote' => 'اقتبس', - 'create-quote' => 'إنشاء اقتباس', - 'type' => 'نوع', - 'description' => 'وصف', - 'schedule' => 'جدول', - 'from' => 'من عند', - 'to' => 'إلى', - 'location' => 'موقع', - 'participants' => 'مشاركون', - 'participant-info' => 'ابدأ في كتابة الاسم', - 'users' => 'المستخدمون', - 'persons' => 'الأشخاص', - 'cc' => 'نسخة', - 'bcc' => 'نسخة مخفية الوجهة', - 'email-placeholder' => 'اضغط على يدخل لإضافة رسائل بريد إلكتروني', - 'file' => 'ملف', - 'subject' => 'موضوعات', - 'reply' => 'رد', - 'send' => 'يرسل', - 'all' => 'الجميع', - 'notes' => 'ملحوظات', - 'select-type' => 'اختر صنف', - 'calls' => 'المكالمات', - 'meetings' => 'الاجتماعات', - 'lunches' => 'وجبات الغداء', - 'emails' => 'رسائل البريد الإلكتروني', - 'files' => 'الملفات', - 'sales-owner' => 'مالك المبيعات', - 'person' => 'شخص', - 'expired-at' => 'منتهي الصلاحية في', - 'sub-total' => 'المجموع الفرعي', - 'discount' => 'خصم', - 'tax' => 'ضريبة', - 'adjustment' => 'تعديل', - 'grand-total' => 'المبلغ الإجمالي', - 'actions' => 'أجراءات', - 'planned' => 'مخطط', - 'done' => 'منتهي', - 'edit' => 'يحرر', - 'view' => 'منظر', - 'unlink' => 'إلغاء الارتباط', - 'mark-as-done' => 'اعتبره منته', - 'remove' => 'يزيل', - 'export-to-pdf' => 'تصدير إلى PDF', - 'empty-planned-activities' => 'ليس لديك أنشطة مخطط لها.', - 'empty-done-activities' => 'لم تقم بأي أنشطة.', - 'note-added' => 'تمت إضافة الملاحظة', - 'call-scheduled' => 'تمت جدولة المكالمة في :from - :to', - 'meeting-scheduled' => 'الاجتماع المقرر في :from - :to', - 'lunch-scheduled' => 'الغداء المقرر في :from - :to', - 'file-added' => 'تمت إضافة الملف', - 'quote-destroy-success' => 'تمت إزالة الاقتباس بنجاح.', - 'tag-create-success' => 'تمت إضافة العلامة بنجاح.', - 'tag-destroy-success' => 'تمت إزالة العلامة بنجاح.', - 'edit' => 'تعديل', + 'title' => 'يؤدي', + 'lead' => 'قيادة', + 'create-title' => 'خلق الرصاص', + 'edit-title' => 'تحرير الرصاص', + 'save-btn-title' => 'حفظ كقائد', + 'save' => 'يحفظ', + 'upload' => 'تحميل', + 'back' => 'خلف', + 'cancel' => 'يلغي', + 'no-lead' => 'لا يؤدي', + 'lead-source-name' => 'مصدر الدليل', + 'details' => 'تفاصيل', + 'rotten-info' => 'الرصاص قد تعفن ل :days day(s)', + 'stage' => 'المسرح', + 'new' => 'جديد', + 'won-lost' => 'فاز / خسر', + 'won' => 'وون', + 'lost' => 'ضائع', + 'change-stage' => 'مرحلة التغيير', + 'lost-reason' => 'سبب ضائع', + 'won-value' => 'قيمة الفوز', + 'created-date:' => 'تاريخ الإنشاء:', + 'closed-date:' => 'تاريخ مغلق:', + 'closed-date' => 'تاريخ مغلق', + 'expected-close-date:' => 'تاريخ الإغلاق المتوقع:', + 'contact-person' => 'الشخص الذي يمكن الاتصال به', + 'add-tag' => 'إضافة علامة', + 'search-tag' => 'بحث الوسم', + 'name' => 'اسم', + 'color' => 'اللون', + 'email' => 'بريد الالكتروني', + 'contact-numbers' => 'ارقام التواصل', + 'organization' => 'منظمة', + 'address' => 'عنوان', + 'products' => 'منتجات', + 'item' => 'غرض', + 'price' => 'سعر', + 'quantity' => 'كمية', + 'amount' => 'كمية', + 'create-success' => 'تم إنشاء العميل المحتمل بنجاح.', + 'update-success' => 'تم تحديث العميل المحتمل بنجاح.', + 'delete-success' => 'تم حذف الرصاص بنجاح.', + 'delete-failed' => 'لا يمكن حذف الرصاص.', + 'product-quantity-required' => 'الكمية المطلوبة للمنتج مطلوبة عندما يكون معرف المنتج موجودًا.', + 'product-price-required' => 'سعر المنتج مطلوب عندما يكون معرف المنتج موجودًا.', + 'product-name-required' => 'اسم المنتج مطلوب عندما يكون معرف المنتج موجودًا.', + 'selected-product-not-exist' => 'معرف المنتج المحدد غير موجود.', + 'note' => 'ملحوظة', + 'activity' => 'نشاط', + 'title-control' => 'عنوان', + 'call' => 'مكالمة', + 'meeting' => 'لقاء', + 'lunch' => 'غداء', + 'file' => 'ملف', + 'quote' => 'اقتبس', + 'create-quote' => 'إنشاء اقتباس', + 'type' => 'نوع', + 'description' => 'وصف', + 'schedule' => 'جدول', + 'from' => 'من عند', + 'to' => 'إلى', + 'location' => 'موقع', + 'participants' => 'مشاركون', + 'participant-info' => 'ابدأ في كتابة الاسم', + 'users' => 'المستخدمون', + 'persons' => 'الأشخاص', + 'cc' => 'نسخة', + 'bcc' => 'نسخة مخفية الوجهة', + 'email-placeholder' => 'اضغط على يدخل لإضافة رسائل بريد إلكتروني', + 'file' => 'ملف', + 'subject' => 'موضوعات', + 'reply' => 'رد', + 'send' => 'يرسل', + 'all' => 'الجميع', + 'notes' => 'ملحوظات', + 'select-type' => 'اختر صنف', + 'calls' => 'المكالمات', + 'meetings' => 'الاجتماعات', + 'lunches' => 'وجبات الغداء', + 'emails' => 'رسائل البريد الإلكتروني', + 'files' => 'الملفات', + 'sales-owner' => 'مالك المبيعات', + 'person' => 'شخص', + 'expired-at' => 'منتهي الصلاحية في', + 'sub-total' => 'المجموع الفرعي', + 'discount' => 'خصم', + 'tax' => 'ضريبة', + 'adjustment' => 'تعديل', + 'grand-total' => 'المبلغ الإجمالي', + 'actions' => 'أجراءات', + 'planned' => 'مخطط', + 'done' => 'منتهي', + 'edit' => 'يحرر', + 'view' => 'منظر', + 'unlink' => 'إلغاء الارتباط', + 'mark-as-done' => 'اعتبره منته', + 'remove' => 'يزيل', + 'export-to-pdf' => 'تصدير إلى PDF', + 'empty-planned-activities' => 'ليس لديك أنشطة مخطط لها.', + 'empty-done-activities' => 'لم تقم بأي أنشطة.', + 'note-added' => 'تمت إضافة الملاحظة', + 'call-scheduled' => 'تمت جدولة المكالمة في :from - :to', + 'meeting-scheduled' => 'الاجتماع المقرر في :from - :to', + 'lunch-scheduled' => 'الغداء المقرر في :from - :to', + 'file-added' => 'تمت إضافة الملف', + 'quote-destroy-success' => 'تمت إزالة الاقتباس بنجاح.', + 'tag-create-success' => 'تمت إضافة العلامة بنجاح.', + 'tag-destroy-success' => 'تمت إزالة العلامة بنجاح.', + 'edit' => 'تعديل', ], 'quotes' => [ diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 87474ca5b..feb087076 100644 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -118,111 +118,115 @@ ], 'leads' => [ - 'title' => 'Leads', - 'lead' => 'Lead', - 'create-title' => 'Create Lead', - 'edit-title' => 'Edit Lead', - 'save-btn-title' => 'Save as Lead', - 'save' => 'Save', - 'upload' => 'Upload', - 'back' => 'Back', - 'cancel' => 'Cancel', - 'no-lead' => 'No Lead', - 'lead-source-name' => 'Lead source', - 'details' => 'Details', - 'rotten-info' => 'Lead has been rotten for :days day(s)', - 'stage' => 'Stage', - 'new' => 'New', - 'won-lost' => 'Won/Lost', - 'won' => 'Won', - 'lost' => 'Lost', - 'change-stage' => 'Change Stage', - 'lost-reason' => 'Lost Reason', - 'won-value' => 'Won Value', - 'created-date:' => 'Created Date:', - 'closed-date:' => 'Closed Date:', - 'closed-date' => 'Closed Date', - 'expected-close-date:' => 'Expected Close Date:', - 'contact-person' => 'Contact Person', - 'add-tag' => 'Add Tag', - 'search-tag' => 'Search Tag', - 'name' => 'Name', - 'color' => 'Color', - 'email' => 'Email', - 'contact-numbers' => 'Contact Numbers', - 'organization' => 'Organization', - 'address' => 'Address', - 'products' => 'Products', - 'item' => 'Item', - 'price' => 'Price', - 'quantity' => 'Quantity', - 'amount' => 'Amount', - 'create-success' => 'Lead created successfully.', - 'update-success' => 'Lead updated successfully.', - 'delete-success' => 'Lead deleted successfully.', - 'delete-failed' => 'Lead can not be deleted.', - 'note' => 'Note', - 'activity' => 'Activity', - 'title-control' => 'Title', - 'call' => 'Call', - 'meeting' => 'Meeting', - 'lunch' => 'Lunch', - 'file' => 'File', - 'quote' => 'Quote', - 'create-quote' => 'Create Quote', - 'type' => 'Type', - 'description' => 'Description', - 'schedule' => 'Schedule', - 'from' => 'From', - 'to' => 'To', - 'location' => 'Location', - 'participants' => 'Participants', - 'participant-info' => 'Start typing name', - 'users' => 'Users', - 'persons' => 'Persons', - 'cc' => 'Cc', - 'bcc' => 'Bcc', - 'email-placeholder' => 'Press enter to add emails', - 'file' => 'File', - 'subject' => 'Subject', - 'reply' => 'Reply', - 'send' => 'Send', - 'all' => 'All', - 'notes' => 'Notes', - 'select-type' => 'Select Type', - 'calls' => 'Calls', - 'meetings' => 'Meetings', - 'lunches' => 'Lunches', - 'emails' => 'Emails', - 'files' => 'Files', - 'sales-owner' => 'Sales Owner', - 'person' => 'Person', - 'expired-at' => 'Expired At', - 'sub-total' => 'Sub Total', - 'discount' => 'Discount', - 'tax' => 'Tax', - 'adjustment' => 'Adjustment', - 'grand-total' => 'Grand Total', - 'actions' => 'Actions', - 'planned' => 'Planned', - 'done' => 'Done', - 'edit' => 'Edit', - 'view' => 'View', - 'unlink' => 'Unlink', - 'mark-as-done' => 'Mark as Done', - 'remove' => 'Remove', - 'export-to-pdf' => 'Export To PDF', - 'empty-planned-activities' => 'You have no planned activities.', - 'empty-done-activities' => 'You have no done activities.', - 'note-added' => 'Note added', - 'call-scheduled' => 'Call scheduled at :from - :to', - 'meeting-scheduled' => 'Meeting scheduled at :from - :to', - 'lunch-scheduled' => 'Lunch scheduled at :from - :to', - 'file-added' => 'File added', - 'quote-destroy-success' => 'Quote removed successfully.', - 'tag-create-success' => 'Tag added successfully.', - 'tag-destroy-success' => 'Tag removed successfully.', - 'edit' => 'Edit', + 'title' => 'Leads', + 'lead' => 'Lead', + 'create-title' => 'Create Lead', + 'edit-title' => 'Edit Lead', + 'save-btn-title' => 'Save as Lead', + 'save' => 'Save', + 'upload' => 'Upload', + 'back' => 'Back', + 'cancel' => 'Cancel', + 'no-lead' => 'No Lead', + 'lead-source-name' => 'Lead source', + 'details' => 'Details', + 'rotten-info' => 'Lead has been rotten for :days day(s)', + 'stage' => 'Stage', + 'new' => 'New', + 'won-lost' => 'Won/Lost', + 'won' => 'Won', + 'lost' => 'Lost', + 'change-stage' => 'Change Stage', + 'lost-reason' => 'Lost Reason', + 'won-value' => 'Won Value', + 'created-date:' => 'Created Date:', + 'closed-date:' => 'Closed Date:', + 'closed-date' => 'Closed Date', + 'expected-close-date:' => 'Expected Close Date:', + 'contact-person' => 'Contact Person', + 'add-tag' => 'Add Tag', + 'search-tag' => 'Search Tag', + 'name' => 'Name', + 'color' => 'Color', + 'email' => 'Email', + 'contact-numbers' => 'Contact Numbers', + 'organization' => 'Organization', + 'address' => 'Address', + 'products' => 'Products', + 'item' => 'Item', + 'price' => 'Price', + 'quantity' => 'Quantity', + 'amount' => 'Amount', + 'create-success' => 'Lead created successfully.', + 'update-success' => 'Lead updated successfully.', + 'delete-success' => 'Lead deleted successfully.', + 'delete-failed' => 'Lead can not be deleted.', + 'product-quantity-required' => 'The product quantity is required when a product ID is present.', + 'product-price-required' => 'The product price is required when a product ID is present.', + 'product-name-required' => 'The product name is required when a product ID is present.', + 'selected-product-not-exist' => 'The selected product ID does not exist.', + 'note' => 'Note', + 'activity' => 'Activity', + 'title-control' => 'Title', + 'call' => 'Call', + 'meeting' => 'Meeting', + 'lunch' => 'Lunch', + 'file' => 'File', + 'quote' => 'Quote', + 'create-quote' => 'Create Quote', + 'type' => 'Type', + 'description' => 'Description', + 'schedule' => 'Schedule', + 'from' => 'From', + 'to' => 'To', + 'location' => 'Location', + 'participants' => 'Participants', + 'participant-info' => 'Start typing name', + 'users' => 'Users', + 'persons' => 'Persons', + 'cc' => 'Cc', + 'bcc' => 'Bcc', + 'email-placeholder' => 'Press enter to add emails', + 'file' => 'File', + 'subject' => 'Subject', + 'reply' => 'Reply', + 'send' => 'Send', + 'all' => 'All', + 'notes' => 'Notes', + 'select-type' => 'Select Type', + 'calls' => 'Calls', + 'meetings' => 'Meetings', + 'lunches' => 'Lunches', + 'emails' => 'Emails', + 'files' => 'Files', + 'sales-owner' => 'Sales Owner', + 'person' => 'Person', + 'expired-at' => 'Expired At', + 'sub-total' => 'Sub Total', + 'discount' => 'Discount', + 'tax' => 'Tax', + 'adjustment' => 'Adjustment', + 'grand-total' => 'Grand Total', + 'actions' => 'Actions', + 'planned' => 'Planned', + 'done' => 'Done', + 'edit' => 'Edit', + 'view' => 'View', + 'unlink' => 'Unlink', + 'mark-as-done' => 'Mark as Done', + 'remove' => 'Remove', + 'export-to-pdf' => 'Export To PDF', + 'empty-planned-activities' => 'You have no planned activities.', + 'empty-done-activities' => 'You have no done activities.', + 'note-added' => 'Note added', + 'call-scheduled' => 'Call scheduled at :from - :to', + 'meeting-scheduled' => 'Meeting scheduled at :from - :to', + 'lunch-scheduled' => 'Lunch scheduled at :from - :to', + 'file-added' => 'File added', + 'quote-destroy-success' => 'Quote removed successfully.', + 'tag-create-success' => 'Tag added successfully.', + 'tag-destroy-success' => 'Tag removed successfully.', + 'edit' => 'Edit', ], 'quotes' => [ diff --git a/packages/Webkul/Admin/src/Resources/lang/es/app.php b/packages/Webkul/Admin/src/Resources/lang/es/app.php index 69fb97be2..ace91feb8 100644 --- a/packages/Webkul/Admin/src/Resources/lang/es/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/es/app.php @@ -118,111 +118,115 @@ ], 'leads' => [ - 'title' => 'Oportunidades', - 'lead' => 'Oportunidad', - 'create-title' => 'Crear Oportunidad', - 'edit-title' => 'Editar Oportunidad', - 'save-btn-title' => 'Guardar Oportunidad', - 'save' => 'Guardar', - 'upload' => 'Cargar', - 'back' => 'Atrás', - 'cancel' => 'Cancelar', - 'no-lead' => 'Sin Oportunidad', - 'lead-source-name' => 'Oportunidad Origen ', - 'details' => 'Detalles', - 'rotten-info' => 'Oportunidad expirada durante :days dia(s)', - 'stage' => 'Etapa', - 'new' => 'Nuevo', - 'won-lost' => 'Ganada/Perdida', - 'won' => 'Ganada', - 'lost' => 'Perdida', - 'change-stage' => 'Cambiar Etapa', - 'lost-reason' => 'Razón Perdida', - 'won-value' => 'Ganancia', - 'created-date:' => 'Creado Fecha:', - 'closed-date:' => 'Cerrado Fecha:', - 'closed-date' => 'Cerrado Fecha', - 'expected-close-date:' => 'Cierre Previsto:', - 'contact-person' => 'Persona Contacto', - 'add-tag' => 'Agregar Etiqueta', - 'search-tag' => 'Buscar Etiqueta', - 'name' => 'Nombre', - 'color' => 'Color', - 'email' => 'Email', - 'contact-numbers' => 'Teléfonos Contacto', - 'organization' => 'Organización', - 'address' => 'Dirección', - 'products' => 'Productos', - 'item' => 'Articulo', - 'price' => 'Precio', - 'quantity' => 'Cantidad', - 'amount' => 'Monto', - 'create-success' => 'Oportunidad creada con éxito.', - 'update-success' => 'Oportunidad actualizada con éxito.', - 'delete-success' => 'Oportunidad eliminada con éxito.', - 'delete-failed' => 'Oportunidad no pudo ser eliminada', - 'note' => 'Nota', - 'activity' => 'Actividad', - 'title-control' => 'Titulo', - 'call' => 'Llamada', - 'meeting' => 'Reunion', - 'lunch' => 'Almuerzo', - 'file' => 'Archivo', - 'quote' => 'Presupuesto', - 'create-quote' => 'Crear Presupuesto', - 'type' => 'Tipo', - 'description' => 'Descripción', - 'schedule' => 'Agenda', - 'from' => 'De', - 'to' => 'A', - 'location' => 'Ubicación', - 'participants' => 'Participantes', - 'participant-info' => 'Introduzca el nombre', - 'users' => 'Usuarios', - 'persons' => 'Personas', - 'cc' => 'Cc', - 'bcc' => 'Bcc', - 'email-placeholder' => 'Presione enter para agregar emails', - 'file' => 'Archivo', - 'subject' => 'Asunto', - 'reply' => 'Responder', - 'send' => 'Enviar', - 'all' => 'Todos', - 'notes' => 'Notas', - 'select-type' => 'Seleccionar Tipo', - 'calls' => 'Llamadas', - 'meetings' => 'Reuniones', - 'lunches' => 'Almuerzos', - 'emails' => 'Emails', - 'files' => 'Archivos', - 'sales-owner' => 'Encargado Venta', - 'person' => 'Persona', - 'expired-at' => 'Expirado en', - 'sub-total' => 'Sub-Total', - 'discount' => 'Descuento', - 'tax' => 'Impuesto', - 'adjustment' => 'Ajuste', - 'grand-total' => 'Total General', - 'actions' => 'Acciones', - 'planned' => 'Planificado', - 'done' => 'Realizado', - 'edit' => 'Editar', - 'view' => 'Ver', - 'unlink' => 'Desvincular', - 'mark-as-done' => 'Marcar Realizado', - 'remove' => 'Remover', - 'export-to-pdf' => 'Exportar a PDF', - 'empty-planned-activities' => 'No tiene actividades planificadas.', - 'empty-done-activities' => 'No tiene actividades realizadas.', - 'note-added' => 'Nota agregada', - 'call-scheduled' => 'Llamada agendada en :from - :to', - 'meeting-scheduled' => 'Reunion agendada en :from - :to', - 'lunch-scheduled' => 'Almuerzo agendado en :from - :to', - 'file-added' => 'Archivo agregado', - 'quote-destroy-success' => 'Presupuesto eliminado con éxito.', - 'tag-create-success' => 'Etiqueta agregada con éxito.', - 'tag-destroy-success' => 'Etiqueta eliminada con éxito.', - 'edit' => 'Editar', + 'title' => 'Oportunidades', + 'lead' => 'Oportunidad', + 'create-title' => 'Crear Oportunidad', + 'edit-title' => 'Editar Oportunidad', + 'save-btn-title' => 'Guardar Oportunidad', + 'save' => 'Guardar', + 'upload' => 'Cargar', + 'back' => 'Atrás', + 'cancel' => 'Cancelar', + 'no-lead' => 'Sin Oportunidad', + 'lead-source-name' => 'Oportunidad Origen ', + 'details' => 'Detalles', + 'rotten-info' => 'Oportunidad expirada durante :days dia(s)', + 'stage' => 'Etapa', + 'new' => 'Nuevo', + 'won-lost' => 'Ganada/Perdida', + 'won' => 'Ganada', + 'lost' => 'Perdida', + 'change-stage' => 'Cambiar Etapa', + 'lost-reason' => 'Razón Perdida', + 'won-value' => 'Ganancia', + 'created-date:' => 'Creado Fecha:', + 'closed-date:' => 'Cerrado Fecha:', + 'closed-date' => 'Cerrado Fecha', + 'expected-close-date:' => 'Cierre Previsto:', + 'contact-person' => 'Persona Contacto', + 'add-tag' => 'Agregar Etiqueta', + 'search-tag' => 'Buscar Etiqueta', + 'name' => 'Nombre', + 'color' => 'Color', + 'email' => 'Email', + 'contact-numbers' => 'Teléfonos Contacto', + 'organization' => 'Organización', + 'address' => 'Dirección', + 'products' => 'Productos', + 'item' => 'Articulo', + 'price' => 'Precio', + 'quantity' => 'Cantidad', + 'amount' => 'Monto', + 'create-success' => 'Oportunidad creada con éxito.', + 'update-success' => 'Oportunidad actualizada con éxito.', + 'delete-success' => 'Oportunidad eliminada con éxito.', + 'delete-failed' => 'Oportunidad no pudo ser eliminada', + 'product-quantity-required' => 'La cantidad del producto es obligatoria cuando el ID del producto está presente.', + 'product-price-required' => 'El precio del producto es obligatorio cuando el ID del producto está presente.', + 'product-name-required' => 'El nombre del producto es obligatorio cuando el ID del producto está presente.', + 'selected-product-not-exist' => 'El ID del producto seleccionado no existe.', + 'note' => 'Nota', + 'activity' => 'Actividad', + 'title-control' => 'Titulo', + 'call' => 'Llamada', + 'meeting' => 'Reunion', + 'lunch' => 'Almuerzo', + 'file' => 'Archivo', + 'quote' => 'Presupuesto', + 'create-quote' => 'Crear Presupuesto', + 'type' => 'Tipo', + 'description' => 'Descripción', + 'schedule' => 'Agenda', + 'from' => 'De', + 'to' => 'A', + 'location' => 'Ubicación', + 'participants' => 'Participantes', + 'participant-info' => 'Introduzca el nombre', + 'users' => 'Usuarios', + 'persons' => 'Personas', + 'cc' => 'Cc', + 'bcc' => 'Bcc', + 'email-placeholder' => 'Presione enter para agregar emails', + 'file' => 'Archivo', + 'subject' => 'Asunto', + 'reply' => 'Responder', + 'send' => 'Enviar', + 'all' => 'Todos', + 'notes' => 'Notas', + 'select-type' => 'Seleccionar Tipo', + 'calls' => 'Llamadas', + 'meetings' => 'Reuniones', + 'lunches' => 'Almuerzos', + 'emails' => 'Emails', + 'files' => 'Archivos', + 'sales-owner' => 'Encargado Venta', + 'person' => 'Persona', + 'expired-at' => 'Expirado en', + 'sub-total' => 'Sub-Total', + 'discount' => 'Descuento', + 'tax' => 'Impuesto', + 'adjustment' => 'Ajuste', + 'grand-total' => 'Total General', + 'actions' => 'Acciones', + 'planned' => 'Planificado', + 'done' => 'Realizado', + 'edit' => 'Editar', + 'view' => 'Ver', + 'unlink' => 'Desvincular', + 'mark-as-done' => 'Marcar Realizado', + 'remove' => 'Remover', + 'export-to-pdf' => 'Exportar a PDF', + 'empty-planned-activities' => 'No tiene actividades planificadas.', + 'empty-done-activities' => 'No tiene actividades realizadas.', + 'note-added' => 'Nota agregada', + 'call-scheduled' => 'Llamada agendada en :from - :to', + 'meeting-scheduled' => 'Reunion agendada en :from - :to', + 'lunch-scheduled' => 'Almuerzo agendado en :from - :to', + 'file-added' => 'Archivo agregado', + 'quote-destroy-success' => 'Presupuesto eliminado con éxito.', + 'tag-create-success' => 'Etiqueta agregada con éxito.', + 'tag-destroy-success' => 'Etiqueta eliminada con éxito.', + 'edit' => 'Editar', ], 'quotes' => [ diff --git a/packages/Webkul/Admin/src/Resources/lang/fa/app.php b/packages/Webkul/Admin/src/Resources/lang/fa/app.php index b23e2dd4e..f319bdc73 100644 --- a/packages/Webkul/Admin/src/Resources/lang/fa/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/fa/app.php @@ -118,111 +118,115 @@ ], 'leads' => [ - 'title' => 'سرنخ‌ها', - 'lead' => 'سرنخ', - 'create-title' => 'ایجاد سرنخ', - 'edit-title' => 'ویرایش سرنخ', - 'save-btn-title' => 'ذخیره به عنوان سرنخ', - 'save' => 'ذخیره', - 'upload' => 'آپلود', - 'back' => 'بازگشت', - 'cancel' => 'لغو', - 'no-lead' => 'بدون سرنخ', - 'lead-source-name' => 'منبع سرنخ', - 'details' => 'جزئیات', - 'rotten-info' => 'سرنخ :days روز است که سوخت شده است', - 'stage' => 'مرحله', - 'new' => 'جدید', - 'won-lost' => 'برد/باخت', - 'won' => 'برد', - 'lost' => 'باخت', - 'change-stage' => 'تغییر مرحله', - 'lost-reason' => 'دلیل باخت', - 'won-value' => 'مقدار برنده', - 'created-date:' => 'تاریخ ایجاد:', - 'closed-date:' => 'تاریخ بسته شدن:', - 'closed-date' => 'تاریخ بسته شدن', - 'expected-close-date:' => 'تاریخ بسته شدن پیش بینی شده:', - 'contact-person' => 'مخاطب شخص', - 'add-tag' => 'افزودن برچسب', - 'search-tag' => 'جستجوی برچسب', - 'name' => 'نام', - 'color' => 'رنگ', - 'email' => 'ایمیل', - 'contact-numbers' => 'شماره‌های مخاطب', - 'organization' => 'سازمان', - 'address' => 'آدرس', - 'products' => 'محصولات', - 'item' => 'آیتم', - 'price' => 'قیمت', - 'quantity' => 'تعداد', - 'amount' => 'مقدار', - 'create-success' => 'سرنخ با موفقیت ایجاد شد.', - 'update-success' => 'سرنخ با موفقیت بروزرسانی شد.', - 'delete-success' => 'سرنخ با موفقیت حذف شد.', - 'delete-failed' => 'سرنخ نمی‌تواند حذف شود.', - 'note' => 'یادداشت', - 'activity' => 'فعالیت', - 'title-control' => 'عنوان', - 'call' => 'تماس', - 'meeting' => 'جلسه', - 'lunch' => 'نهار', - 'file' => 'فایل', - 'quote' => 'پیشنهاد قیمت', - 'create-quote' => 'ایجاد پیشنهاد قیمت', - 'type' => 'نوع', - 'description' => 'توضیحات', - 'schedule' => 'زمانبندی', - 'from' => 'از', - 'to' => 'تا', - 'location' => 'موقعیت مکانی', - 'participants' => 'شرکت کنندگان', - 'participant-info' => 'شروع به تایپ کنید', - 'users' => 'کاربران', - 'persons' => 'اشخاص', - 'cc' => 'Cc', - 'bcc' => 'Bcc', - 'email-placeholder' => 'برای افزودن ایمیل‌ها Enter کنید', - 'file' => 'فایل', - 'subject' => 'موضوع', - 'reply' => 'پاسخ', - 'send' => 'ارسال', - 'all' => 'همه', - 'notes' => 'یادداشت‌ها', - 'select-type' => 'انتخاب نوع', - 'calls' => 'تماس ها', - 'meetings' => 'جلسات', - 'lunches' => 'نهارها', - 'emails' => 'ایمیل‌ها', - 'files' => 'فایل‌ها', - 'sales-owner' => 'مالک فروش', - 'person' => 'شخص', - 'expired-at' => 'منقضی شده در', - 'sub-total' => 'جمع جزء', - 'discount' => 'تخفیف', - 'tax' => 'مالیات', - 'adjustment' => 'تنظیم', - 'grand-total' => 'جمع کل', - 'actions' => 'عملیات', - 'planned' => 'برنامه ریزی شده', - 'done' => 'انجام شده', - 'edit' => 'ویرایش', - 'view' => 'نمایش', - 'unlink' => 'جدا کردن', - 'mark-as-done' => 'علامبرچسبذاری به عنوان انجام شده', - 'remove' => 'جذف', - 'export-to-pdf' => 'اکسپورت به PDF', - 'empty-planned-activities' => 'هیچ فعالیت برنامه ریزی شده‌ای ندارید.', - 'empty-done-activities' => 'هیچ فعالیت انجام شده‌ای ندارید.', - 'note-added' => 'یادداشت اضافه شد', - 'call-scheduled' => 'تماس برای :from - :to برنامه ریزی شده', - 'meeting-scheduled' => 'جلسه برای :from - :to برنامه ریزی شده', - 'lunch-scheduled' => 'نهار برای :from - :to برنامه ریزی شده', - 'file-added' => 'فایل اضافه شد', - 'quote-destroy-success' => 'پیشنهاد قیمت با موفقیت حذف شد.', - 'tag-create-success' => 'برچسب با موفقیت افزوده شد.', - 'tag-destroy-success' => 'برچسب با موفقیت حذف شد.', - 'edit' => 'ویرایش کنید', + 'title' => 'سرنخ‌ها', + 'lead' => 'سرنخ', + 'create-title' => 'ایجاد سرنخ', + 'edit-title' => 'ویرایش سرنخ', + 'save-btn-title' => 'ذخیره به عنوان سرنخ', + 'save' => 'ذخیره', + 'upload' => 'آپلود', + 'back' => 'بازگشت', + 'cancel' => 'لغو', + 'no-lead' => 'بدون سرنخ', + 'lead-source-name' => 'منبع سرنخ', + 'details' => 'جزئیات', + 'rotten-info' => 'سرنخ :days روز است که سوخت شده است', + 'stage' => 'مرحله', + 'new' => 'جدید', + 'won-lost' => 'برد/باخت', + 'won' => 'برد', + 'lost' => 'باخت', + 'change-stage' => 'تغییر مرحله', + 'lost-reason' => 'دلیل باخت', + 'won-value' => 'مقدار برنده', + 'created-date:' => 'تاریخ ایجاد:', + 'closed-date:' => 'تاریخ بسته شدن:', + 'closed-date' => 'تاریخ بسته شدن', + 'expected-close-date:' => 'تاریخ بسته شدن پیش بینی شده:', + 'contact-person' => 'مخاطب شخص', + 'add-tag' => 'افزودن برچسب', + 'search-tag' => 'جستجوی برچسب', + 'name' => 'نام', + 'color' => 'رنگ', + 'email' => 'ایمیل', + 'contact-numbers' => 'شماره‌های مخاطب', + 'organization' => 'سازمان', + 'address' => 'آدرس', + 'products' => 'محصولات', + 'item' => 'آیتم', + 'price' => 'قیمت', + 'quantity' => 'تعداد', + 'amount' => 'مقدار', + 'create-success' => 'سرنخ با موفقیت ایجاد شد.', + 'update-success' => 'سرنخ با موفقیت بروزرسانی شد.', + 'delete-success' => 'سرنخ با موفقیت حذف شد.', + 'delete-failed' => 'سرنخ نمی‌تواند حذف شود.', + 'product-quantity-required' => 'مقدار محصول در صورت وجود شناسه محصول مورد نیاز است.', + 'product-price-required' => 'قیمت محصول در صورت وجود شناسه محصول مورد نیاز است.', + 'product-name-required' => 'نام محصول در صورت وجود شناسه محصول مورد نیاز است.', + 'selected-product-not-exist' => 'شناسه محصول انتخاب شده وجود ندارد.', + 'note' => 'یادداشت', + 'activity' => 'فعالیت', + 'title-control' => 'عنوان', + 'call' => 'تماس', + 'meeting' => 'جلسه', + 'lunch' => 'نهار', + 'file' => 'فایل', + 'quote' => 'پیشنهاد قیمت', + 'create-quote' => 'ایجاد پیشنهاد قیمت', + 'type' => 'نوع', + 'description' => 'توضیحات', + 'schedule' => 'زمانبندی', + 'from' => 'از', + 'to' => 'تا', + 'location' => 'موقعیت مکانی', + 'participants' => 'شرکت کنندگان', + 'participant-info' => 'شروع به تایپ کنید', + 'users' => 'کاربران', + 'persons' => 'اشخاص', + 'cc' => 'Cc', + 'bcc' => 'Bcc', + 'email-placeholder' => 'برای افزودن ایمیل‌ها Enter کنید', + 'file' => 'فایل', + 'subject' => 'موضوع', + 'reply' => 'پاسخ', + 'send' => 'ارسال', + 'all' => 'همه', + 'notes' => 'یادداشت‌ها', + 'select-type' => 'انتخاب نوع', + 'calls' => 'تماس ها', + 'meetings' => 'جلسات', + 'lunches' => 'نهارها', + 'emails' => 'ایمیل‌ها', + 'files' => 'فایل‌ها', + 'sales-owner' => 'مالک فروش', + 'person' => 'شخص', + 'expired-at' => 'منقضی شده در', + 'sub-total' => 'جمع جزء', + 'discount' => 'تخفیف', + 'tax' => 'مالیات', + 'adjustment' => 'تنظیم', + 'grand-total' => 'جمع کل', + 'actions' => 'عملیات', + 'planned' => 'برنامه ریزی شده', + 'done' => 'انجام شده', + 'edit' => 'ویرایش', + 'view' => 'نمایش', + 'unlink' => 'جدا کردن', + 'mark-as-done' => 'علامبرچسبذاری به عنوان انجام شده', + 'remove' => 'جذف', + 'export-to-pdf' => 'اکسپورت به PDF', + 'empty-planned-activities' => 'هیچ فعالیت برنامه ریزی شده‌ای ندارید.', + 'empty-done-activities' => 'هیچ فعالیت انجام شده‌ای ندارید.', + 'note-added' => 'یادداشت اضافه شد', + 'call-scheduled' => 'تماس برای :from - :to برنامه ریزی شده', + 'meeting-scheduled' => 'جلسه برای :from - :to برنامه ریزی شده', + 'lunch-scheduled' => 'نهار برای :from - :to برنامه ریزی شده', + 'file-added' => 'فایل اضافه شد', + 'quote-destroy-success' => 'پیشنهاد قیمت با موفقیت حذف شد.', + 'tag-create-success' => 'برچسب با موفقیت افزوده شد.', + 'tag-destroy-success' => 'برچسب با موفقیت حذف شد.', + 'edit' => 'ویرایش کنید', ], 'quotes' => [ diff --git a/packages/Webkul/Admin/src/Resources/lang/tr/app.php b/packages/Webkul/Admin/src/Resources/lang/tr/app.php index b79ff0559..78e5d7dc4 100644 --- a/packages/Webkul/Admin/src/Resources/lang/tr/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/tr/app.php @@ -118,111 +118,115 @@ ], 'leads' => [ - 'title' => 'Adaylar', - 'lead' => 'Lider', - 'create-title' => 'Müşteri Adayı Oluştur', - 'edit-title' => 'Müşteri Adayını Düzenle', - 'save-btn-title' => 'Müşteri adayı olarak kaydet', - 'save' => 'Kaydet', - 'upload' => 'Yükle', - 'back' => 'Geri', - 'cancel' => 'İptal', - 'no-lead' => 'Aday Yok', - 'lead-source-name' => 'Öncü kaynak', - 'details' => 'Detaylar', - 'rotten-info' => 'Müşteri adayı :days gün(ler)', - 'stage' => 'Sahne', - 'new' => 'Yeni', - 'won-lost' => 'Kazanan/Kaybeden', - 'won' => 'Kazanan', - 'lost' => 'Kaybetme', - 'change-stage' => 'Aşamayı Değiştir', - 'lost-reason' => 'Kayıp Sebep', - 'won-value' => 'Kazanılan Değer', - 'created-date:' => 'Oluşturma Tarihi:', - 'closed-date:' => 'Kapanış Tarihi:', - 'closed-date' => 'Kapanış Tarihi', - 'expected-close-date:' => 'Beklenen Kapanış Tarihi:', - 'contact-person' => 'İlgili Kişi', - 'add-tag' => 'Etiket Ekle', - 'search-tag' => 'Etiketi Ara', - 'name' => 'İsim', - 'color' => 'Renk', - 'email' => 'E-posta', - 'contact-numbers' => 'İletişim Numaraları', - 'organization' => 'Organizasyon', - 'address' => 'Adres', - 'products' => 'Ürünler', - 'item' => 'Kalem', - 'price' => 'Fiyat', - 'quantity' => 'Miktar', - 'amount' => 'Tutar', - 'create-success' => 'Müşteri adayı başarıyla oluşturuldu.', - 'update-success' => 'Müşteri adayı başarıyla güncellendi.', - 'delete-success' => 'Müşteri adayı başarıyla silindi.', - 'delete-failed' => 'Müşteri adayı silinemez.', - 'note' => 'Not', - 'activity' => 'Etkinlik', - 'title-control' => 'Başlık', - 'call' => 'Arama Yap', - 'meeting' => 'Toplantı', - 'lunch' => 'Öğle Yemeği', - 'file' => 'Dosya', - 'quote' => 'Teklif', - 'create-quote' => 'Teklif Oluştur', - 'type' => 'Tip', - 'description' => 'Açıklama', - 'schedule' => 'Takvim', - 'from' => 'İtibaren', - 'to' => 'İle', - 'location' => 'Lokasyon', - 'participants' => 'Katılımcılar', - 'participant-info' => 'Adı yazmaya başla', - 'users' => 'Kullanıcılar', - 'persons' => 'Kişiler', - 'cc' => 'Bilgi', - 'bcc' => 'Gizli', - 'email-placeholder' => 'E-posta eklemek için enter\'a basın', - 'file' => 'Dosya', - 'subject' => 'Konu', - 'reply' => 'Cevapla', - 'send' => 'Gönder', - 'all' => 'Tümü', - 'notes' => 'Notlar', - 'select-type' => 'Tür Seç', - 'calls' => 'Aramalar', - 'meetings' => 'Toplantılar', - 'lunches' => 'Öğle Yemekleri', - 'emails' => 'E-postalar', - 'files' => 'Dosyalar', - 'sales-owner' => 'Satış Sahibi', - 'person' => 'Kişi', - 'expired-at' => 'Süresi Doldu', - 'sub-total' => 'Ara Toplam', - 'discount' => 'İndirim', - 'tax' => 'Vergi', - 'adjustment' => 'Ayarlama', - 'grand-total' => 'Genel Toplam', - 'actions' => 'Hareketler', - 'planned' => 'Planlı', - 'done' => 'Tamamla', - 'edit' => 'Düzenle', - 'view' => 'Görüntüle', - 'unlink' => 'Bağlantıyı Kaldır', - 'mark-as-done' => 'Tamamlandı olarak işaretle', - 'remove' => 'Kaldır', - 'export-to-pdf' => 'PDF\'ye Aktar', - 'empty-planned-activities' => 'Planlanmış bir etkinliğiniz yok.', - 'empty-done-activities' => 'Yaptığınız hiçbir Etkinlik yok.', - 'note-added' => 'Not eklendi', - 'call-scheduled' => 'Çağrı şu saatte planlandı :from - :to', - 'meeting-scheduled' => 'Toplantı :from - :to da planlandı', - 'lunch-scheduled' => 'Öğle yemeği :from - :to saatinde planlanmıştır', - 'file-added' => 'Dosya eklendi', - 'quote-destroy-success' => 'Alıntı başarıyla kaldırıldı.', - 'tag-create-success' => 'Etiket başarıyla eklendi.', - 'tag-destroy-success' => 'Etiket başarıyla kaldırıldı.', - 'edit' => 'Düzenlemek', + 'title' => 'Adaylar', + 'lead' => 'Lider', + 'create-title' => 'Müşteri Adayı Oluştur', + 'edit-title' => 'Müşteri Adayını Düzenle', + 'save-btn-title' => 'Müşteri adayı olarak kaydet', + 'save' => 'Kaydet', + 'upload' => 'Yükle', + 'back' => 'Geri', + 'cancel' => 'İptal', + 'no-lead' => 'Aday Yok', + 'lead-source-name' => 'Öncü kaynak', + 'details' => 'Detaylar', + 'rotten-info' => 'Müşteri adayı :days gün(ler)', + 'stage' => 'Sahne', + 'new' => 'Yeni', + 'won-lost' => 'Kazanan/Kaybeden', + 'won' => 'Kazanan', + 'lost' => 'Kaybetme', + 'change-stage' => 'Aşamayı Değiştir', + 'lost-reason' => 'Kayıp Sebep', + 'won-value' => 'Kazanılan Değer', + 'created-date:' => 'Oluşturma Tarihi:', + 'closed-date:' => 'Kapanış Tarihi:', + 'closed-date' => 'Kapanış Tarihi', + 'expected-close-date:' => 'Beklenen Kapanış Tarihi:', + 'contact-person' => 'İlgili Kişi', + 'add-tag' => 'Etiket Ekle', + 'search-tag' => 'Etiketi Ara', + 'name' => 'İsim', + 'color' => 'Renk', + 'email' => 'E-posta', + 'contact-numbers' => 'İletişim Numaraları', + 'organization' => 'Organizasyon', + 'address' => 'Adres', + 'products' => 'Ürünler', + 'item' => 'Kalem', + 'price' => 'Fiyat', + 'quantity' => 'Miktar', + 'amount' => 'Tutar', + 'create-success' => 'Müşteri adayı başarıyla oluşturuldu.', + 'update-success' => 'Müşteri adayı başarıyla güncellendi.', + 'delete-success' => 'Müşteri adayı başarıyla silindi.', + 'delete-failed' => 'Müşteri adayı silinemez.', + 'product-quantity-required' => 'Ürün miktarı, ürün kimliği mevcut olduğunda gereklidir.', + 'product-price-required' => 'Ürün fiyatı, ürün kimliği mevcut olduğunda gereklidir.', + 'product-name-required' => 'Ürün adı, ürün kimliği mevcut olduğunda gereklidir.', + 'selected-product-not-exist' => 'Seçilen ürün kimliği mevcut değil.', + 'note' => 'Not', + 'activity' => 'Etkinlik', + 'title-control' => 'Başlık', + 'call' => 'Arama Yap', + 'meeting' => 'Toplantı', + 'lunch' => 'Öğle Yemeği', + 'file' => 'Dosya', + 'quote' => 'Teklif', + 'create-quote' => 'Teklif Oluştur', + 'type' => 'Tip', + 'description' => 'Açıklama', + 'schedule' => 'Takvim', + 'from' => 'İtibaren', + 'to' => 'İle', + 'location' => 'Lokasyon', + 'participants' => 'Katılımcılar', + 'participant-info' => 'Adı yazmaya başla', + 'users' => 'Kullanıcılar', + 'persons' => 'Kişiler', + 'cc' => 'Bilgi', + 'bcc' => 'Gizli', + 'email-placeholder' => 'E-posta eklemek için enter\'a basın', + 'file' => 'Dosya', + 'subject' => 'Konu', + 'reply' => 'Cevapla', + 'send' => 'Gönder', + 'all' => 'Tümü', + 'notes' => 'Notlar', + 'select-type' => 'Tür Seç', + 'calls' => 'Aramalar', + 'meetings' => 'Toplantılar', + 'lunches' => 'Öğle Yemekleri', + 'emails' => 'E-postalar', + 'files' => 'Dosyalar', + 'sales-owner' => 'Satış Sahibi', + 'person' => 'Kişi', + 'expired-at' => 'Süresi Doldu', + 'sub-total' => 'Ara Toplam', + 'discount' => 'İndirim', + 'tax' => 'Vergi', + 'adjustment' => 'Ayarlama', + 'grand-total' => 'Genel Toplam', + 'actions' => 'Hareketler', + 'planned' => 'Planlı', + 'done' => 'Tamamla', + 'edit' => 'Düzenle', + 'view' => 'Görüntüle', + 'unlink' => 'Bağlantıyı Kaldır', + 'mark-as-done' => 'Tamamlandı olarak işaretle', + 'remove' => 'Kaldır', + 'export-to-pdf' => 'PDF\'ye Aktar', + 'empty-planned-activities' => 'Planlanmış bir etkinliğiniz yok.', + 'empty-done-activities' => 'Yaptığınız hiçbir Etkinlik yok.', + 'note-added' => 'Not eklendi', + 'call-scheduled' => 'Çağrı şu saatte planlandı :from - :to', + 'meeting-scheduled' => 'Toplantı :from - :to da planlandı', + 'lunch-scheduled' => 'Öğle yemeği :from - :to saatinde planlanmıştır', + 'file-added' => 'Dosya eklendi', + 'quote-destroy-success' => 'Alıntı başarıyla kaldırıldı.', + 'tag-create-success' => 'Etiket başarıyla eklendi.', + 'tag-destroy-success' => 'Etiket başarıyla kaldırıldı.', + 'edit' => 'Düzenlemek', ], 'quotes' => [ From e42ddde3d0f7e5f71185f54a4c2774b74f8cc603 Mon Sep 17 00:00:00 2001 From: suraj kashyap Date: Tue, 25 Jun 2024 11:51:59 +0530 Subject: [PATCH 4/8] Minor changes. --- config/l5-swagger.php | 302 + .../Lead/src/Repositories/LeadRepository.php | 4 - storage/api-docs/api-docs.json | 9576 +++++++++++++++++ 3 files changed, 9878 insertions(+), 4 deletions(-) create mode 100644 config/l5-swagger.php create mode 100644 storage/api-docs/api-docs.json diff --git a/config/l5-swagger.php b/config/l5-swagger.php new file mode 100644 index 000000000..c9e1e33c2 --- /dev/null +++ b/config/l5-swagger.php @@ -0,0 +1,302 @@ + 'default', + 'documentations' => [ + 'default' => [ + 'api' => [ + 'title' => 'Krayin Rest API Documentation', + ], + + 'routes' => [ + /* + * Route for accessing api documentation interface + */ + 'api' => 'api/documentation', + 'docs' => storage_path('api-docs'), + 'oauth2_callback' => 'api/oauth2-callback', + ], + 'paths' => [ + /* + * Edit to include full URL in ui for assets + */ + 'use_absolute_path' => env('L5_SWAGGER_USE_ABSOLUTE_PATH', true), + + /* + * File name of the generated json documentation file + */ + 'docs_json' => 'api-docs.json', + + /* + * File name of the generated YAML documentation file + */ + 'docs_yaml' => 'api-docs.yaml', + + /* + * Set this to `json` or `yaml` to determine which documentation file to use in UI + */ + 'format_to_use_for_docs' => env('L5_FORMAT_TO_USE_FOR_DOCS', 'json'), + + /* + * Absolute paths to directory containing the swagger annotations are stored. + */ + 'annotations' => [ + base_path('vendor/krayin/rest-api/src/Docs'), + ], + + ], + ], + ], + 'defaults' => [ + 'routes' => [ + /* + * Route for accessing parsed swagger annotations. + */ + 'docs' => 'docs', + + /* + * Route for Oauth2 authentication callback. + */ + 'oauth2_callback' => 'api/oauth2-callback', + + /* + * Middleware allows to prevent unexpected access to API documentation + */ + 'middleware' => [ + 'api' => [], + 'asset' => [], + 'docs' => [], + 'oauth2_callback' => [], + ], + + /* + * Route Group options + */ + 'group_options' => [], + ], + + 'paths' => [ + /* + * Absolute path to location where parsed annotations will be stored + */ + 'docs' => storage_path('api-docs'), + + /* + * Absolute path to directory where to export views + */ + 'views' => base_path('resources/views/vendor/l5-swagger'), + + /* + * Edit to set the api's base path + */ + 'base' => env('L5_SWAGGER_BASE_PATH', null), + + /* + * Edit to set path where swagger ui assets should be stored + */ + 'swagger_ui_assets_path' => env('L5_SWAGGER_UI_ASSETS_PATH', 'vendor/swagger-api/swagger-ui/dist/'), + + /* + * Absolute path to directories that should be exclude from scanning + * @deprecated Please use `scanOptions.exclude` + * `scanOptions.exclude` overwrites this + */ + 'excludes' => [], + ], + + 'scanOptions' => [ + /** + * analyser: defaults to \OpenApi\StaticAnalyser . + * + * @see \OpenApi\scan + */ + 'analyser' => null, + + /** + * analysis: defaults to a new \OpenApi\Analysis . + * + * @see \OpenApi\scan + */ + 'analysis' => null, + + /** + * Custom query path processors classes. + * + * @link https://github.com/zircote/swagger-php/tree/master/Examples/schema-query-parameter-processor + * @see \OpenApi\scan + */ + 'processors' => [ + // new \App\SwaggerProcessors\SchemaQueryParameter(), + ], + + /** + * pattern: string $pattern File pattern(s) to scan (default: *.php) . + * + * @see \OpenApi\scan + */ + 'pattern' => null, + + /* + * Absolute path to directories that should be exclude from scanning + * @note This option overwrites `paths.excludes` + * @see \OpenApi\scan + */ + 'exclude' => [], + + /* + * Allows to generate specs either for OpenAPI 3.0.0 or OpenAPI 3.1.0. + * By default the spec will be in version 3.0.0 + */ + 'open_api_spec_version' => env('L5_SWAGGER_OPEN_API_SPEC_VERSION', \L5Swagger\Generator::OPEN_API_DEFAULT_SPEC_VERSION), + ], + + /* + * API security definitions. Will be generated into documentation file. + */ + 'securityDefinitions' => [ + 'securitySchemes' => [ + /* + * Examples of Security schemes + */ + /* + 'api_key_security_example' => [ // Unique name of security + 'type' => 'apiKey', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". + 'description' => 'A short description for security scheme', + 'name' => 'api_key', // The name of the header or query parameter to be used. + 'in' => 'header', // The location of the API key. Valid values are "query" or "header". + ], + 'oauth2_security_example' => [ // Unique name of security + 'type' => 'oauth2', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". + 'description' => 'A short description for oauth2 security scheme.', + 'flow' => 'implicit', // The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode". + 'authorizationUrl' => 'http://example.com/auth', // The authorization URL to be used for (implicit/accessCode) + //'tokenUrl' => 'http://example.com/auth' // The authorization URL to be used for (password/application/accessCode) + 'scopes' => [ + 'read:projects' => 'read your projects', + 'write:projects' => 'modify projects in your account', + ] + ], + */ + + /* Open API 3.0 support + 'passport' => [ // Unique name of security + 'type' => 'oauth2', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". + 'description' => 'Laravel passport oauth2 security.', + 'in' => 'header', + 'scheme' => 'https', + 'flows' => [ + "password" => [ + "authorizationUrl" => config('app.url') . '/oauth/authorize', + "tokenUrl" => config('app.url') . '/oauth/token', + "refreshUrl" => config('app.url') . '/token/refresh', + "scopes" => [] + ], + ], + ], + */ + 'sanctum_admin' => [ // Unique name of security + 'type' => 'apiKey', // Valid values are "basic", "apiKey" or "oauth2". + 'description' => 'Enter token in format (Bearer )', + 'name' => 'Authorization', // The name of the header or query parameter to be used. + 'in' => 'header', // The location of the API key. Valid values are "query" or "header". + ], + ], + 'security' => [ + /* + * Examples of Securities + */ + [ + /* + 'oauth2_security_example' => [ + 'read', + 'write' + ], + + 'passport' => [] + */ + ], + ], + ], + + /* + * Set this to `true` in development mode so that docs would be regenerated on each request + * Set this to `false` to disable swagger generation on production + */ + 'generate_always' => env('L5_SWAGGER_GENERATE_ALWAYS', false), + + /* + * Set this to `true` to generate a copy of documentation in yaml format + */ + 'generate_yaml_copy' => env('L5_SWAGGER_GENERATE_YAML_COPY', false), + + /* + * Edit to trust the proxy's ip address - needed for AWS Load Balancer + * string[] + */ + 'proxy' => false, + + /* + * Configs plugin allows to fetch external configs instead of passing them to SwaggerUIBundle. + * See more at: https://github.com/swagger-api/swagger-ui#configs-plugin + */ + 'additional_config_url' => null, + + /* + * Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), + * 'method' (sort by HTTP method). + * Default is the order returned by the server unchanged. + */ + 'operations_sort' => env('L5_SWAGGER_OPERATIONS_SORT', null), + + /* + * Pass the validatorUrl parameter to SwaggerUi init on the JS side. + * A null value here disables validation. + */ + 'validator_url' => null, + + /* + * Swagger UI configuration parameters + */ + 'ui' => [ + 'display' => [ + /* + * Controls the default expansion setting for the operations and tags. It can be : + * 'list' (expands only the tags), + * 'full' (expands the tags and operations), + * 'none' (expands nothing). + */ + 'doc_expansion' => env('L5_SWAGGER_UI_DOC_EXPANSION', 'none'), + + /** + * If set, enables filtering. The top bar will show an edit box that + * you can use to filter the tagged operations that are shown. Can be + * Boolean to enable or disable, or a string, in which case filtering + * will be enabled using that string as the filter expression. Filtering + * is case-sensitive matching the filter expression anywhere inside + * the tag. + */ + 'filter' => env('L5_SWAGGER_UI_FILTERS', true), // true | false + ], + + 'authorization' => [ + /* + * If set to true, it persists authorization data, and it would not be lost on browser close/refresh + */ + 'persist_authorization' => env('L5_SWAGGER_UI_PERSIST_AUTHORIZATION', false), + + 'oauth2' => [ + /* + * If set to true, adds PKCE to AuthorizationCodeGrant flow + */ + 'use_pkce_with_authorization_code_grant' => false, + ], + ], + ], + /* + * Constants which can be used in annotations + */ + 'constants' => [ + 'APP_URL' => env('APP_URL'), + ], + ], +]; diff --git a/packages/Webkul/Lead/src/Repositories/LeadRepository.php b/packages/Webkul/Lead/src/Repositories/LeadRepository.php index fc1c12515..5229652a9 100755 --- a/packages/Webkul/Lead/src/Repositories/LeadRepository.php +++ b/packages/Webkul/Lead/src/Repositories/LeadRepository.php @@ -162,10 +162,6 @@ public function update(array $data, $id, $attribute = "id") $this->attributeValueRepository->save($data, $id); - if (! isset($data['_method'])) { - return $lead; - } - $previousProductIds = $lead->products()->pluck('id'); if (isset($data['products'])) { diff --git a/storage/api-docs/api-docs.json b/storage/api-docs/api-docs.json new file mode 100644 index 000000000..afb24058e --- /dev/null +++ b/storage/api-docs/api-docs.json @@ -0,0 +1,9576 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Krayin Rest API Documentation", + "description": "Krayin Rest API Documentation", + "contact": { + "email": "admin@example.com" + }, + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://192.168.15.43/krayin/master/public", + "description": "Krayin Rest API." + } + ], + "paths": { + "/api/v1/activities": { + "get": { + "tags": [ + "Activity" + ], + "summary": "Get list of activities", + "operationId": "activityList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Activity" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Activity" + ], + "summary": "Create activity", + "operationId": "activityStore", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "lead_id": { + "title": "Lead ID", + "description": "ID of the Activity", + "example": "1" + }, + "title": { + "title": "Title", + "description": "Title of the Activity", + "example": "Lorem Ipsum" + }, + "type": { + "title": "Type", + "description": "Type of the Activity", + "enum": [ + "call", + "meeting", + "lunch" + ], + "example": "meeting" + }, + "schedule_from": { + "title": "Schedule From", + "description": "Schedule From of the Activity", + "example": "2025-09-01 10:00:00" + }, + "schedule_to": { + "title": "Schedule To", + "description": "Schedule To of the Activity", + "example": "2025-11-01 10:00:00" + }, + "location": { + "title": "Location", + "description": "Location of the Activity", + "example": "New York" + }, + "comment": { + "title": "Comment", + "description": "Comment of the Activity", + "example": "Lorem Ipsum" + }, + "participants": { + "description": "Participants object containing users", + "properties": { + "persons": { + "description": "List of person IDs", + "type": "array", + "items": { + "type": "string", + "example": "1" + } + }, + "users": { + "description": "List of user IDs", + "type": "array", + "items": { + "type": "string", + "example": "1" + } + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Activity" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/activities/{id}": { + "get": { + "tags": [ + "Activity" + ], + "summary": "Fetch activity", + "operationId": "activityFetch", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Activity Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Activity" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Activity" + ], + "summary": "Update activity", + "operationId": "activityUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Activity Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "lead_id": { + "title": "Lead ID", + "description": "ID of the Activity", + "example": "1" + }, + "title": { + "title": "Title", + "description": "Title of the Activity", + "example": "Lorem Ipsum" + }, + "type": { + "title": "Type", + "description": "Type of the Activity", + "enum": [ + "call", + "meeting", + "lunch" + ], + "example": "meeting" + }, + "schedule_from": { + "title": "Schedule From", + "description": "Schedule From of the Activity", + "example": "2025-09-01 10:00:00" + }, + "schedule_to": { + "title": "Schedule To", + "description": "Schedule To of the Activity", + "example": "2025-11-01 10:00:00" + }, + "location": { + "title": "Location", + "description": "Location of the Activity", + "example": "New York" + }, + "comment": { + "title": "Comment", + "description": "Comment of the Activity", + "example": "Lorem Ipsum" + }, + "participants": { + "description": "Participants object containing users", + "properties": { + "persons": { + "description": "List of person IDs", + "type": "array", + "items": { + "type": "string", + "example": "1" + } + }, + "users": { + "description": "List of user IDs", + "type": "array", + "items": { + "type": "string", + "example": "1" + } + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Activity" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Activity" + ], + "summary": "Delete activity", + "operationId": "activityDelete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Activity Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/activities/is-overlapping": { + "post": { + "tags": [ + "Activity" + ], + "summary": "Check if activity is overlapping", + "operationId": "activityCheckIfOverlapping", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Activity" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Activity" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/activities/file-upload": { + "post": { + "tags": [ + "Activity" + ], + "summary": "Upload file", + "operationId": "activityUpload", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "type": { + "description": "Type of activity", + "type": "string", + "example": "file" + }, + "lead_id": { + "description": "Lead id of activity", + "type": "string", + "example": "1" + }, + "name": { + "description": "name of activity", + "type": "string", + "example": "Lorem" + }, + "comment": { + "description": "comment of activity", + "type": "string", + "example": "lorem ipsum" + }, + "file": { + "type": "file" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "description": "Success message", + "type": "string", + "example": "File(s) uploaded successfully." + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/activities/file-download/{id}": { + "get": { + "tags": [ + "Activity" + ], + "summary": "Download file", + "operationId": "activityDownload", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Activity Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "File downloaded successfully", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/activities/mass-update": { + "post": { + "tags": [ + "Activity" + ], + "summary": "Mass update activities", + "operationId": "activityMassUpdate", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "description": "IDs of the Activities to be updated", + "type": "array", + "items": { + "type": "integer", + "example": 1 + } + }, + "value": { + "description": "Value to be update", + "type": "string", + "example": "1" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/activities/mass-destroy": { + "post": { + "tags": [ + "Activity" + ], + "summary": "Mass destroy activities", + "operationId": "activityMassDestroy", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "description": "IDs of the Activities to be deleted", + "type": "array", + "items": { + "type": "integer", + "example": 1 + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/get": { + "get": { + "tags": [ + "Authentication" + ], + "summary": "Get logged in admin user's details", + "description": "Get logged in admin user's details", + "operationId": "getAdminUser", + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/User" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/update": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Update admin user's profile", + "description": "Update admin user's profile", + "operationId": "updateAdminUser", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "name", + "current_password" + ], + "properties": { + "_method": { + "type": "string", + "example": "PUT" + }, + "name": { + "type": "string", + "example": "Kim Thomson" + }, + "email": { + "type": "string", + "example": "example@example.com" + }, + "image": { + "type": "file" + }, + "password": { + "type": "string", + "example": "admin123" + }, + "password_confirmation": { + "type": "string", + "example": "admin123" + }, + "current_password": { + "type": "string", + "example": "admin123" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Account updated successfully." + }, + "data": { + "$ref": "#/components/schemas/User" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthenticated" + }, + "422": { + "description": "Error: Unprocessable Content", + "content": { + "application/json": { + "schema": {}, + "examples": { + "result": { + "summary": "An result object.", + "value": { + "message": "The name field is required. (and 1 more error)" + } + } + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/logout": { + "delete": { + "tags": [ + "Authentication" + ], + "summary": "Logout admin user", + "description": "Logout admin user", + "operationId": "logoutAdminUser", + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Logged out successfully." + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthenticated" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/login": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Login admin user", + "description": "Login admin user", + "operationId": "adminLogin", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "email", + "password", + "device_name" + ], + "properties": { + "email": { + "type": "string", + "format": "email", + "example": "admin@example.com" + }, + "password": { + "type": "string", + "format": "password", + "example": "admin123" + }, + "device_name": { + "type": "string", + "example": "android" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Logged in successfully." + }, + "data": { + "$ref": "#/components/schemas/User" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Invalid Email or Password" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/api/v1/configuration": { + "post": { + "tags": [ + "Configuration" + ], + "summary": "Create new Configuration", + "operationId": "storeConfiguration", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "general": { + "properties": { + "locale_settings": { + "properties": { + "locale": { + "description": "Locale", + "type": "string", + "example": "en" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/CoreConfig" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/contacts/organizations": { + "get": { + "tags": [ + "Contacts" + ], + "summary": "Get list of organizations", + "operationId": "organizationList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Organization" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Contacts" + ], + "summary": "Store a new organization", + "description": "Create a new organization with the provided details", + "operationId": "storeOrganization", + "requestBody": { + "description": "Organization details", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Organization name", + "type": "string", + "example": "Amazon" + }, + "address": { + "properties": { + "city": { + "type": "string", + "example": "Los Angeles" + }, + "state": { + "type": "string", + "example": "CA" + }, + "address": { + "type": "string", + "example": "123 Main St" + }, + "country": { + "type": "string", + "example": "US" + }, + "postcode": { + "type": "string", + "example": "201309" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Organization created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/contacts/organizations/{id}": { + "get": { + "tags": [ + "Contacts" + ], + "summary": "Get organization by id", + "operationId": "organizationShow", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Organization ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Organization" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Contacts" + ], + "summary": "Update an organization", + "description": "Update an organization with the provided details", + "operationId": "updateOrganization", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Organization ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "description": "Organization details", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Organization name", + "type": "string", + "example": "Amazon" + }, + "address": { + "properties": { + "city": { + "type": "string", + "example": "Los Angeles" + }, + "state": { + "type": "string", + "example": "CA" + }, + "address": { + "type": "string", + "example": "123 Main St" + }, + "country": { + "type": "string", + "example": "US" + }, + "postcode": { + "type": "string", + "example": "201309" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Organization" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Contacts" + ], + "summary": "Delete an organization", + "description": "Delete an organization by id", + "operationId": "deleteOrganization", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Organization ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Organization deleted successfully" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/contacts/organizations/mass-destroy": { + "post": { + "tags": [ + "Contacts" + ], + "summary": "Delete multiple organizations", + "description": "Delete multiple organizations by id", + "operationId": "massDeleteOrganization", + "requestBody": { + "description": "Organization IDs", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "description": "Organization IDs", + "type": "array", + "items": { + "type": "integer", + "example": 1 + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "204": { + "description": "Organizations deleted successfully" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/contacts/persons": { + "get": { + "tags": [ + "Contacts" + ], + "summary": "Get list of contact person", + "operationId": "contactList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Person" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Contacts" + ], + "summary": "Create new contact person", + "operationId": "createPerson", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Name of the person", + "type": "string", + "example": "Role" + }, + "emails": { + "description": "Email addresses of the person", + "type": "array", + "items": { + "required": [ + "value", + "label" + ], + "properties": { + "value": { + "description": "Email address", + "type": "string", + "example": "jhon.doe@mail.com" + }, + "label": { + "description": "Label for the email address", + "type": "string", + "example": "work" + } + }, + "type": "object" + } + }, + "contact_numbers": { + "description": "Contact numbers of the person", + "type": "array", + "items": { + "required": [ + "value", + "label" + ], + "properties": { + "value": { + "description": "Contact number", + "type": "string", + "example": "09315981404" + }, + "label": { + "description": "Label for the contact number", + "type": "string", + "example": "work" + } + }, + "type": "object" + } + }, + "organization_id": { + "description": "ID of the organization associated with the person", + "type": "integer", + "example": 1 + }, + "entity_type": { + "description": "Type of entity (e.g., 'persons')", + "type": "string", + "example": "persons" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Person" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/contacts/persons/search": { + "get": { + "tags": [ + "Contacts" + ], + "summary": "Get person by search query", + "description": "Retrieve persons based on a search query", + "operationId": "getPersonBySearchQuery", + "parameters": [ + { + "name": "query", + "in": "query", + "description": "Search query for the person", + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Person" + } + } + } + } + }, + "404": { + "description": "[]" + }, + "400": { + "description": "Invalid request" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/contacts/persons/{id}": { + "get": { + "tags": [ + "Contacts" + ], + "summary": "Get contact person by id", + "operationId": "getPersonById", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of contact person", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Person" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Contacts" + ], + "summary": "Update contact person", + "operationId": "updatePerson", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of contact person", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Name of the person", + "type": "string", + "example": "John Doe" + }, + "emails": { + "description": "Email addresses of the person", + "type": "array", + "items": { + "required": [ + "value", + "label" + ], + "properties": { + "value": { + "description": "Email address", + "type": "string", + "example": "jhon.doe@mail.com" + }, + "label": { + "description": "Label for the email address", + "type": "string", + "example": "work" + } + }, + "type": "object" + } + }, + "contact_numbers": { + "description": "Contact numbers of the person", + "type": "array", + "items": { + "required": [ + "value", + "label" + ], + "properties": { + "value": { + "description": "Contact number", + "type": "string", + "example": "09315981404" + }, + "label": { + "description": "Label for the contact number", + "type": "string", + "example": "work" + } + }, + "type": "object" + } + }, + "organization_id": { + "description": "ID of the organization associated with the person", + "type": "integer", + "example": 1 + }, + "entity_type": { + "description": "Type of entity (e.g., 'persons')", + "type": "string", + "example": "persons" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Person" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Contacts" + ], + "summary": "Delete contact person", + "operationId": "deletePerson", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of contact person", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/contacts/persons/mass-destroy": { + "post": { + "tags": [ + "Contacts" + ], + "summary": "Delete multiple contact persons", + "operationId": "massDeletePerson", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "description": "IDs of the contact persons to be deleted", + "type": "array", + "items": { + "type": "integer", + "example": 1 + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/leads": { + "get": { + "tags": [ + "Leads" + ], + "summary": "Get list of leads", + "operationId": "leadList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Lead" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Leads" + ], + "summary": "Store the Leads", + "description": "Store the Leads", + "operationId": "storeLead", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "title", + "description", + "lead_value", + "lead_source_id", + "lead_type_id", + "person[name]" + ], + "properties": { + "title": { + "description": "Title", + "type": "string", + "example": "Leads via phone" + }, + "description": { + "description": "Description", + "type": "string", + "example": "Leads comes via phone call." + }, + "lead_value": { + "description": "Lead Value", + "type": "string", + "example": "55446" + }, + "lead_pipeline_stage_id": { + "description": "Lead Pipeline state ID", + "example": null, + "nullable": true + }, + "lead_source_id": { + "description": "The source of the lead. Possible values:\n * 1: Email\n * 2: Web\n * 3: Web Form\n * 4: Phone\n * 5: Direct\n * ", + "enum": [ + 1, + 2, + 3, + 4, + 5 + ], + "example": "1" + }, + "lead_type_id": { + "description": "The source of the lead. Possible values:\n * 1: New Business\n * 2: Existing Business\n * ", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": "1" + }, + "user_id": { + "description": "User ID", + "type": "integer", + "example": "1" + }, + "expected_close_date": { + "description": "Expected Close Date", + "type": "string", + "format": "date", + "example": "2024-05-25" + }, + "person": { + "description": "Details of the person", + "properties": { + "name": { + "type": "string", + "example": "John Doe" + }, + "emails": { + "description": "List of person email addresses", + "type": "array", + "items": { + "properties": { + "value": { + "description": "Email address", + "type": "string", + "example": "John@mail.com" + }, + "label": { + "description": "Email address", + "type": "string", + "example": "work" + } + }, + "type": "object" + } + }, + "contact_numbers": { + "description": "List of person contacts", + "type": "array", + "items": { + "properties": { + "value": { + "description": "Email address", + "type": "string", + "example": "9645785245" + }, + "label": { + "description": "Email address", + "type": "string", + "example": "work" + } + }, + "type": "object" + } + }, + "organization_id": { + "type": "string", + "example": null, + "nullable": true + } + }, + "type": "object" + }, + "products": { + "properties": { + "product_0": { + "properties": { + "name": { + "type": "string", + "example": "iphone-14" + }, + "product_id": { + "type": "string", + "example": "1" + }, + "price": { + "type": "string", + "example": "423" + }, + "quantity": { + "type": "integer", + "example": "324" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "entity_type": { + "type": "string", + "example": "leads" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Lead Created Successfully." + }, + "data": { + "$ref": "#/components/schemas/Lead" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthenticated" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/leads/{id}": { + "get": { + "tags": [ + "Leads" + ], + "summary": "Get the particular Lead", + "description": "Get the particular Lead", + "operationId": "getParticularLead", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Lead ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Lead" + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Leads" + ], + "summary": "Store the Leads", + "description": "Store the Leads", + "operationId": "updateLeads", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Lead ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "title", + "description", + "lead_value", + "lead_source_id", + "lead_type_id", + "person[name]" + ], + "properties": { + "title": { + "description": "Title", + "type": "string", + "example": "Leads via phone" + }, + "description": { + "description": "Description", + "type": "string", + "example": "Leads comes via phone call." + }, + "lead_value": { + "description": "Lead Value", + "type": "string", + "example": "55446" + }, + "lead_pipeline_stage_id": { + "description": "Lead Pipeline state ID", + "example": null, + "nullable": true + }, + "lead_source_id": { + "description": "The source of the lead. Possible values:\n * 1: Email\n * 2: Web\n * 3: Web Form\n * 4: Phone\n * 5: Direct\n * ", + "enum": [ + 1, + 2, + 3, + 4, + 5 + ], + "example": "1" + }, + "lead_type_id": { + "description": "The source of the lead. Possible values:\n * 1: New Business\n * 2: Existing Business\n * ", + "type": "integer", + "enum": [ + 1, + 2 + ], + "example": "1" + }, + "user_id": { + "description": "User ID", + "type": "integer", + "example": "1" + }, + "expected_close_date": { + "description": "Expected Close Date", + "type": "string", + "format": "date", + "example": "2024-05-25" + }, + "person": { + "description": "Details of the person", + "properties": { + "name": { + "type": "string", + "example": "John Doe" + }, + "id": { + "type": "string", + "example": "1" + }, + "emails": { + "description": "List of person email addresses", + "type": "array", + "items": { + "properties": { + "value": { + "description": "Email address", + "type": "string", + "example": "John@mail.com" + }, + "label": { + "description": "Email address", + "type": "string", + "example": "work" + } + }, + "type": "object" + } + }, + "contact_numbers": { + "description": "List of person contacts", + "type": "array", + "items": { + "properties": { + "value": { + "description": "Email address", + "type": "string", + "example": "9645785245" + }, + "label": { + "description": "Email address", + "type": "string", + "example": "work" + } + }, + "type": "object" + } + }, + "organization_id": { + "type": "string", + "example": null, + "nullable": true + } + }, + "type": "object" + }, + "products": { + "description": "Details of the Products", + "type": "object" + }, + "entity_type": { + "type": "string", + "example": "leads" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Lead Updated Successfully." + }, + "data": { + "$ref": "#/components/schemas/Lead" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthenticated" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Leads" + ], + "summary": "Delete the Leads", + "description": "Delete the Leads", + "operationId": "deleteLeads", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Lead ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Lead Deleted Successfully." + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthenticated" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/leads/mass-update": { + "post": { + "tags": [ + "Leads" + ], + "summary": "Mass update Leads", + "description": "Mass update Leads", + "operationId": "massUpdateLeads", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "description": "IDs of the Leads to be updated", + "type": "array", + "items": { + "type": "integer", + "example": 1 + } + }, + "value": { + "description": "Value to be update", + "type": "string", + "example": "1" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Leads updated successfully." + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/leads/mass-destroy": { + "post": { + "tags": [ + "Leads" + ], + "summary": "Mass delete Leads", + "description": "Mass delete Leads", + "operationId": "massDeleteLeads", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "indices" + ], + "properties": { + "indices": { + "description": "Leads's Ids `CommaSeparated`", + "type": "string", + "example": [ + 1 + ] + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Leads deleted successfully." + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/mails": { + "get": { + "tags": [ + "Mail" + ], + "summary": "Get list of mails", + "operationId": "mailList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Email" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Mail" + ], + "summary": "Store an email", + "description": "Store an email with the provided data", + "operationId": "storeEmail", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "is_draft": { + "description": "Indicates if the email is a draft or not. (0 for false, 1 for true)", + "type": "integer" + }, + "id": { + "description": "The ID of the email", + "type": "integer", + "example": null, + "nullable": true + }, + "reply_to": { + "title": "Reply To", + "description": "Reply To email addresses", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "reply1@example.com", + "reply2@example.com" + ] + }, + "cc": { + "title": "CC", + "description": "List of email addresses to CC", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "cc1@example.com", + "cc2@example.com" + ] + }, + "bcc": { + "title": "BCC", + "description": "List of email addresses to BCC", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "bcc1@example.com", + "bcc2@example.com" + ] + }, + "subject": { + "description": "The subject of the email", + "type": "string", + "example": "subject" + }, + "reply": { + "description": "The content of the email reply", + "type": "string", + "example": "reply" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Email" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/mails/{id}": { + "get": { + "tags": [ + "Mail" + ], + "summary": "Get mail information", + "operationId": "mailGet", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Mail Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Mail" + ], + "summary": "Update existing mail", + "operationId": "mailUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Mail Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "is_draft": { + "description": "Indicates if the email is a draft or not. (0 for false, 1 for true)", + "type": "integer" + }, + "id": { + "description": "The ID of the email", + "type": "integer", + "example": null, + "nullable": true + }, + "reply_to": { + "title": "Reply To", + "description": "Reply To email addresses", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "reply1@example.com", + "reply2@example.com" + ] + }, + "cc": { + "title": "CC", + "description": "List of email addresses to CC", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "cc1@example.com", + "cc2@example.com" + ] + }, + "bcc": { + "title": "BCC", + "description": "List of email addresses to BCC", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "bcc1@example.com", + "bcc2@example.com" + ] + }, + "subject": { + "description": "The subject of the email", + "type": "string", + "example": "subject" + }, + "reply": { + "description": "The content of the email reply", + "type": "string", + "example": "reply" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Email" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Mail" + ], + "summary": "Delete existing mail", + "operationId": "mailDelete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Mail Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "type": { + "description": "Type of delete", + "type": "string", + "example": "trash" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Email" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/mails/mass-update": { + "post": { + "tags": [ + "Mail" + ], + "summary": "Mass update mails", + "operationId": "mailMassUpdate", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "type": "array", + "items": { + "type": "integer" + } + }, + "value": { + "type": "string", + "example": "NA" + }, + "folders": { + "type": "array", + "items": { + "type": "string", + "example": "inbox" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Email" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/mails/mass-destroy": { + "post": { + "tags": [ + "Mail" + ], + "summary": "Mass delete mails", + "operationId": "mailMassDestroy", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "type": "array", + "items": { + "type": "integer", + "example": 1 + } + }, + "type": { + "type": "string", + "example": "" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Email" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/mails/attachment-download/{id}": { + "get": { + "tags": [ + "Mail" + ], + "summary": "Download attachment", + "operationId": "mailAttachmentDownload", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Attachment Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/products": { + "get": { + "tags": [ + "Products" + ], + "summary": "Get list of products", + "operationId": "productList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Product" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Products" + ], + "summary": "Create new product", + "operationId": "productCreate", + "requestBody": { + "description": "Product details", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Product name", + "type": "string", + "example": "lorem" + }, + "description": { + "description": "Product Description", + "type": "string", + "example": "lorem ipsum" + }, + "sku": { + "description": "Product Sku", + "type": "string", + "example": "lorem-ipsum" + }, + "quantity": { + "description": "Product Quantity", + "type": "string", + "example": "1" + }, + "price": { + "description": "Product Price", + "type": "string", + "example": "25" + }, + "entity_type": { + "description": "Product Type", + "type": "string", + "example": "products" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Product" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/products/{id}": { + "get": { + "tags": [ + "Products" + ], + "summary": "Get product details", + "operationId": "productShow", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Product ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Product" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Products" + ], + "summary": "Update existing product", + "operationId": "productUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Product ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "description": "Product details", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Product name", + "type": "string", + "example": "lorem" + }, + "description": { + "description": "Product Description", + "type": "string", + "example": "lorem ipsum" + }, + "sku": { + "description": "Product Sku", + "type": "string", + "example": "lorem-ipsum" + }, + "quantity": { + "description": "Product Quantity", + "type": "string", + "example": "1" + }, + "price": { + "description": "Product Price", + "type": "string", + "example": "25" + }, + "entity_type": { + "description": "Product Type", + "type": "string", + "example": "products" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Product" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Products" + ], + "summary": "Delete existing product", + "operationId": "productDelete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Product ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Product" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/products/mass-destroy": { + "post": { + "tags": [ + "Products" + ], + "summary": "Delete existing products", + "operationId": "productMassDestroy", + "requestBody": { + "description": "Product details", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "description": "Product IDs", + "type": "array", + "items": { + "type": "integer", + "example": "1" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Product" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/quotes": { + "get": { + "tags": [ + "Quotes" + ], + "summary": "Get list of quotes", + "operationId": "quoteList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Quote" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Quotes" + ], + "summary": "Store the Quote", + "description": "Store the Quote", + "operationId": "storeQuote", + "requestBody": { + "description": "Store Quote", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "description": { + "description": "Description of the quote", + "type": "string", + "example": "School Management Quote" + }, + "expired_at": { + "description": "Expiration date of the quote", + "type": "string", + "format": "date", + "example": "2024-05-31" + }, + "person_id": { + "description": "ID of the person", + "type": "integer", + "example": 1 + }, + "subject": { + "description": "Subject of the quote", + "type": "string", + "example": "Webkul" + }, + "user_id": { + "description": "ID of the user", + "type": "integer", + "example": 1 + }, + "lead_id": { + "description": "ID of the lead", + "type": "integer", + "example": 1 + }, + "billing_address": { + "description": "Billing address details", + "properties": { + "address": { + "description": "Street address", + "type": "string", + "example": "123 Main St" + }, + "country": { + "description": "Country code", + "type": "string", + "example": "US" + }, + "state": { + "description": "State code", + "type": "string", + "example": "CA" + }, + "city": { + "description": "City name", + "type": "string", + "example": "Los Angeles" + }, + "postcode": { + "description": "Postal code", + "type": "string", + "example": "90001" + } + }, + "type": "object" + }, + "shipping_address": { + "description": "Shipping address details", + "properties": { + "address": { + "description": "Street address", + "type": "string", + "example": "123 Main St" + }, + "country": { + "description": "Country code", + "type": "string", + "example": "US" + }, + "state": { + "description": "State code", + "type": "string", + "example": "CA" + }, + "city": { + "description": "City name", + "type": "string", + "example": "Los Angeles" + }, + "postcode": { + "description": "Postal code", + "type": "string", + "example": "90001" + } + }, + "type": "object" + }, + "items": { + "description": "List of items", + "properties": { + "item_0": { + "properties": { + "product_id": { + "type": "string", + "example": "1" + }, + "quantity": { + "type": "string", + "example": "100" + }, + "price": { + "type": "string", + "example": "50" + }, + "total": { + "type": "string", + "example": "5000" + }, + "discount_amount": { + "type": "string", + "example": "0" + }, + "tax_amount": { + "type": "string", + "example": "0" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "sub_total": { + "description": "Subtotal amount", + "type": "number", + "format": "float", + "example": 5000 + }, + "discount_amount": { + "description": "Discount amount", + "type": "number", + "format": "float", + "example": 0 + }, + "tax_amount": { + "description": "Tax amount", + "type": "number", + "format": "float", + "example": 0 + }, + "adjustment_amount": { + "description": "Adjustment amount", + "type": "number", + "format": "float", + "example": 0 + }, + "grand_total": { + "description": "Grand total amount", + "type": "number", + "format": "float", + "example": 5000 + }, + "entity_type": { + "description": "Type of the entity", + "type": "string", + "example": "quotes" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Quote created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Quote" + } + } + } + }, + "400": { + "description": "Bad request" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/quotes/{id}": { + "get": { + "tags": [ + "Quotes" + ], + "summary": "Get quote information", + "description": "Get quote information", + "operationId": "getQuoteById", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Quote Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Quote" + } + }, + "type": "object" + } + } + } + }, + "404": { + "description": "Quote not found" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Quotes" + ], + "summary": "Update the Quote", + "description": "Update the Quote", + "operationId": "updateQuote", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Quote Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "description": "Store Quote", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "description": { + "description": "Description of the quote", + "type": "string", + "example": "School Management Quote" + }, + "expired_at": { + "description": "Expiration date of the quote", + "type": "string", + "format": "date", + "example": "2024-05-31" + }, + "person_id": { + "description": "ID of the person", + "type": "integer", + "example": 1 + }, + "subject": { + "description": "Subject of the quote", + "type": "string", + "example": "Webkul" + }, + "user_id": { + "description": "ID of the user", + "type": "integer", + "example": 1 + }, + "lead_id": { + "description": "ID of the lead", + "type": "integer", + "example": 1 + }, + "billing_address": { + "description": "Billing address details", + "properties": { + "address": { + "description": "Street address", + "type": "string", + "example": "123 Main St" + }, + "country": { + "description": "Country code", + "type": "string", + "example": "US" + }, + "state": { + "description": "State code", + "type": "string", + "example": "CA" + }, + "city": { + "description": "City name", + "type": "string", + "example": "Los Angeles" + }, + "postcode": { + "description": "Postal code", + "type": "string", + "example": "90001" + } + }, + "type": "object" + }, + "shipping_address": { + "description": "Shipping address details", + "properties": { + "address": { + "description": "Street address", + "type": "string", + "example": "123 Main St" + }, + "country": { + "description": "Country code", + "type": "string", + "example": "US" + }, + "state": { + "description": "State code", + "type": "string", + "example": "CA" + }, + "city": { + "description": "City name", + "type": "string", + "example": "Los Angeles" + }, + "postcode": { + "description": "Postal code", + "type": "string", + "example": "90001" + } + }, + "type": "object" + }, + "items": { + "description": "List of items", + "properties": { + "item_0": { + "properties": { + "product_id": { + "type": "string", + "example": "1" + }, + "quantity": { + "type": "string", + "example": "100" + }, + "price": { + "type": "string", + "example": "50" + }, + "total": { + "type": "string", + "example": "5000" + }, + "discount_amount": { + "type": "string", + "example": "0" + }, + "tax_amount": { + "type": "string", + "example": "0" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "sub_total": { + "description": "Subtotal amount", + "type": "number", + "format": "float", + "example": 5000 + }, + "discount_amount": { + "description": "Discount amount", + "type": "number", + "format": "float", + "example": 0 + }, + "tax_amount": { + "description": "Tax amount", + "type": "number", + "format": "float", + "example": 0 + }, + "adjustment_amount": { + "description": "Adjustment amount", + "type": "number", + "format": "float", + "example": 0 + }, + "grand_total": { + "description": "Grand total amount", + "type": "number", + "format": "float", + "example": 5000 + }, + "entity_type": { + "description": "Type of the entity", + "type": "string", + "example": "quotes" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Quote" + } + }, + "type": "object" + } + } + } + }, + "400": { + "description": "Bad request" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Quotes" + ], + "summary": "Delete the Quote", + "description": "Delete the Quote", + "operationId": "deleteQuote", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Quote Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Quote deleted successfully" + }, + "404": { + "description": "Quote not found" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/quotes/mass-destroy": { + "post": { + "tags": [ + "Quotes" + ], + "summary": "Delete the Quote", + "description": "Delete the Quote", + "operationId": "massDeleteQuote", + "requestBody": { + "description": "Quote details", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "description": "Quote IDs", + "type": "array", + "items": { + "type": "integer", + "example": "1" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Quote" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/attributes": { + "get": { + "tags": [ + "Attribute" + ], + "summary": "Get list of Attribute", + "operationId": "attributeList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attribute" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Attribute" + ], + "summary": "Create new Attribute", + "operationId": "attributeCreate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "description": "Code", + "type": "string", + "example": "tax" + }, + "name": { + "description": "Name of the Attribute", + "type": "string", + "example": "Tax" + }, + "type": { + "description": "Type of the Attribute", + "type": "string", + "example": "select" + }, + "lookup_type": { + "description": "Lookup Type", + "type": "string", + "example": "lead_types" + }, + "entity_type": { + "description": "Entity Type", + "type": "string", + "example": "persons" + }, + "sort_order": { + "description": "Order of the Attribute", + "type": "string", + "example": "1" + }, + "validation": { + "description": "Validation", + "type": "string", + "example": "" + }, + "is_required": { + "description": "Is Required", + "type": "string", + "example": "1" + }, + "is_unique": { + "description": "Is Unique", + "type": "string", + "example": "1" + }, + "quick_add": { + "description": "Quick Add", + "type": "string", + "example": "1" + }, + "is_user_defined": { + "description": "Is User defined Attribute", + "type": "string", + "example": "1" + }, + "option_type": { + "description": "Options Type", + "type": "string", + "example": "options" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attribute" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/attributes/{id}": { + "get": { + "tags": [ + "Attribute" + ], + "summary": "Get Attribute", + "operationId": "attributeShow", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Attribute Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attribute" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Attribute" + ], + "summary": "Update an existing Attribute", + "operationId": "attributeUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Attribute Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "description": "Code", + "type": "string", + "example": "tax" + }, + "name": { + "description": "Name of the Attribute", + "type": "string", + "example": "Tax" + }, + "type": { + "description": "Type of the Attribute", + "type": "string", + "example": "select" + }, + "lookup_type": { + "description": "Lookup Type", + "type": "string", + "example": "lead_types" + }, + "entity_type": { + "description": "Entity Type", + "type": "string", + "example": "persons" + }, + "sort_order": { + "description": "Order of the Attribute", + "type": "string", + "example": "1" + }, + "validation": { + "description": "Validation", + "type": "string", + "example": "" + }, + "is_required": { + "description": "Is Required", + "type": "string", + "example": "1" + }, + "is_unique": { + "description": "Is Unique", + "type": "string", + "example": "1" + }, + "quick_add": { + "description": "Quick Add", + "type": "string", + "example": "1" + }, + "is_user_defined": { + "description": "Is User defined Attribute", + "type": "string", + "example": "1" + }, + "option_type": { + "description": "Options Type", + "type": "string", + "example": "options" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attribute" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Attribute" + ], + "summary": "Delete one record of Attribute", + "operationId": "attributeDelete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Attribute Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attribute" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/attributes/lookup/{lookup}": { + "get": { + "tags": [ + "Attribute" + ], + "summary": "Search attribute lookup results", + "operationId": "attributeLookup", + "parameters": [ + { + "name": "lookup", + "in": "path", + "description": "Attribute Lookup", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attribute" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/attributes/mass-destroy": { + "post": { + "tags": [ + "Attribute" + ], + "summary": "Delete multiple records of Attribute", + "operationId": "attributeMassDestroy", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "type": "array", + "items": { + "type": "integer", + "example": 1 + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attribute" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/email-templates": { + "get": { + "tags": [ + "EmailTemplate" + ], + "summary": "Get list of email templates", + "operationId": "emailTemplateList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EmailTemplate" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "EmailTemplate" + ], + "summary": "Create new email template", + "operationId": "emailTemplateCreate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "name", + "type": "string", + "example": "Activity Updated" + }, + "subject": { + "description": "Subject of the Email", + "type": "string", + "example": "Activity updated: {%activities.title%}" + }, + "content": { + "description": "Content of the Email", + "type": "string", + "example": "content" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplate" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/email-templates/{id}": { + "get": { + "tags": [ + "EmailTemplate" + ], + "summary": "Get email template by id", + "operationId": "emailTemplateFetch", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "EmailTemplate Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplate" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "EmailTemplate" + ], + "summary": "Update existing email template", + "operationId": "emailTemplateUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "EmailTemplate Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "name", + "type": "string", + "example": "Activity Updated" + }, + "subject": { + "description": "Subject of the Email", + "type": "string", + "example": "Activity updated: {%activities.title%}" + }, + "content": { + "description": "Content of the Email", + "type": "string", + "example": "content" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplate" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "EmailTemplate" + ], + "summary": "Delete one email template", + "operationId": "emailTemplateDelete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "EmailTemplate Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplate" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/groups": { + "get": { + "tags": [ + "Group" + ], + "summary": "Get list of Group", + "operationId": "groupList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Group" + ], + "summary": "Create new Group", + "operationId": "groupCreate", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "name", + "description" + ], + "properties": { + "name": { + "description": "Group Name", + "type": "string", + "example": "Group Name" + }, + "description": { + "description": "Write group description here", + "type": "string", + "example": "Group Description" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Group" + } + }, + "type": "object" + } + } + } + }, + "422": { + "description": "Validation error" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/groups/{id}": { + "get": { + "tags": [ + "Group" + ], + "summary": "Get Group based on id", + "operationId": "groupRead", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Group Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Group" + } + }, + "type": "object" + } + } + } + }, + "404": { + "description": "Group not found" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Group" + ], + "summary": "Update existing Group", + "operationId": "groupUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Group Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "name", + "description" + ], + "properties": { + "name": { + "description": "Group Name", + "type": "string", + "example": "Group Name" + }, + "description": { + "description": "Write group description here", + "type": "string", + "example": "Group Description" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Group" + } + }, + "type": "object" + } + } + } + }, + "422": { + "description": "Validation error" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Group" + ], + "summary": "Delete existing Group", + "operationId": "groupDelete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Group Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Group deleted successfully" + } + }, + "type": "object" + } + } + } + }, + "404": { + "description": "Group not found" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/pipelines": { + "get": { + "tags": [ + "Pipeline" + ], + "summary": "Get all pipelines", + "operationId": "getPipelines", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Pipelines fetched successfully", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pipeline" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Pipeline" + ], + "summary": "Create a new pipeline", + "operationId": "createPipeline", + "requestBody": { + "description": "Pipeline details", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "name", + "rotten_days", + "is_default", + "stages" + ], + "properties": { + "name": { + "description": "Name of the pipeline", + "type": "string", + "example": "Test" + }, + "rotten_days": { + "description": "Number of days after which the pipeline is considered rotten", + "type": "integer", + "example": 30 + }, + "is_default": { + "description": "Indicates if the pipeline is the default one", + "type": "string", + "example": "on" + }, + "stages": { + "description": "Stages of the pipeline", + "properties": { + "stage_1": { + "properties": { + "code": { + "type": "string", + "example": "new" + }, + "name": { + "type": "string", + "example": "New" + }, + "sort_order": { + "type": "integer", + "example": 1 + }, + "probability": { + "type": "integer", + "example": 100 + } + }, + "type": "object" + }, + "stage_2": { + "properties": { + "code": { + "type": "string", + "example": "test" + }, + "name": { + "type": "string", + "example": "test" + }, + "sort_order": { + "type": "integer", + "example": 2 + }, + "probability": { + "type": "integer", + "example": 100 + } + }, + "type": "object" + }, + "stage_99": { + "properties": { + "code": { + "type": "string", + "example": "won" + }, + "name": { + "type": "string", + "example": "Won" + }, + "sort_order": { + "type": "integer", + "example": 3 + }, + "probability": { + "type": "integer", + "example": 100 + } + }, + "type": "object" + }, + "stage_100": { + "properties": { + "code": { + "type": "string", + "example": "lost" + }, + "name": { + "type": "string", + "example": "Lost" + }, + "sort_order": { + "type": "integer", + "example": 4 + }, + "probability": { + "type": "integer", + "example": 0 + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Pipeline created successfully", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Pipeline" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/pipelines/{id}": { + "get": { + "tags": [ + "Pipeline" + ], + "summary": "Get a pipeline", + "operationId": "getPipeline", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the pipeline", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Pipeline fetched successfully", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Pipeline" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Pipeline" + ], + "summary": "Update a pipeline", + "operationId": "updatePipeline", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the pipeline", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "description": "Pipeline details", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "name", + "rotten_days", + "is_default", + "stages" + ], + "properties": { + "name": { + "description": "Name of the pipeline", + "type": "string", + "example": "Test" + }, + "rotten_days": { + "description": "Number of days after which the pipeline is considered rotten", + "type": "integer", + "example": 30 + }, + "is_default": { + "description": "Indicates if the pipeline is the default one", + "type": "string", + "example": "on" + }, + "stages": { + "description": "Stages of the pipeline", + "properties": { + "stage_1": { + "properties": { + "code": { + "type": "string", + "example": "new" + }, + "name": { + "type": "string", + "example": "New" + }, + "sort_order": { + "type": "integer", + "example": 1 + }, + "probability": { + "type": "integer", + "example": 100 + } + }, + "type": "object" + }, + "stage_2": { + "properties": { + "code": { + "type": "string", + "example": "test" + }, + "name": { + "type": "string", + "example": "test" + }, + "sort_order": { + "type": "integer", + "example": 2 + }, + "probability": { + "type": "integer", + "example": 100 + } + }, + "type": "object" + }, + "stage_99": { + "properties": { + "code": { + "type": "string", + "example": "won" + }, + "name": { + "type": "string", + "example": "Won" + }, + "sort_order": { + "type": "integer", + "example": 3 + }, + "probability": { + "type": "integer", + "example": 100 + } + }, + "type": "object" + }, + "stage_100": { + "properties": { + "code": { + "type": "string", + "example": "lost" + }, + "name": { + "type": "string", + "example": "Lost" + }, + "sort_order": { + "type": "integer", + "example": 4 + }, + "probability": { + "type": "integer", + "example": 0 + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Pipeline updated successfully", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Pipeline" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Pipeline" + ], + "summary": "Delete a pipeline", + "operationId": "deletePipeline", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the pipeline", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Pipeline deleted successfully" + }, + "400": { + "description": "Default pipeline cannot be deleted" + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/roles": { + "get": { + "tags": [ + "Role" + ], + "summary": "Get list of roles", + "operationId": "roleList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Role" + ], + "summary": "Create new role", + "operationId": "roleCreate", + "requestBody": { + "description": "Role details", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Role name", + "type": "string", + "example": "Sales Manager" + }, + "description": { + "description": "Role Description", + "type": "string", + "example": "Sales Manager" + }, + "permission_type": { + "description": "Role type permission", + "type": "string", + "example": "custom" + }, + "permissions": { + "description": "List of permissions", + "type": "array", + "items": { + "type": "string", + "example": "dashboard" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Role" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/roles/{id}": { + "get": { + "tags": [ + "Role" + ], + "summary": "Get role details", + "operationId": "roleFetch", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Role ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Role" + ], + "summary": "Update existing role", + "operationId": "roleUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Role ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "description": "Role details", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Role name", + "type": "string", + "example": "Sales Manager" + }, + "description": { + "description": "Role Description", + "type": "string", + "example": "Sales Manager" + }, + "permission_type": { + "description": "Role type permission", + "type": "string", + "example": "custom" + }, + "permissions": { + "description": "List of permissions", + "type": "array", + "items": { + "type": "string", + "example": "dashboard" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Role" + ], + "summary": "Delete existing role", + "operationId": "roleDelete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Role ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/sources": { + "get": { + "tags": [ + "Source" + ], + "summary": "Get list of sources", + "operationId": "sourceList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Source" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Source" + ], + "summary": "Create new source", + "operationId": "sourceCreate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Name of the source", + "type": "string", + "example": "via phone" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Source" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/sources/{id}": { + "get": { + "tags": [ + "Source" + ], + "summary": "Get source by id", + "operationId": "sourceFetch", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Source Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Source" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Source" + ], + "summary": "Update source", + "operationId": "sourceUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Source Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Source" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Source" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Source" + ], + "summary": "Delete source", + "operationId": "sourceDelete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Source Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Source" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/tags": { + "get": { + "tags": [ + "Tag" + ], + "summary": "Get list of leads", + "operationId": "tagList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Tag" + ], + "summary": "Store the Tags", + "description": "Store the Tags", + "operationId": "storeTag", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Tag Name", + "type": "string", + "example": "Active" + }, + "color": { + "description": "Select the color for the tag", + "type": "string", + "enum": [ + "#337CFF", + "#FEBF00", + "#E5549F", + "#27B6BB", + "#FB8A3F", + "#43AF52" + ], + "example": "#FEBF00" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Tags added successfully." + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/tags/{id}": { + "get": { + "tags": [ + "Tag" + ], + "summary": "Get Tag by id", + "description": "Get Tag by id", + "operationId": "showTag", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Tag Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/Tag" + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Tag" + ], + "summary": "Update the Tags", + "description": "Update the Tags", + "operationId": "updateTag", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Tag Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Tag Name", + "type": "string", + "example": "Active" + }, + "color": { + "description": "Select the color for the tag", + "type": "string", + "enum": [ + "#337CFF", + "#FEBF00", + "#E5549F", + "#27B6BB", + "#FB8A3F", + "#43AF52" + ], + "example": "#FEBF00" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Tags updated successfully." + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Tag" + ], + "summary": "Delete the Tags", + "description": "Delete the Tags", + "operationId": "deleteTag", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Tag Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Tags deleted successfully." + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/tags/mass-destroy": { + "post": { + "tags": [ + "Tag" + ], + "summary": "Mass Delete the Tags", + "description": "Mass Delete the Tags", + "operationId": "massDestroyTag", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "indices" + ], + "properties": { + "indices": { + "description": "Tag Ids", + "type": "array", + "items": { + "type": "integer", + "example": "1" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Tags deleted successfully." + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/types": { + "get": { + "tags": [ + "Type" + ], + "summary": "Get list of types", + "operationId": "typeList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Type" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Type" + ], + "summary": "Create new source", + "operationId": "typeCreate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Name of the source", + "type": "string", + "example": "Freelancing" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Type" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/types/{id}": { + "get": { + "tags": [ + "Type" + ], + "summary": "Get source by id", + "operationId": "typesFetch", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Source Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Type" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Type" + ], + "summary": "Update source", + "operationId": "typesUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Source Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Type" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Type" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Type" + ], + "summary": "Delete source", + "operationId": "typesDelete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Source Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Type" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/users": { + "get": { + "tags": [ + "User" + ], + "summary": "Get list of users", + "operationId": "userList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "User" + ], + "summary": "Create new user", + "operationId": "userCreate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Name", + "type": "string", + "example": "John Doe" + }, + "email": { + "description": "Email", + "type": "string", + "example": "john@doe.com" + }, + "status": { + "description": "Status", + "type": "string", + "example": "1" + }, + "password": { + "description": "Password", + "type": "string", + "example": "admin123" + }, + "confirm_password": { + "description": "confirm_password", + "type": "string", + "example": "admin123" + }, + "role_id": { + "description": "Role ID", + "type": "string", + "example": "1" + }, + "view_permission": { + "description": "View Permission", + "type": "string", + "enum": [ + "global", + "group", + "individual" + ], + "example": "global" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/users/{id}": { + "get": { + "tags": [ + "User" + ], + "summary": "Get user details", + "operationId": "userFetch", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "User ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/User" + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "User" + ], + "summary": "Update existing user.", + "operationId": "userUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "User Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "Name", + "type": "string", + "example": "John Doe" + }, + "email": { + "description": "Email", + "type": "string", + "example": "john@doe.com" + }, + "status": { + "description": "Status", + "type": "string", + "example": "1" + }, + "password": { + "description": "Password", + "type": "string", + "example": "admin123" + }, + "confirm_password": { + "description": "confirm_password", + "type": "string", + "example": "admin123" + }, + "role_id": { + "description": "Role ID", + "type": "string", + "example": "1" + }, + "view_permission": { + "description": "View Permission", + "type": "string", + "enum": [ + "global", + "group", + "individual" + ], + "example": "global" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "User" + ], + "summary": "Delete the Users", + "description": "Delete the Users", + "operationId": "deleteUser", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "User Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "User deleted successfully." + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/users/mass-update": { + "post": { + "tags": [ + "User" + ], + "summary": "Mass Update the Users", + "description": "Mass Update the Users", + "operationId": "massUpdateUser", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "description": "User Ids", + "type": "array", + "items": { + "type": "integer", + "example": "1" + } + }, + "value": { + "description": "Status Value", + "type": "string", + "example": "1" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "User updated successfully." + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/users/mass-destroy": { + "post": { + "tags": [ + "User" + ], + "summary": "Mass Delete the Users", + "description": "Mass Delete the Users", + "operationId": "massDestroyUser", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "indices": { + "description": "User Ids", + "type": "array", + "items": { + "type": "integer", + "example": "1" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "User deleted successfully." + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/web-forms": { + "get": { + "tags": [ + "WebForm" + ], + "summary": "Get list of WebForm", + "operationId": "webFormList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebForm" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "WebForm" + ], + "summary": "Create WebForm", + "operationId": "webFormCreate", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "title": { + "description": "Web form title", + "type": "string", + "example": "Web form title" + }, + "description": { + "description": "Web form description", + "type": "string", + "example": "webform description" + }, + "submit_button_label": { + "description": "Label for the submit button", + "type": "string", + "example": "Submit Now" + }, + "submit_success_action": { + "description": "Action to take upon successful submission", + "type": "string", + "example": "message" + }, + "submit_success_content": { + "description": "Content to show upon successful submission", + "type": "string", + "example": "This is sample test message" + }, + "create_lead": { + "description": "Create lead option", + "type": "string", + "example": "on" + }, + "background_color": { + "description": "Background color", + "type": "string", + "example": "#F7F8F9" + }, + "form_background_color": { + "description": "Form background color", + "type": "string", + "example": "#FFFFFF" + }, + "form_title_color": { + "description": "Form title color", + "type": "string", + "example": "#263238" + }, + "form_submit_button_color": { + "description": "Form submit button color", + "type": "string", + "example": "#0E90D9" + }, + "attribute_label_color": { + "description": "Attribute label color", + "type": "string", + "example": "#546E7A" + }, + "attributes": { + "description": "Attributes of the web form", + "properties": { + "attribute_0": { + "properties": { + "attribute_id": { + "description": "ID of the attribute", + "type": "string", + "example": "9" + }, + "name": { + "description": "Name of the attribute", + "type": "string", + "example": "Name" + }, + "sort_order": { + "description": "Sort order of the attribute", + "type": "integer", + "example": 1 + }, + "placeholder": { + "description": "Placeholder for the attribute", + "type": "string", + "example": null, + "nullable": true + }, + "is_required": { + "description": "Is the attribute required", + "type": "boolean", + "example": true + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/WebForm" + } + }, + "type": "object" + } + } + } + }, + "422": { + "description": "Validation error" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/web-forms/{id}": { + "get": { + "tags": [ + "WebForm" + ], + "summary": "Find WebForm by ID", + "operationId": "webFormFind", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of WebForm to return", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/WebForm" + } + }, + "type": "object" + } + } + } + }, + "404": { + "description": "WebForm not found" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "WebForm" + ], + "summary": "Update WebForm", + "operationId": "webFormUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of WebForm to return", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "title": { + "description": "Web form title", + "type": "string", + "example": "Web form title" + }, + "description": { + "description": "Web form description", + "type": "string", + "example": "webform description" + }, + "submit_button_label": { + "description": "Label for the submit button", + "type": "string", + "example": "Submit Now" + }, + "submit_success_action": { + "description": "Action to take upon successful submission", + "type": "string", + "example": "message" + }, + "submit_success_content": { + "description": "Content to show upon successful submission", + "type": "string", + "example": "This is sample test message" + }, + "create_lead": { + "description": "Create lead option", + "type": "string", + "example": "on" + }, + "background_color": { + "description": "Background color", + "type": "string", + "example": "#F7F8F9" + }, + "form_background_color": { + "description": "Form background color", + "type": "string", + "example": "#FFFFFF" + }, + "form_title_color": { + "description": "Form title color", + "type": "string", + "example": "#263238" + }, + "form_submit_button_color": { + "description": "Form submit button color", + "type": "string", + "example": "#0E90D9" + }, + "attribute_label_color": { + "description": "Attribute label color", + "type": "string", + "example": "#546E7A" + }, + "attributes": { + "description": "Attributes of the web form", + "properties": { + "attribute_0": { + "properties": { + "attribute_id": { + "description": "ID of the attribute", + "type": "string", + "example": "9" + }, + "name": { + "description": "Name of the attribute", + "type": "string", + "example": "Name" + }, + "sort_order": { + "description": "Sort order of the attribute", + "type": "integer", + "example": 1 + }, + "placeholder": { + "description": "Placeholder for the attribute", + "type": "string", + "example": null, + "nullable": true + }, + "is_required": { + "description": "Is the attribute required", + "type": "boolean", + "example": true + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "$ref": "#/components/schemas/WebForm" + } + }, + "type": "object" + } + } + } + }, + "404": { + "description": "WebForm not found" + }, + "422": { + "description": "Validation error" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "WebForm" + ], + "summary": "Delete WebForm", + "operationId": "webFormDelete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of WebForm to return", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Web form deleted successfully" + } + }, + "type": "object" + } + } + } + }, + "404": { + "description": "WebForm not found" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/workflows": { + "get": { + "tags": [ + "Workflow" + ], + "summary": "Get list of Workflow", + "operationId": "workFlowList", + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort column", + "required": false, + "schema": { + "type": "string" + }, + "example": "id" + }, + { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ] + } + }, + { + "name": "page", + "in": "query", + "description": "Page number", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "description": "Limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Workflow" + } + } + }, + "type": "object" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "post": { + "tags": [ + "Workflow" + ], + "summary": "Create new workflow.", + "description": "Create new workflow.", + "operationId": "storeWorkflow", + "requestBody": { + "content": { + "application/json": { + "schema": { + "schema": "WorkflowSchema", + "properties": { + "name": { + "description": "Name of the workflow", + "type": "string", + "example": "Lorem Ipsum" + }, + "description": { + "description": "Description of the workflow", + "type": "string", + "example": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s." + }, + "entity_type": { + "description": "The entity type for the workflow", + "type": "string", + "example": "leads" + }, + "event": { + "description": "The event that triggers the workflow", + "type": "string", + "example": "activity.update.after" + }, + "condition_type": { + "description": "The condition type for the workflow", + "type": "string", + "example": "and" + }, + "conditions": { + "description": "Conditions", + "type": "array", + "items": {}, + "example": [ + { + "value": [ + "call", + "meeting", + "lunch" + ], + "operator": "{}", + "attribute": "type", + "attribute_type": "multiselect" + } + ] + }, + "actions": { + "description": "Actions", + "type": "array", + "items": {}, + "example": [ + { + "id": "send_email_to_participants", + "value": "2" + } + ] + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workflow" + } + } + } + }, + "400": { + "description": "Bad request" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + }, + "/api/v1/settings/workflows/{id}": { + "get": { + "tags": [ + "Workflow" + ], + "summary": "Get Workflow by ID", + "operationId": "showWorkflow", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the Workflow", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workflow" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "put": { + "tags": [ + "Workflow" + ], + "summary": "Update an existing Workflow", + "operationId": "workFlowUpdate", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the Workflow", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "schema": "WorkflowSchema", + "properties": { + "name": { + "description": "Name of the workflow", + "type": "string", + "example": "Lorem Ipsum" + }, + "description": { + "description": "Description of the workflow", + "type": "string", + "example": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s." + }, + "entity_type": { + "description": "The entity type for the workflow", + "type": "string", + "example": "leads" + }, + "event": { + "description": "The event that triggers the workflow", + "type": "string", + "example": "activity.update.after" + }, + "condition_type": { + "description": "The condition type for the workflow", + "type": "string", + "example": "and" + }, + "conditions": { + "description": "Conditions", + "type": "array", + "items": {}, + "example": [ + { + "value": [ + "call", + "meeting", + "lunch" + ], + "operator": "{}", + "attribute": "type", + "attribute_type": "multiselect" + } + ] + }, + "actions": { + "description": "Actions", + "type": "array", + "items": {}, + "example": [ + { + "id": "send_email_to_participants", + "value": "2" + } + ] + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workflow" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + }, + "delete": { + "tags": [ + "Workflow" + ], + "summary": "Delete an existing Workflow", + "operationId": "workFlowDelete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the Workflow", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workflow" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "sanctum_admin": [] + } + ] + } + } + }, + "components": { + "schemas": { + "Activity": { + "title": "Activity", + "description": "Activity Model", + "properties": { + "id": { + "title": "ID", + "description": "Organization ID", + "type": "string", + "format": "int64", + "example": "1" + }, + "title": { + "title": "Title", + "description": "Title of the task", + "type": "string", + "example": "Meeting with client" + }, + "type": { + "title": "Type", + "description": "Type of the task", + "type": "string", + "example": "Meeting" + }, + "location": { + "title": "Location", + "description": "Location of the task", + "type": "string", + "example": "Office" + }, + "comment": { + "title": "Comment", + "description": "Comment on the task", + "type": "string", + "example": "Discuss project details" + }, + "additional": { + "title": "Additional", + "description": "Additional information about the task", + "type": "string", + "example": "Bring all project documents" + }, + "schedule_from": { + "title": "Schedule From", + "description": "Start time of the task", + "type": "string", + "format": "date-time", + "example": "2024-06-01T09:00:00Z" + }, + "schedule_to": { + "title": "Schedule To", + "description": "End time of the task", + "type": "string", + "format": "date-time", + "example": "2024-06-01T10:00:00Z" + }, + "is_done": { + "title": "Is Done", + "description": "Status of the task", + "type": "boolean", + "example": "0" + }, + "user_id": { + "title": "User ID", + "description": "ID of the user assigned to the task", + "type": "integer", + "format": "int64", + "example": 1 + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Organization": { + "title": "Organization", + "description": "Organization Model", + "properties": { + "id": { + "title": "ID", + "description": "Organization ID", + "type": "string", + "format": "int64", + "example": "1" + }, + "name": { + "description": "Organization Name", + "type": "string", + "example": "Organization Name" + }, + "address": { + "description": "Organization Address", + "type": "array", + "items": { + "properties": { + "city": { + "description": "City name", + "type": "string", + "example": "Los Angeles" + }, + "state": { + "description": "State name", + "type": "string", + "example": "CA" + }, + "address": { + "description": "Street address", + "type": "string", + "example": "123 Main St" + }, + "country": { + "description": "Country code", + "type": "string", + "example": "US" + }, + "postcode": { + "description": "Postal code", + "type": "string", + "example": "90001" + } + }, + "type": "object" + } + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Person": { + "title": "Person", + "description": "Person Model", + "properties": { + "id": { + "title": "ID", + "description": "ID of the lead", + "type": "string", + "format": "int64", + "example": 1 + }, + "name": { + "title": "Name", + "description": "Name of the lead", + "type": "string", + "example": "John Doe" + }, + "emails": { + "description": "Contact Emails", + "type": "array", + "items": { + "properties": { + "label": { + "description": "Label for the contact emails (e.g., 'work', 'home')", + "type": "string", + "example": "work" + }, + "value": { + "description": "The contact email", + "type": "string", + "example": "example2@gmail.com" + } + }, + "type": "object" + }, + "example": [ + { + "label": "work", + "value": "example1@gmail.com" + }, + { + "label": "home", + "value": "example2@gmail.com" + } + ] + }, + "contact_numbers": { + "description": "Contact Numbers", + "type": "array", + "items": { + "properties": { + "label": { + "description": "Label for the contact number (e.g., 'work', 'home')", + "type": "string", + "example": "work" + }, + "value": { + "description": "The contact number", + "type": "string", + "example": "9999999999" + } + }, + "type": "object" + }, + "example": [ + { + "label": "work", + "value": "9999999999" + }, + { + "label": "home", + "value": "8888888888" + } + ] + }, + "organization": { + "$ref": "#/components/schemas/Organization" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "CoreConfig": { + "title": "CoreConfig", + "description": "CoreConfig Model", + "properties": { + "id": { + "title": "ID", + "description": "ID of the lead", + "type": "string", + "format": "int64", + "example": 1 + }, + "code": { + "title": "Code", + "description": "Code", + "type": "string", + "example": "general" + }, + "value": { + "title": "Value", + "description": "Value", + "type": "string", + "example": "1" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Lead": { + "title": "Lead", + "description": "Lead Model", + "properties": { + "id": { + "title": "ID", + "description": "ID of the lead", + "type": "string", + "format": "int64", + "example": 1 + }, + "title": { + "title": "Title", + "description": "Title of the lead", + "type": "string", + "example": "Lead From Phone" + }, + "description": { + "title": "Description", + "description": "Description of the Lead", + "type": "string", + "example": "Lead comes form via phone" + }, + "lead_value": { + "title": "Lead Value", + "description": "Lead Value", + "type": "string", + "example": "$45,255,25" + }, + "status": { + "title": "Lead Status", + "description": "Lead Status", + "type": "boolean", + "enum": [ + 0, + 1 + ], + "example": 1 + }, + "lost_reason": { + "title": "Lead Reason", + "description": "Lost Reason", + "type": "string", + "example": "Not interesting" + }, + "expected_close_date": { + "title": "Expected Close at", + "description": "Expected Close at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "close_at": { + "title": "Close at", + "description": "Close at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "person_id": { + "$ref": "#/components/schemas/Person" + }, + "user_id": { + "$ref": "#/components/schemas/User" + }, + "lead_source_id": { + "title": "Lead source ID", + "description": "Lead source ID", + "type": "integer", + "example": "1" + }, + "lead_type_id": { + "title": "Lead Type ID", + "description": "Lead Type ID", + "type": "integer", + "example": "1" + }, + "lead_pipeline_id": { + "title": "Lead Pipeline ID", + "description": "Lead Pipeline ID", + "type": "integer", + "example": "1" + }, + "lead_pipeline_stage_id": { + "title": "Lead Pipeline stage ID", + "description": "Lead Pipeline stage ID", + "type": "integer", + "example": "1" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Email": { + "title": "Email", + "description": "Email model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "subject": { + "title": "Subject", + "description": "The subject of the item", + "type": "string", + "example": "Meeting Notes" + }, + "source": { + "title": "Source", + "description": "The source of the item", + "type": "string", + "example": "Email" + }, + "name": { + "title": "Name", + "description": "Name associated with the item", + "type": "string", + "example": "John Doe" + }, + "user_type": { + "title": "User Type", + "description": "Type of the user", + "type": "string", + "example": "admin" + }, + "is_read": { + "title": "Is Read", + "description": "Read status of the item", + "type": "boolean", + "example": true + }, + "folders": { + "title": "Folders", + "description": "Folders associated with the item", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Inbox", + "Archive" + ] + }, + "from": { + "title": "From", + "description": "Sender's email address", + "type": "string", + "example": "sender@example.com" + }, + "sender": { + "title": "Sender", + "description": "Sender's name", + "type": "string", + "example": "Jane Smith" + }, + "reply_to": { + "title": "Reply To", + "description": "Reply-to email address", + "type": "string", + "example": "reply@example.com" + }, + "cc": { + "title": "CC", + "description": "CC email addresses", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "cc1@example.com", + "cc2@example.com" + ] + }, + "bcc": { + "title": "BCC", + "description": "BCC email addresses", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "bcc1@example.com", + "bcc2@example.com" + ] + }, + "unique_id": { + "title": "Unique ID", + "description": "Unique identifier for the item", + "type": "string", + "example": "123456" + }, + "message_id": { + "title": "Message ID", + "description": "Message identifier", + "type": "string", + "example": "msg-78910" + }, + "reference_ids": { + "title": "Reference IDs", + "description": "Reference identifiers", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "ref-111", + "ref-222" + ] + }, + "reply": { + "title": "Reply", + "description": "Reply content", + "type": "string", + "example": "Thank you for your email." + }, + "person_id": { + "title": "Person ID", + "description": "ID of the person", + "type": "integer", + "format": "int64", + "example": 1 + }, + "parent_id": { + "title": "Parent ID", + "description": "ID of the parent item", + "type": "integer", + "format": "int64", + "example": 2 + }, + "lead_id": { + "title": "Lead ID", + "description": "ID of the lead", + "type": "integer", + "format": "int64", + "example": 3 + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Product": { + "title": "Product", + "description": "Product model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "name": { + "title": "Name", + "description": "Product name", + "type": "string", + "example": "Apple iPhone 12 Pro Max" + }, + "description": { + "title": "Description", + "description": "Product description", + "type": "string", + "example": "Apple iPhone 12 Pro Max 256GB" + }, + "sku": { + "title": "SKU", + "description": "Product SKU", + "type": "string", + "example": "iphone-12-pro-max-256gb" + }, + "quantity": { + "title": "Product", + "description": "Product Quantity", + "type": "number", + "format": "float", + "example": 1 + }, + "price": { + "title": "Price", + "description": "Product Price", + "type": "number", + "format": "float", + "example": 1099.99 + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Quote": { + "title": "Quote", + "description": "Quote Model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "description": { + "title": "Description", + "description": "Quote Description", + "type": "string", + "example": "This is a quote description." + }, + "billing_address": { + "description": "Billing address details", + "properties": { + "address": { + "description": "Street address", + "type": "string", + "example": "123 Main St" + }, + "country": { + "description": "Country code", + "type": "string", + "example": "US" + }, + "state": { + "description": "State code", + "type": "string", + "example": "CA" + }, + "city": { + "description": "City name", + "type": "string", + "example": "Los Angeles" + }, + "postcode": { + "description": "Postal code", + "type": "string", + "example": "90001" + } + }, + "type": "object" + }, + "shipping_address": { + "description": "Shipping address details", + "properties": { + "address": { + "description": "Street address", + "type": "string", + "example": "123 Main St" + }, + "country": { + "description": "Country code", + "type": "string", + "example": "US" + }, + "state": { + "description": "State code", + "type": "string", + "example": "CA" + }, + "city": { + "description": "City name", + "type": "string", + "example": "Los Angeles" + }, + "postcode": { + "description": "Postal code", + "type": "string", + "example": "90001" + } + }, + "type": "object" + }, + "discount_percent": { + "title": "Discount Percent", + "description": "Quote Discount Percent", + "type": "string", + "example": "10" + }, + "discount_amount": { + "title": "Discount Amount", + "description": "Quote Discount Amount", + "type": "string", + "example": "10" + }, + "tax_amount": { + "title": "Tax Amount", + "description": "Quote Tax Amount", + "type": "string", + "example": "10" + }, + "adjustment_amount": { + "title": "Adjustment Amount", + "description": "Quote Adjustment Amount", + "type": "string", + "example": "10" + }, + "sub_total": { + "title": "Sub Total", + "description": "Quote Sub Total", + "type": "string", + "example": "90" + }, + "grand_total": { + "title": "Grand Total", + "description": "Quote Grand Total", + "type": "string", + "example": "90" + }, + "expired_at": { + "title": "Expired At", + "description": "Quote Expired At", + "type": "string", + "example": "2024-05-27T12:34:56Z" + }, + "user_id": { + "title": "User ID", + "description": "Quote User ID", + "type": "string", + "example": "1" + }, + "person_id": { + "title": "Person ID", + "description": "Quote Person ID", + "type": "string", + "example": "1" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Attribute": { + "title": "Attribute", + "description": "Attribute Model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "code": { + "title": "Code", + "description": "Code", + "type": "string", + "example": "tax" + }, + "name": { + "title": "Name", + "description": "Name", + "type": "string", + "example": "Tax" + }, + "type": { + "title": "Type", + "description": "Type", + "type": "string", + "enum": [ + "text", + "textarea", + "price", + "boolean", + "select", + "multiselect", + "checkbox", + "email", + "address", + "phone", + "lookup", + "datetime", + "date", + "image", + "file" + ], + "example": "select" + }, + "lookup_type": { + "title": "Lookup Type", + "description": "Lookup Type", + "type": "string", + "enum": [ + "leads", + "lead_sources", + "lead_types", + "lead_pipelines", + "lead_pipeline_stages", + "users", + "organizations", + "persons" + ], + "example": "lead_types" + }, + "entity_type": { + "title": "Entity Type", + "description": "Entity Type", + "type": "string", + "enum": [ + "leads", + "persons", + "organizations", + "products", + "quotes" + ], + "example": "persons" + }, + "sort_order": { + "title": "Sort Order", + "description": "Sort Order", + "type": "string", + "example": "1" + }, + "validation": { + "title": "Entity Type", + "description": "Entity Type", + "type": "string", + "enum": [ + "", + "numeric", + "email", + "decimal", + "url" + ], + "example": "" + }, + "is_required": { + "title": "Is Required", + "description": "Is Required", + "type": "string", + "example": "0" + }, + "is_unique": { + "title": "Is Unique", + "description": "Is Unique", + "type": "boolean", + "example": "0" + }, + "quick_add": { + "title": "Quick Add", + "description": "Quick Add", + "type": "boolean", + "example": "0" + }, + "is_user_defined": { + "title": "Is User Defined", + "description": "Is User Defined", + "type": "boolean", + "example": "1" + }, + "option_type": { + "title": "Options Type", + "description": "Options Type", + "type": "string", + "enum": [ + "lookup", + "options" + ], + "example": "options" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "EmailTemplate": { + "title": "EmailTemplate", + "description": "EmailTemplate Model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "name": { + "title": "Name", + "description": "Name", + "type": "string", + "example": "EmailTemplate Name" + }, + "subject": { + "title": "Subject", + "description": "Subject", + "type": "string", + "example": "EmailTemplate Subject" + }, + "content": { + "title": "Content", + "description": "Content", + "type": "string", + "example": "EmailTemplate Content" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Group": { + "title": "Group", + "description": "Group Model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "name": { + "title": "Name", + "description": "Name", + "type": "string", + "example": "Group Name" + }, + "description": { + "title": "Description", + "description": "Description", + "type": "string", + "example": "Group Description" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Pipeline": { + "title": "Pipeline", + "description": "Pipeline Model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "name": { + "title": "name", + "description": "Name", + "type": "string", + "example": "Lost" + }, + "rotten_days": { + "title": "name", + "description": "Rotten Days", + "type": "string", + "example": "30" + }, + "is_default": { + "title": "name", + "description": "Is Default", + "type": "string", + "example": "30" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Role": { + "title": "Role", + "description": "Role model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "name": { + "title": "Name", + "description": "Role name", + "type": "string", + "example": "Administrator" + }, + "description": { + "title": "Description", + "description": "Role description", + "type": "string", + "example": "Administrator role, i.e. User may have full admin access" + }, + "permission_type": { + "title": "Permission Type", + "description": "Permission type", + "type": "string", + "enum": [ + "all", + "custom" + ], + "example": "custom" + }, + "permission": { + "title": "Permission", + "description": "Role's permission", + "type": "array", + "items": { + "properties": { + "dashboard": { + "type": "string" + }, + "catalog": { + "type": "string" + }, + "catalog.products": { + "type": "string" + }, + "catalog.categories": { + "type": "string" + }, + "catalog.attributes": { + "type": "string" + }, + "catalog.families": { + "type": "string" + }, + "settings": { + "type": "string" + }, + "settings.users": { + "type": "string" + }, + "settings.users.users": { + "type": "string" + }, + "settings.users.users.edit": { + "type": "string" + } + }, + "type": "object" + }, + "example": [ + "dashboard", + "catalog", + "catalog.products", + "catalog.products.create", + "catalog.products.copy", + "catalog.products.edit", + "catalog.products.delete", + "catalog.products.mass-update", + "catalog.products.mass-delete", + "catalog.categories", + "catalog.attributes", + "catalog.families", + "settings", + "settings.users", + "settings.users.users", + "settings.users.users.edit" + ] + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Source": { + "title": "Source", + "description": "Source Model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "name": { + "title": "name", + "description": "Name", + "type": "string", + "example": "Via Phone" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Tag": { + "title": "Tag", + "description": "Tag Model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "name": { + "title": "name", + "description": "Name of the tag", + "type": "string", + "example": "Active" + }, + "color": { + "title": "color", + "description": "Color of the tag", + "type": "string", + "example": "#FEBF00" + }, + "user_id": { + "$ref": "#/components/schemas/User" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Type": { + "title": "Type", + "description": "Type Model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "name": { + "title": "name", + "description": "Name", + "type": "string", + "example": "Via Phone" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "User": { + "title": "User", + "description": "User model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "name": { + "title": "Name", + "description": "Admin user's full name", + "type": "string", + "example": "John Doe" + }, + "email": { + "title": "Email", + "description": "Admin user's email", + "type": "string", + "example": "admin@example.com" + }, + "status": { + "title": "Status", + "description": "Admin user's status", + "type": "boolean", + "enum": [ + 0, + 1 + ], + "example": 1 + }, + "role": { + "$ref": "#/components/schemas/Role" + }, + "token": { + "title": "Token", + "description": "Admin user's token", + "type": "string", + "example": "29|i0hx5mbtzQ7T8Ny33ciCHOCCbSAUqEXD7RZn2iII" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "WebForm": { + "title": "WebForm", + "description": "WebForm model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "form_id": { + "title": "Form ID", + "description": "The ID of the form", + "type": "integer", + "format": "int64", + "example": 1 + }, + "title": { + "title": "Title", + "description": "The title of the form", + "type": "string", + "example": "Contact Us" + }, + "description": { + "title": "Description", + "description": "A description of the form", + "type": "string", + "example": "This form allows users to contact us directly." + }, + "submit_button_label": { + "title": "Submit Button Label", + "description": "The label of the submit button", + "type": "string", + "example": "Submit" + }, + "submit_success_action": { + "title": "Submit Success Action", + "description": "The action to take upon successful submission", + "type": "string", + "example": "redirect" + }, + "submit_success_content": { + "title": "Submit Success Content", + "description": "The content to display upon successful submission", + "type": "string", + "example": "Thank you for contacting us!" + }, + "create_lead": { + "title": "Create Lead", + "description": "Indicates whether a lead should be created", + "type": "boolean", + "example": true + }, + "background_color": { + "title": "Background Color", + "description": "The background color of the form", + "type": "string", + "example": "#FFFFFF" + }, + "form_background_color": { + "title": "Form Background Color", + "description": "The background color of the form area", + "type": "string", + "example": "#F0F0F0" + }, + "form_title_color": { + "title": "Form Title Color", + "description": "The color of the form title", + "type": "string", + "example": "#333333" + }, + "form_submit_button_color": { + "title": "Form Submit Button Color", + "description": "The color of the submit button", + "type": "string", + "example": "#FF5733" + }, + "attribute_label_color": { + "title": "Attribute Label Color", + "description": "The color of the attribute labels", + "type": "string", + "example": "#888888" + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + }, + "Workflow": { + "title": "Attribute", + "description": "Attribute Model", + "properties": { + "id": { + "title": "ID", + "description": "ID", + "type": "integer", + "format": "int64", + "example": 1 + }, + "name": { + "title": "Name", + "description": "Name", + "type": "string", + "example": "EmailTemplate Name" + }, + "description": { + "title": "description", + "description": "Description", + "type": "string", + "example": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s." + }, + "entity_type": { + "title": "Entity Type", + "description": "Entity Type", + "type": "string", + "example": "leads" + }, + "event": { + "title": "Event", + "description": "Event", + "type": "string", + "example": "activity.update.after" + }, + "condition_type": { + "title": "Condition Type", + "description": "Condition Type", + "type": "string", + "example": "and" + }, + "conditions": { + "description": "Conditions", + "type": "array", + "items": {}, + "example": [ + { + "value": [ + "call", + "meeting", + "lunch" + ], + "operator": "{}", + "attribute": "type", + "attribute_type": "multiselect" + } + ] + }, + "actions": { + "description": "Actions", + "type": "array", + "items": {}, + "example": [ + { + "id": "send_email_to_participants", + "value": "2" + } + ] + }, + "created_at": { + "title": "Created at", + "description": "Created at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + }, + "updated_at": { + "title": "Updated at", + "description": "Updated at", + "type": "string", + "format": "datetime", + "example": "2020-01-27 17:50:45" + } + }, + "type": "object" + } + }, + "securitySchemes": { + "sanctum_admin": { + "type": "apiKey", + "description": "Enter token in format (Bearer )", + "name": "Authorization", + "in": "header" + } + } + }, + "tags": [ + { + "name": "Authentication", + "description": "API Endpoints for Authentication." + }, + { + "name": "Leads", + "description": "API Endpoints for Leads, Quotes, and Tags." + }, + { + "name": "Mail", + "description": "API Endpoints for Mail." + }, + { + "name": "Tag", + "description": "API Endpoints for Settings." + }, + { + "name": "Quotes", + "description": "API Endpoints for Quotes." + }, + { + "name": "Contacts", + "description": "API Endpoints for Contacts and Organizations." + }, + { + "name": "Products", + "description": "API Endpoints for Products." + }, + { + "name": "Configuration", + "description": "API Endpoints for Configuration." + }, + { + "name": "Activity", + "description": "API Endpoints for Activities." + }, + { + "name": "WebForm", + "description": "API Endpoints for WebForm." + }, + { + "name": "Group", + "description": "API Endpoints for Group." + }, + { + "name": "Role", + "description": "API Endpoints for Group." + }, + { + "name": "User", + "description": "API Endpoints for User." + }, + { + "name": "Source", + "description": "API Endpoints for Source." + }, + { + "name": "Attribute", + "description": "API Endpoints for Attribute." + }, + { + "name": "Pipeline", + "description": "API Endpoints for Pipeline." + }, + { + "name": "Type", + "description": "API Endpoints for Type." + }, + { + "name": "Workflow", + "description": "API Endpoints for Workflow." + }, + { + "name": "EmailTemplate", + "description": "API Endpoints for EmailTemplate." + } + ] +} \ No newline at end of file From a9b6b71c77ead783e8afebc1a97e423d63a5e5fc Mon Sep 17 00:00:00 2001 From: suraj kashyap Date: Tue, 25 Jun 2024 12:39:56 +0530 Subject: [PATCH 5/8] Minor changes. --- config/l5-swagger.php | 302 ------------------ .../Controllers/User/AccountController.php | 2 +- .../views/user/account/edit.blade.php | 3 + 3 files changed, 4 insertions(+), 303 deletions(-) delete mode 100644 config/l5-swagger.php diff --git a/config/l5-swagger.php b/config/l5-swagger.php deleted file mode 100644 index c9e1e33c2..000000000 --- a/config/l5-swagger.php +++ /dev/null @@ -1,302 +0,0 @@ - 'default', - 'documentations' => [ - 'default' => [ - 'api' => [ - 'title' => 'Krayin Rest API Documentation', - ], - - 'routes' => [ - /* - * Route for accessing api documentation interface - */ - 'api' => 'api/documentation', - 'docs' => storage_path('api-docs'), - 'oauth2_callback' => 'api/oauth2-callback', - ], - 'paths' => [ - /* - * Edit to include full URL in ui for assets - */ - 'use_absolute_path' => env('L5_SWAGGER_USE_ABSOLUTE_PATH', true), - - /* - * File name of the generated json documentation file - */ - 'docs_json' => 'api-docs.json', - - /* - * File name of the generated YAML documentation file - */ - 'docs_yaml' => 'api-docs.yaml', - - /* - * Set this to `json` or `yaml` to determine which documentation file to use in UI - */ - 'format_to_use_for_docs' => env('L5_FORMAT_TO_USE_FOR_DOCS', 'json'), - - /* - * Absolute paths to directory containing the swagger annotations are stored. - */ - 'annotations' => [ - base_path('vendor/krayin/rest-api/src/Docs'), - ], - - ], - ], - ], - 'defaults' => [ - 'routes' => [ - /* - * Route for accessing parsed swagger annotations. - */ - 'docs' => 'docs', - - /* - * Route for Oauth2 authentication callback. - */ - 'oauth2_callback' => 'api/oauth2-callback', - - /* - * Middleware allows to prevent unexpected access to API documentation - */ - 'middleware' => [ - 'api' => [], - 'asset' => [], - 'docs' => [], - 'oauth2_callback' => [], - ], - - /* - * Route Group options - */ - 'group_options' => [], - ], - - 'paths' => [ - /* - * Absolute path to location where parsed annotations will be stored - */ - 'docs' => storage_path('api-docs'), - - /* - * Absolute path to directory where to export views - */ - 'views' => base_path('resources/views/vendor/l5-swagger'), - - /* - * Edit to set the api's base path - */ - 'base' => env('L5_SWAGGER_BASE_PATH', null), - - /* - * Edit to set path where swagger ui assets should be stored - */ - 'swagger_ui_assets_path' => env('L5_SWAGGER_UI_ASSETS_PATH', 'vendor/swagger-api/swagger-ui/dist/'), - - /* - * Absolute path to directories that should be exclude from scanning - * @deprecated Please use `scanOptions.exclude` - * `scanOptions.exclude` overwrites this - */ - 'excludes' => [], - ], - - 'scanOptions' => [ - /** - * analyser: defaults to \OpenApi\StaticAnalyser . - * - * @see \OpenApi\scan - */ - 'analyser' => null, - - /** - * analysis: defaults to a new \OpenApi\Analysis . - * - * @see \OpenApi\scan - */ - 'analysis' => null, - - /** - * Custom query path processors classes. - * - * @link https://github.com/zircote/swagger-php/tree/master/Examples/schema-query-parameter-processor - * @see \OpenApi\scan - */ - 'processors' => [ - // new \App\SwaggerProcessors\SchemaQueryParameter(), - ], - - /** - * pattern: string $pattern File pattern(s) to scan (default: *.php) . - * - * @see \OpenApi\scan - */ - 'pattern' => null, - - /* - * Absolute path to directories that should be exclude from scanning - * @note This option overwrites `paths.excludes` - * @see \OpenApi\scan - */ - 'exclude' => [], - - /* - * Allows to generate specs either for OpenAPI 3.0.0 or OpenAPI 3.1.0. - * By default the spec will be in version 3.0.0 - */ - 'open_api_spec_version' => env('L5_SWAGGER_OPEN_API_SPEC_VERSION', \L5Swagger\Generator::OPEN_API_DEFAULT_SPEC_VERSION), - ], - - /* - * API security definitions. Will be generated into documentation file. - */ - 'securityDefinitions' => [ - 'securitySchemes' => [ - /* - * Examples of Security schemes - */ - /* - 'api_key_security_example' => [ // Unique name of security - 'type' => 'apiKey', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". - 'description' => 'A short description for security scheme', - 'name' => 'api_key', // The name of the header or query parameter to be used. - 'in' => 'header', // The location of the API key. Valid values are "query" or "header". - ], - 'oauth2_security_example' => [ // Unique name of security - 'type' => 'oauth2', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". - 'description' => 'A short description for oauth2 security scheme.', - 'flow' => 'implicit', // The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode". - 'authorizationUrl' => 'http://example.com/auth', // The authorization URL to be used for (implicit/accessCode) - //'tokenUrl' => 'http://example.com/auth' // The authorization URL to be used for (password/application/accessCode) - 'scopes' => [ - 'read:projects' => 'read your projects', - 'write:projects' => 'modify projects in your account', - ] - ], - */ - - /* Open API 3.0 support - 'passport' => [ // Unique name of security - 'type' => 'oauth2', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". - 'description' => 'Laravel passport oauth2 security.', - 'in' => 'header', - 'scheme' => 'https', - 'flows' => [ - "password" => [ - "authorizationUrl" => config('app.url') . '/oauth/authorize', - "tokenUrl" => config('app.url') . '/oauth/token', - "refreshUrl" => config('app.url') . '/token/refresh', - "scopes" => [] - ], - ], - ], - */ - 'sanctum_admin' => [ // Unique name of security - 'type' => 'apiKey', // Valid values are "basic", "apiKey" or "oauth2". - 'description' => 'Enter token in format (Bearer )', - 'name' => 'Authorization', // The name of the header or query parameter to be used. - 'in' => 'header', // The location of the API key. Valid values are "query" or "header". - ], - ], - 'security' => [ - /* - * Examples of Securities - */ - [ - /* - 'oauth2_security_example' => [ - 'read', - 'write' - ], - - 'passport' => [] - */ - ], - ], - ], - - /* - * Set this to `true` in development mode so that docs would be regenerated on each request - * Set this to `false` to disable swagger generation on production - */ - 'generate_always' => env('L5_SWAGGER_GENERATE_ALWAYS', false), - - /* - * Set this to `true` to generate a copy of documentation in yaml format - */ - 'generate_yaml_copy' => env('L5_SWAGGER_GENERATE_YAML_COPY', false), - - /* - * Edit to trust the proxy's ip address - needed for AWS Load Balancer - * string[] - */ - 'proxy' => false, - - /* - * Configs plugin allows to fetch external configs instead of passing them to SwaggerUIBundle. - * See more at: https://github.com/swagger-api/swagger-ui#configs-plugin - */ - 'additional_config_url' => null, - - /* - * Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), - * 'method' (sort by HTTP method). - * Default is the order returned by the server unchanged. - */ - 'operations_sort' => env('L5_SWAGGER_OPERATIONS_SORT', null), - - /* - * Pass the validatorUrl parameter to SwaggerUi init on the JS side. - * A null value here disables validation. - */ - 'validator_url' => null, - - /* - * Swagger UI configuration parameters - */ - 'ui' => [ - 'display' => [ - /* - * Controls the default expansion setting for the operations and tags. It can be : - * 'list' (expands only the tags), - * 'full' (expands the tags and operations), - * 'none' (expands nothing). - */ - 'doc_expansion' => env('L5_SWAGGER_UI_DOC_EXPANSION', 'none'), - - /** - * If set, enables filtering. The top bar will show an edit box that - * you can use to filter the tagged operations that are shown. Can be - * Boolean to enable or disable, or a string, in which case filtering - * will be enabled using that string as the filter expression. Filtering - * is case-sensitive matching the filter expression anywhere inside - * the tag. - */ - 'filter' => env('L5_SWAGGER_UI_FILTERS', true), // true | false - ], - - 'authorization' => [ - /* - * If set to true, it persists authorization data, and it would not be lost on browser close/refresh - */ - 'persist_authorization' => env('L5_SWAGGER_UI_PERSIST_AUTHORIZATION', false), - - 'oauth2' => [ - /* - * If set to true, adds PKCE to AuthorizationCodeGrant flow - */ - 'use_pkce_with_authorization_code_grant' => false, - ], - ], - ], - /* - * Constants which can be used in annotations - */ - 'constants' => [ - 'APP_URL' => env('APP_URL'), - ], - ], -]; diff --git a/packages/Webkul/Admin/src/Http/Controllers/User/AccountController.php b/packages/Webkul/Admin/src/Http/Controllers/User/AccountController.php index b9edb5a0c..c82ba8285 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/User/AccountController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/User/AccountController.php @@ -96,7 +96,7 @@ public function handleProfileImageUpload(&$data, $user) if ( isset($data['remove_image']) - && $data['remove_image'] !== '' + && $data['remove_image'] ) { $data['image'] = null; } diff --git a/packages/Webkul/Admin/src/Resources/views/user/account/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/user/account/edit.blade.php index d74c2d0e0..02fa6b522 100644 --- a/packages/Webkul/Admin/src/Resources/views/user/account/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/user/account/edit.blade.php @@ -47,6 +47,8 @@