bugfix: improvemnets in UI, misc bugfixes
add tooltip to sidebar buttons remove profile for admin fix mobile menu not opening in home page fix deal image input modal size in mobile view make image scrollable in input modal fix explore page filters are not clickable when recent search is maxed out change UI for the recent searches add seeder for categories improve deal card ui in broker dashboard
This commit is contained in:
parent
450c8b4dce
commit
38d429e5d5
@ -11,7 +11,8 @@ class DealController extends Controller
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return view('dashboards.admin.deals.index')
|
return view('dashboards.admin.deals.index')
|
||||||
->with('deals', $this->deals());
|
->with('pendingDeals', $this->pendingDeals())
|
||||||
|
->with('activeDeals', $this->activeDeals());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function approve(Deal $deal)
|
public function approve(Deal $deal)
|
||||||
@ -30,7 +31,8 @@ public function approve(Deal $deal)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function reject(Deal $deal){
|
public function reject(Deal $deal)
|
||||||
|
{
|
||||||
try {
|
try {
|
||||||
$deal->delete();
|
$deal->delete();
|
||||||
|
|
||||||
@ -42,8 +44,13 @@ public function reject(Deal $deal){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function deals()
|
private function pendingDeals()
|
||||||
{
|
{
|
||||||
return Deal::where('active', false)->get();
|
return Deal::where('active', false)->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function activeDeals()
|
||||||
|
{
|
||||||
|
return Deal::where('active', true)->get();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,12 +10,14 @@
|
|||||||
* @property \Illuminate\Support\Carbon|null $created_at
|
* @property \Illuminate\Support\Carbon|null $created_at
|
||||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||||
* @property-read \App\Models\User|null $user
|
* @property-read \App\Models\User|null $user
|
||||||
|
*
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin query()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin query()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin whereCreatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin whereCreatedAt($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin whereId($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin whereId($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Admin whereUpdatedAt($value)
|
||||||
|
*
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Admin extends Model
|
class Admin extends Model
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
* @property \Illuminate\Support\Carbon|null $created_at
|
* @property \Illuminate\Support\Carbon|null $created_at
|
||||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||||
* @property-read \App\Models\User|null $user
|
* @property-read \App\Models\User|null $user
|
||||||
|
*
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker query()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker query()
|
||||||
@ -24,6 +25,7 @@
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker wherePhone($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker wherePhone($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker whereUpdatedAt($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker whereVerified($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Broker whereVerified($value)
|
||||||
|
*
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Broker extends Model
|
class Broker extends Model
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
* @property \Illuminate\Support\Carbon|null $created_at
|
* @property \Illuminate\Support\Carbon|null $created_at
|
||||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||||
* @property-read \App\Models\User|null $user
|
* @property-read \App\Models\User|null $user
|
||||||
|
*
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer query()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer query()
|
||||||
@ -22,6 +23,7 @@
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereLocation($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereLocation($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer wherePhone($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer wherePhone($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Customer whereUpdatedAt($value)
|
||||||
|
*
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Customer extends Model
|
class Customer extends Model
|
||||||
|
|||||||
@ -29,6 +29,7 @@
|
|||||||
* @property-read int|null $interactions_count
|
* @property-read int|null $interactions_count
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Report> $reports
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Report> $reports
|
||||||
* @property-read int|null $reports_count
|
* @property-read int|null $reports_count
|
||||||
|
*
|
||||||
* @method static Builder<static>|Deal WithActiveDeals()
|
* @method static Builder<static>|Deal WithActiveDeals()
|
||||||
* @method static Builder<static>|Deal WithCurrentUserInteractions()
|
* @method static Builder<static>|Deal WithCurrentUserInteractions()
|
||||||
* @method static Builder<static>|Deal WithLikePerDeal()
|
* @method static Builder<static>|Deal WithLikePerDeal()
|
||||||
@ -50,6 +51,7 @@
|
|||||||
* @method static Builder<static>|Deal whereUpdatedAt($value)
|
* @method static Builder<static>|Deal whereUpdatedAt($value)
|
||||||
* @method static Builder<static>|Deal whereUserId($value)
|
* @method static Builder<static>|Deal whereUserId($value)
|
||||||
* @method static Builder<static>|Deal withViewPerDeal()
|
* @method static Builder<static>|Deal withViewPerDeal()
|
||||||
|
*
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Deal extends Model
|
class Deal extends Model
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Deal> $deals
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Deal> $deals
|
||||||
* @property-read int|null $deals_count
|
* @property-read int|null $deals_count
|
||||||
|
*
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory query()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory query()
|
||||||
@ -27,10 +28,13 @@
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory whereOrder($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory whereOrder($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory whereSlug($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory whereSlug($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|DealCategory whereUpdatedAt($value)
|
||||||
|
*
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class DealCategory extends Model
|
class DealCategory extends Model
|
||||||
{
|
{
|
||||||
|
protected $fillable = ['name', 'description', 'slug', 'active', 'order'];
|
||||||
|
|
||||||
public function deals(): HasMany
|
public function deals(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Deal::class);
|
return $this->hasMany(Deal::class);
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||||
* @property-read \App\Models\Deal|null $deal
|
* @property-read \App\Models\Deal|null $deal
|
||||||
* @property-read \App\Models\Deal|null $user
|
* @property-read \App\Models\Deal|null $user
|
||||||
|
*
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction query()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction query()
|
||||||
@ -26,6 +27,7 @@
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereType($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereType($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereUpdatedAt($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereUserId($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Interaction whereUserId($value)
|
||||||
|
*
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Interaction extends Model
|
class Interaction extends Model
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
* @property \Illuminate\Support\Carbon|null $created_at
|
* @property \Illuminate\Support\Carbon|null $created_at
|
||||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||||
* @property-read \App\Models\User|null $user
|
* @property-read \App\Models\User|null $user
|
||||||
|
*
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch query()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch query()
|
||||||
@ -20,6 +21,7 @@
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch whereQuery($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch whereQuery($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch whereUpdatedAt($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch whereUserId($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|RecentSearch whereUserId($value)
|
||||||
|
*
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class RecentSearch extends Model
|
class RecentSearch extends Model
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Deal> $deals
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Deal> $deals
|
||||||
* @property-read int|null $deals_count
|
* @property-read int|null $deals_count
|
||||||
* @property-read \App\Models\User|null $user
|
* @property-read \App\Models\User|null $user
|
||||||
|
*
|
||||||
* @method static Builder<static>|Report newModelQuery()
|
* @method static Builder<static>|Report newModelQuery()
|
||||||
* @method static Builder<static>|Report newQuery()
|
* @method static Builder<static>|Report newQuery()
|
||||||
* @method static Builder<static>|Report orderByStatus(array $statusOrder)
|
* @method static Builder<static>|Report orderByStatus(array $statusOrder)
|
||||||
@ -32,6 +33,7 @@
|
|||||||
* @method static Builder<static>|Report whereType($value)
|
* @method static Builder<static>|Report whereType($value)
|
||||||
* @method static Builder<static>|Report whereUpdatedAt($value)
|
* @method static Builder<static>|Report whereUpdatedAt($value)
|
||||||
* @method static Builder<static>|Report whereUserId($value)
|
* @method static Builder<static>|Report whereUserId($value)
|
||||||
|
*
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class Report extends Model
|
class Report extends Model
|
||||||
|
|||||||
@ -39,6 +39,7 @@
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Report> $reports
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Report> $reports
|
||||||
* @property-read int|null $reports_count
|
* @property-read int|null $reports_count
|
||||||
* @property-read Model|\Eloquent|null $type
|
* @property-read Model|\Eloquent|null $type
|
||||||
|
*
|
||||||
* @method static \Database\Factories\UserFactory factory($count = null, $state = [])
|
* @method static \Database\Factories\UserFactory factory($count = null, $state = [])
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|User newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|User newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|User newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|User newQuery()
|
||||||
@ -55,6 +56,7 @@
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereRoleType($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereRoleType($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereStatus($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereStatus($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|User whereUpdatedAt($value)
|
||||||
|
*
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class User extends Authenticatable
|
class User extends Authenticatable
|
||||||
|
|||||||
66
composer.lock
generated
66
composer.lock
generated
@ -3996,16 +3996,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/finder",
|
"name": "symfony/finder",
|
||||||
"version": "v7.4.4",
|
"version": "v7.4.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/finder.git",
|
"url": "https://github.com/symfony/finder.git",
|
||||||
"reference": "01b24a145bbeaa7141e75887ec904c34a6728a5f"
|
"reference": "ad4daa7c38668dcb031e63bc99ea9bd42196a2cb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/finder/zipball/01b24a145bbeaa7141e75887ec904c34a6728a5f",
|
"url": "https://api.github.com/repos/symfony/finder/zipball/ad4daa7c38668dcb031e63bc99ea9bd42196a2cb",
|
||||||
"reference": "01b24a145bbeaa7141e75887ec904c34a6728a5f",
|
"reference": "ad4daa7c38668dcb031e63bc99ea9bd42196a2cb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -4040,7 +4040,7 @@
|
|||||||
"description": "Finds files and directories via an intuitive fluent interface",
|
"description": "Finds files and directories via an intuitive fluent interface",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/finder/tree/v7.4.4"
|
"source": "https://github.com/symfony/finder/tree/v7.4.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -4060,20 +4060,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-01-12T12:19:02+00:00"
|
"time": "2026-01-26T15:07:59+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-foundation",
|
"name": "symfony/http-foundation",
|
||||||
"version": "v7.4.4",
|
"version": "v7.4.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-foundation.git",
|
"url": "https://github.com/symfony/http-foundation.git",
|
||||||
"reference": "977a554a34cf8edc95ca351fbecb1bb1ad05cc94"
|
"reference": "446d0db2b1f21575f1284b74533e425096abdfb6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/977a554a34cf8edc95ca351fbecb1bb1ad05cc94",
|
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/446d0db2b1f21575f1284b74533e425096abdfb6",
|
||||||
"reference": "977a554a34cf8edc95ca351fbecb1bb1ad05cc94",
|
"reference": "446d0db2b1f21575f1284b74533e425096abdfb6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -4122,7 +4122,7 @@
|
|||||||
"description": "Defines an object-oriented layer for the HTTP specification",
|
"description": "Defines an object-oriented layer for the HTTP specification",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/http-foundation/tree/v7.4.4"
|
"source": "https://github.com/symfony/http-foundation/tree/v7.4.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -4142,20 +4142,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-01-09T12:14:21+00:00"
|
"time": "2026-01-27T16:16:02+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-kernel",
|
"name": "symfony/http-kernel",
|
||||||
"version": "v7.4.4",
|
"version": "v7.4.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-kernel.git",
|
"url": "https://github.com/symfony/http-kernel.git",
|
||||||
"reference": "48b067768859f7b68acf41dfb857a5a4be00acdd"
|
"reference": "229eda477017f92bd2ce7615d06222ec0c19e82a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/48b067768859f7b68acf41dfb857a5a4be00acdd",
|
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/229eda477017f92bd2ce7615d06222ec0c19e82a",
|
||||||
"reference": "48b067768859f7b68acf41dfb857a5a4be00acdd",
|
"reference": "229eda477017f92bd2ce7615d06222ec0c19e82a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -4241,7 +4241,7 @@
|
|||||||
"description": "Provides a structured process for converting a Request into a Response",
|
"description": "Provides a structured process for converting a Request into a Response",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/http-kernel/tree/v7.4.4"
|
"source": "https://github.com/symfony/http-kernel/tree/v7.4.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -4261,7 +4261,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-01-24T22:13:01+00:00"
|
"time": "2026-01-28T10:33:42+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/mailer",
|
"name": "symfony/mailer",
|
||||||
@ -4349,16 +4349,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/mime",
|
"name": "symfony/mime",
|
||||||
"version": "v7.4.4",
|
"version": "v7.4.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/mime.git",
|
"url": "https://github.com/symfony/mime.git",
|
||||||
"reference": "40945014c0a9471ccfe19673c54738fa19367a3c"
|
"reference": "b18c7e6e9eee1e19958138df10412f3c4c316148"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/mime/zipball/40945014c0a9471ccfe19673c54738fa19367a3c",
|
"url": "https://api.github.com/repos/symfony/mime/zipball/b18c7e6e9eee1e19958138df10412f3c4c316148",
|
||||||
"reference": "40945014c0a9471ccfe19673c54738fa19367a3c",
|
"reference": "b18c7e6e9eee1e19958138df10412f3c4c316148",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -4369,15 +4369,15 @@
|
|||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"egulias/email-validator": "~3.0.0",
|
"egulias/email-validator": "~3.0.0",
|
||||||
"phpdocumentor/reflection-docblock": "<3.2.2",
|
"phpdocumentor/reflection-docblock": "<5.2|>=6",
|
||||||
"phpdocumentor/type-resolver": "<1.4.0",
|
"phpdocumentor/type-resolver": "<1.5.1",
|
||||||
"symfony/mailer": "<6.4",
|
"symfony/mailer": "<6.4",
|
||||||
"symfony/serializer": "<6.4.3|>7.0,<7.0.3"
|
"symfony/serializer": "<6.4.3|>7.0,<7.0.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"egulias/email-validator": "^2.1.10|^3.1|^4",
|
"egulias/email-validator": "^2.1.10|^3.1|^4",
|
||||||
"league/html-to-markdown": "^5.0",
|
"league/html-to-markdown": "^5.0",
|
||||||
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
|
"phpdocumentor/reflection-docblock": "^5.2",
|
||||||
"symfony/dependency-injection": "^6.4|^7.0|^8.0",
|
"symfony/dependency-injection": "^6.4|^7.0|^8.0",
|
||||||
"symfony/process": "^6.4|^7.0|^8.0",
|
"symfony/process": "^6.4|^7.0|^8.0",
|
||||||
"symfony/property-access": "^6.4|^7.0|^8.0",
|
"symfony/property-access": "^6.4|^7.0|^8.0",
|
||||||
@ -4414,7 +4414,7 @@
|
|||||||
"mime-type"
|
"mime-type"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/mime/tree/v7.4.4"
|
"source": "https://github.com/symfony/mime/tree/v7.4.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -4434,7 +4434,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-01-08T16:12:55+00:00"
|
"time": "2026-01-27T08:59:58+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
@ -5267,16 +5267,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/process",
|
"name": "symfony/process",
|
||||||
"version": "v7.4.4",
|
"version": "v7.4.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/process.git",
|
"url": "https://github.com/symfony/process.git",
|
||||||
"reference": "626f07a53f4b4e2f00e11824cc29f928d797783b"
|
"reference": "608476f4604102976d687c483ac63a79ba18cc97"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/process/zipball/626f07a53f4b4e2f00e11824cc29f928d797783b",
|
"url": "https://api.github.com/repos/symfony/process/zipball/608476f4604102976d687c483ac63a79ba18cc97",
|
||||||
"reference": "626f07a53f4b4e2f00e11824cc29f928d797783b",
|
"reference": "608476f4604102976d687c483ac63a79ba18cc97",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -5308,7 +5308,7 @@
|
|||||||
"description": "Executes commands in sub-processes",
|
"description": "Executes commands in sub-processes",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/process/tree/v7.4.4"
|
"source": "https://github.com/symfony/process/tree/v7.4.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -5328,7 +5328,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-01-20T09:23:51+00:00"
|
"time": "2026-01-26T15:07:59+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/routing",
|
"name": "symfony/routing",
|
||||||
|
|||||||
22
database/seeders/CategorySeeder.php
Normal file
22
database/seeders/CategorySeeder.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use App\Models\DealCategory;
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class CategorySeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var array<int, array{name: string, description: string, slug:string, active:bool, order:int}> $categories
|
||||||
|
*/
|
||||||
|
$categories = [
|
||||||
|
['name' => 'Food', 'description' => 'Share Food related deals', 'slug' => 'food', 'active' => true, 'order' => 1],
|
||||||
|
['name' => 'Real Estate', 'description' => 'Share Real Estate related deals', 'slug' => 'real-estate', 'active' => true, 'order' => 2],
|
||||||
|
['name' => 'Sell & Deal', 'description' => 'Sell your services', 'slug' => 'sell-and-deal', 'active' => true, 'order' => 3],
|
||||||
|
];
|
||||||
|
DealCategory::insert($categories);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,4 @@
|
|||||||
import './bootstrap';
|
import './bootstrap';
|
||||||
import {setSidebarState} from '@/sidebar.js';
|
|
||||||
import "./alert.js"
|
import "./alert.js"
|
||||||
import "./image-input.js"
|
import "./image-input.js"
|
||||||
import "./menu.js"
|
import "./menu.js"
|
||||||
@ -7,11 +6,13 @@ import "./modal.js"
|
|||||||
import "./sidebar.js"
|
import "./sidebar.js"
|
||||||
import "./toast.js"
|
import "./toast.js"
|
||||||
import "./deal-view-modal.js"
|
import "./deal-view-modal.js"
|
||||||
|
import {setSidebarState} from './sidebar.js';
|
||||||
import {favorite, like, redirect} from "./interaction.js";
|
import {favorite, like, redirect} from "./interaction.js";
|
||||||
import {showReportModal} from "./report-deal.js";
|
import {showReportModal} from "./report-deal.js";
|
||||||
import {initTabs} from "./tab.js";
|
import {initTabs} from "./tab.js";
|
||||||
import {loadModalFromQuery} from "./explore-page.js";
|
import {loadModalFromQuery} from "./explore-page.js";
|
||||||
import {deleteRecentSearch} from "./deleteRecentSearch.js";
|
import {deleteRecentSearch} from "./deleteRecentSearch.js";
|
||||||
|
import {initNavMenu} from "./nav-menu.js";
|
||||||
|
|
||||||
document.deleteSearch = deleteRecentSearch;
|
document.deleteSearch = deleteRecentSearch;
|
||||||
document.like = like;
|
document.like = like;
|
||||||
@ -37,7 +38,7 @@ window.addEventListener('load', async () => {
|
|||||||
setSidebarState(savedState);
|
setSidebarState(savedState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
initNavMenu();
|
||||||
initTabs();
|
initTabs();
|
||||||
|
|
||||||
await loadModalFromQuery();
|
await loadModalFromQuery();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
export function initNavMenu() {
|
||||||
const openBtn = document.getElementById('openBtn');
|
const openBtn = document.getElementById('openBtn');
|
||||||
const closeBtn = document.getElementById('closeBtn');
|
const closeBtn = document.getElementById('closeBtn');
|
||||||
const mobileMenu = document.getElementById('mobileMenu');
|
const mobileMenu = document.getElementById('mobileMenu');
|
||||||
@ -18,3 +19,4 @@ if (closeBtn) {
|
|||||||
body.style.overflow = 'visible';
|
body.style.overflow = 'visible';
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@ class=" h-full items-center flex justify-center">
|
|||||||
</x-ui.table.row>
|
</x-ui.table.row>
|
||||||
@empty
|
@empty
|
||||||
<x-ui.table.row>
|
<x-ui.table.row>
|
||||||
<td colspan="4" class="text-center text-sm text-accent-600 py-2">No Broker found</td>
|
<td colspan="3" class="text-center text-sm text-accent-600 py-2">No broker found</td>
|
||||||
</x-ui.table.row>
|
</x-ui.table.row>
|
||||||
@endforelse
|
@endforelse
|
||||||
</x-ui.table>
|
</x-ui.table>
|
||||||
|
|||||||
@ -0,0 +1,52 @@
|
|||||||
|
@props(['deals' => []])
|
||||||
|
<x-dashboard.card class="w-full">
|
||||||
|
<h3 class="text-md font-bold mb-2">Approved deals</h3>
|
||||||
|
<x-ui.table>
|
||||||
|
<x-ui.table.head>
|
||||||
|
<th>Title</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>Link</th>
|
||||||
|
<th>Category</th>
|
||||||
|
<th>Broker</th>
|
||||||
|
</x-ui.table.head>
|
||||||
|
|
||||||
|
@forelse($deals as $deal)
|
||||||
|
<x-ui.table.row>
|
||||||
|
<td class="text-sm font-medium px-4 text-center truncate max-w-20">{{ucfirst($deal->title)}}</td>
|
||||||
|
<td class="text-sm text-accent-600 px-4 text-center truncate max-w-60">{{$deal->description}}</td>
|
||||||
|
<td class="text-sm px-4 text-center">{{$deal->link}}</td>
|
||||||
|
<td class="text-sm px-4 text-center">{{$deal->category->name}}</td>
|
||||||
|
<td class="text-sm px-4 text-center">{{$deal->broker->name}}</td>
|
||||||
|
{{-- <x-slot:actions>--}}
|
||||||
|
{{-- <div class="flex items-center justify-center space-x-2 py-1 px-2">--}}
|
||||||
|
{{-- <form action="{{route('admin.deals.approve', $deal)}}"--}}
|
||||||
|
{{-- onsubmit="return confirm('Are you sure to activate the deal ?')" method="post"--}}
|
||||||
|
{{-- class=" h-full items-center flex justify-center">--}}
|
||||||
|
{{-- @csrf--}}
|
||||||
|
{{-- <x-ui.button-sm tooltip="Approve deal" variant="green">--}}
|
||||||
|
{{-- <x-heroicon-o-check class="w-4"/>--}}
|
||||||
|
{{-- </x-ui.button-sm>--}}
|
||||||
|
{{-- </form>--}}
|
||||||
|
|
||||||
|
{{-- <form action="{{route('admin.deals.reject', $deal)}}"--}}
|
||||||
|
{{-- onsubmit="return confirm('Are you sure to delete the deal ?')" method="post"--}}
|
||||||
|
{{-- class=" h-full items-center flex justify-center">--}}
|
||||||
|
{{-- @csrf--}}
|
||||||
|
{{-- <x-ui.button-sm tooltip="Delete deal" variant="red">--}}
|
||||||
|
{{-- <x-heroicon-o-x-mark class="w-4"/>--}}
|
||||||
|
{{-- </x-ui.button-sm>--}}
|
||||||
|
{{-- </form>--}}
|
||||||
|
|
||||||
|
{{-- <x-ui.button-sm data-deal-id="{{$deal->id}}" class="view-deal-btn" tooltip="View Content" variant="ghost">--}}
|
||||||
|
{{-- <x-heroicon-o-eye class="w-4"/>--}}
|
||||||
|
{{-- </x-ui.button-sm>--}}
|
||||||
|
{{-- </div>--}}
|
||||||
|
{{-- </x-slot:actions>--}}
|
||||||
|
</x-ui.table.row>
|
||||||
|
@empty
|
||||||
|
<x-ui.table.row>
|
||||||
|
<td colspan="5" class="text-center text-sm text-accent-600 py-2">No deals found</td>
|
||||||
|
</x-ui.table.row>
|
||||||
|
@endforelse
|
||||||
|
</x-ui.table>
|
||||||
|
</x-dashboard.card>
|
||||||
@ -42,7 +42,7 @@ class=" h-full items-center flex justify-center">
|
|||||||
</x-ui.table.row>
|
</x-ui.table.row>
|
||||||
@empty
|
@empty
|
||||||
<x-ui.table.row>
|
<x-ui.table.row>
|
||||||
<td colspan="4" class="text-center text-sm text-accent-600 py-2">No Broker found</td>
|
<td colspan="4" class="text-center text-sm text-accent-600 py-2">No broker found</td>
|
||||||
</x-ui.table.row>
|
</x-ui.table.row>
|
||||||
@endforelse
|
@endforelse
|
||||||
</x-ui.table>
|
</x-ui.table>
|
||||||
|
|||||||
@ -0,0 +1,52 @@
|
|||||||
|
@props(['deals' => []])
|
||||||
|
<x-dashboard.card class="w-full">
|
||||||
|
<h3 class="text-md font-bold mb-2">Pending deals</h3>
|
||||||
|
<x-ui.table>
|
||||||
|
<x-ui.table.head>
|
||||||
|
<th>Title</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>Link</th>
|
||||||
|
<th>Category</th>
|
||||||
|
<th>Broker</th>
|
||||||
|
</x-ui.table.head>
|
||||||
|
|
||||||
|
@forelse($deals as $deal)
|
||||||
|
<x-ui.table.row>
|
||||||
|
<td class="text-sm font-medium px-4 text-center truncate max-w-20">{{ucfirst($deal->title)}}</td>
|
||||||
|
<td class="text-sm text-accent-600 px-4 text-center truncate max-w-60">{{$deal->description}}</td>
|
||||||
|
<td class="text-sm px-4 text-center">{{$deal->link}}</td>
|
||||||
|
<td class="text-sm px-4 text-center">{{$deal->category->name}}</td>
|
||||||
|
<td class="text-sm px-4 text-center">{{$deal->broker->name}}</td>
|
||||||
|
<x-slot:actions>
|
||||||
|
<div class="flex items-center justify-center space-x-2 py-1 px-2">
|
||||||
|
<form action="{{route('admin.deals.approve', $deal)}}"
|
||||||
|
onsubmit="return confirm('Are you sure to activate the deal ?')" method="post"
|
||||||
|
class=" h-full items-center flex justify-center">
|
||||||
|
@csrf
|
||||||
|
<x-ui.button-sm tooltip="Approve deal" variant="green">
|
||||||
|
<x-heroicon-o-check class="w-4"/>
|
||||||
|
</x-ui.button-sm>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form action="{{route('admin.deals.reject', $deal)}}"
|
||||||
|
onsubmit="return confirm('Are you sure to delete the deal ?')" method="post"
|
||||||
|
class=" h-full items-center flex justify-center">
|
||||||
|
@csrf
|
||||||
|
<x-ui.button-sm tooltip="Delete deal" variant="red">
|
||||||
|
<x-heroicon-o-x-mark class="w-4"/>
|
||||||
|
</x-ui.button-sm>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<x-ui.button-sm data-deal-id="{{$deal->id}}" class="view-deal-btn" tooltip="View Content" variant="ghost">
|
||||||
|
<x-heroicon-o-eye class="w-4"/>
|
||||||
|
</x-ui.button-sm>
|
||||||
|
</div>
|
||||||
|
</x-slot:actions>
|
||||||
|
</x-ui.table.row>
|
||||||
|
@empty
|
||||||
|
<x-ui.table.row>
|
||||||
|
<td colspan="5" class="text-center text-sm text-accent-600 py-2">No deals found</td>
|
||||||
|
</x-ui.table.row>
|
||||||
|
@endforelse
|
||||||
|
</x-ui.table>
|
||||||
|
</x-dashboard.card>
|
||||||
@ -1,44 +1,45 @@
|
|||||||
@props(['activeClass' => 'bg-gray-100 text-gray-900'])
|
@props(['activeClass' => 'bg-gray-100 text-gray-900'])
|
||||||
|
|
||||||
<div
|
<div
|
||||||
id="sidebarWrapper" {{$attributes->merge([ 'class' => 'border-r border-r-gray-300 transition-all duration-300 ease-in-out w-64 relative'])}}>
|
id="sidebarWrapper" {{$attributes->merge([ 'class' => 'border-r border-r-gray-300 group transition-all duration-300 ease-in-out w-64 relative'])}}>
|
||||||
<div class="hidden md:flex h-screen items-center">
|
<div class="hidden md:flex h-screen items-center">
|
||||||
<div id="sidebar"
|
<div id="sidebar"
|
||||||
class="flex flex-col p-4 pt-6 justify-between font-medium h-full w-full overflow-hidden transition-all duration-300 ease-in-out">
|
class="flex flex-col p-4 pt-6 justify-between font-medium h-full w-full transition-all duration-300 ease-in-out">
|
||||||
<div class="">
|
<div>
|
||||||
<div class="flex space-x-4 border-b border-b-gray-300 pb-6">
|
<div class="flex space-x-4 border-b border-b-gray-300 pb-6 n">
|
||||||
<x-logo/>
|
<x-logo/>
|
||||||
<a href="{{route('home')}}" class="whitespace-nowrap">
|
<a href="{{route('home')}}" class="whitespace-nowrap group-[.w-20]:hidden">
|
||||||
<p class="text-2xl font-bold">DealHub</p>
|
<p class="text-2xl font-bold">DealHub</p>
|
||||||
<p class="text-accent-600 text-sm">Admin Panel</p>
|
<p class="text-accent-600 text-sm">Admin Panel</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pt-6 flex flex-col space-y-3 whitespace-nowrap">
|
<div class="pt-6 flex flex-col space-y-3 whitespace-nowrap">
|
||||||
<x-dashboard.broker.sidebar.item :link="route('admin.dashboard')">
|
<x-dashboard.broker.sidebar.item tooltip="Dashboard" :link="route('admin.dashboard')">
|
||||||
<x-heroicon-o-squares-2x2 class="min-w-5 w-5"/>
|
<x-heroicon-o-squares-2x2 class="min-w-5 w-5"/>
|
||||||
<p class="sidebar-text transition-opacity duration-300 ease-in-out ">Dashboard</p>
|
<p class="sidebar-text transition-opacity duration-300 ease-in-out ">Dashboard</p>
|
||||||
</x-dashboard.broker.sidebar.item>
|
</x-dashboard.broker.sidebar.item>
|
||||||
|
|
||||||
<x-dashboard.broker.sidebar.item
|
<x-dashboard.broker.sidebar.item
|
||||||
|
tooltip="Manage Customers"
|
||||||
:active="\Illuminate\Support\Facades\Route::is('admin.customers.*')"
|
:active="\Illuminate\Support\Facades\Route::is('admin.customers.*')"
|
||||||
:link="route('admin.customers.index')">
|
:link="route('admin.customers.index')">
|
||||||
<x-heroicon-o-users class="min-w-5 w-5"/>
|
<x-heroicon-o-users class="min-w-5 w-5"/>
|
||||||
<p class="sidebar-text transition-opacity duration-300 ease-in-out ">Manage Customers</p>
|
<p class="sidebar-text transition-opacity duration-300 ease-in-out ">Manage Customers</p>
|
||||||
</x-dashboard.broker.sidebar.item>
|
</x-dashboard.broker.sidebar.item>
|
||||||
|
|
||||||
<x-dashboard.broker.sidebar.item :active="\Illuminate\Support\Facades\Route::is('admin.brokers.*')"
|
<x-dashboard.broker.sidebar.item tooltip="Manage Brokers" :active="\Illuminate\Support\Facades\Route::is('admin.brokers.*')"
|
||||||
:link="route('admin.brokers.index')">
|
:link="route('admin.brokers.index')">
|
||||||
<x-heroicon-o-user class="min-w-5 w-5"/>
|
<x-heroicon-o-user class="min-w-5 w-5"/>
|
||||||
<p class="sidebar-text transition-opacity duration-300 ease-in-out">Manage Brokers</p>
|
<p class="sidebar-text transition-opacity duration-300 ease-in-out">Manage Brokers</p>
|
||||||
</x-dashboard.broker.sidebar.item>
|
</x-dashboard.broker.sidebar.item>
|
||||||
|
|
||||||
<x-dashboard.broker.sidebar.item :link="route('admin.reports.index')">
|
<x-dashboard.broker.sidebar.item tooltip="Manage Reports" :link="route('admin.reports.index')">
|
||||||
<x-heroicon-o-exclamation-triangle class="w-5 min-w-5"/>
|
<x-heroicon-o-exclamation-triangle class="w-5 min-w-5"/>
|
||||||
<p class="sidebar-text transition-opacity duration-300 ease-in-out">Manage Reports</p>
|
<p class="sidebar-text transition-opacity duration-300 ease-in-out">Manage Reports</p>
|
||||||
</x-dashboard.broker.sidebar.item>
|
</x-dashboard.broker.sidebar.item>
|
||||||
|
|
||||||
<x-dashboard.broker.sidebar.item :link="route('admin.deals.index')">
|
<x-dashboard.broker.sidebar.item tooltip="Manage Deals" :link="route('admin.deals.index')">
|
||||||
<x-heroicon-o-fire class="w-5 min-w-5"/>
|
<x-heroicon-o-fire class="w-5 min-w-5"/>
|
||||||
<p class="sidebar-text transition-opacity duration-300 ease-in-out">Manage Deals</p>
|
<p class="sidebar-text transition-opacity duration-300 ease-in-out">Manage Deals</p>
|
||||||
</x-dashboard.broker.sidebar.item>
|
</x-dashboard.broker.sidebar.item>
|
||||||
@ -46,10 +47,6 @@ class="flex flex-col p-4 pt-6 justify-between font-medium h-full w-full overflow
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<x-dashboard.broker.sidebar.item :link="route('broker.profile.show', auth()->user()->id)">
|
|
||||||
<x-heroicon-o-user class="w-5 min-w-5"/>
|
|
||||||
<p class="sidebar-text transition-opacity duration-300 ease-in-out">Profile</p>
|
|
||||||
</x-dashboard.broker.sidebar.item>
|
|
||||||
|
|
||||||
<form method="post" action="{{route('logout')}}">
|
<form method="post" action="{{route('logout')}}">
|
||||||
@csrf
|
@csrf
|
||||||
|
|||||||
@ -1,10 +1,18 @@
|
|||||||
@props([ 'link' => '', 'active' => false])
|
@props([ 'link' => '', 'active' => false, 'tooltip' => ''])
|
||||||
@php
|
@php
|
||||||
if (!$active){
|
if (!$active){
|
||||||
$active = url()->current() === $link;
|
$active = url()->current() === $link;
|
||||||
}
|
}
|
||||||
@endphp
|
@endphp
|
||||||
@aware(['activeClass' => 'bg-gray-100 text-gray-900'])
|
@aware(['activeClass' => 'bg-gray-100 text-gray-900'])
|
||||||
|
<div class="relative group/item w-full hover:z-10">
|
||||||
<a href="{{$link}}" {{$attributes->class(["flex space-x-3 items-center pl-3 py-3 rounded-xl hover:bg-gray-100 border border-transparent ease-in-out transition-all duration-300 active:scale-80 hover:border-gray-300", $activeClass => $active])}} >
|
<a href="{{$link}}" {{$attributes->class(["flex space-x-3 items-center pl-3 py-3 rounded-xl hover:bg-gray-100 border border-transparent ease-in-out transition-all duration-300 active:scale-80 hover:border-gray-300", $activeClass => $active])}} >
|
||||||
{{$slot}}
|
{{$slot}}
|
||||||
</a>
|
</a>
|
||||||
|
@if($tooltip !== '')
|
||||||
|
<span
|
||||||
|
class="absolute z-10 top-[30%] hidden group-[.w-20]:group-hover/item:block left-[110%] py-1 px-2 rounded-lg bg-gray-900 text-xs whitespace-nowrap text-white">
|
||||||
|
{{$tooltip}}
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
<div {{$attributes->merge(['class' => 'p-4 md:p-6 border border-gray-200 rounded-xl'])}}>
|
<div {{$attributes->merge(['class' => 'bg-white p-4 md:p-6 border border-gray-200 rounded-xl'])}}>
|
||||||
{{$slot}}
|
{{$slot}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
@props(['item'])
|
@props(['item'])
|
||||||
<li class="flex space-x-2">
|
<li class="flex items-center space-x-2 px-4 py-1 md:py-2 text-gray-600 hover:bg-gray-100 hover:font-bold hover:text-gray-900 rounded-xl">
|
||||||
<a class="p-2 md:p-4 flex-1 flex items-center text-gray-600 hover:bg-gray-100 hover:font-bold hover:text-gray-900 rounded-xl"
|
<a class="flex-1 flex items-center"
|
||||||
href="{{route('explore', ['search' => $item])}}">
|
href="{{route('explore', ['search' => $item])}}">
|
||||||
{{$item->query}}
|
{{$item->query}}
|
||||||
<x-heroicon-o-arrow-up-right class="w-3 ml-2"/>
|
<x-heroicon-o-arrow-up-right class="w-3 ml-2"/>
|
||||||
|
|||||||
@ -17,8 +17,8 @@
|
|||||||
Connect with trusted brokers and discover opportunities you can count on.
|
Connect with trusted brokers and discover opportunities you can count on.
|
||||||
</p>
|
</p>
|
||||||
<div class="mt-6 flex flex-col gap-4 md:flex-row">
|
<div class="mt-6 flex flex-col gap-4 md:flex-row">
|
||||||
<a href="" class="ui-btn ui-btn-neutral">Explore Deals <x-heroicon-o-arrow-right class="w-4 inline ml-4"/> </a>
|
<a href="{{route('explore')}}" class="ui-btn ui-btn-neutral">Explore Deals <x-heroicon-o-arrow-right class="w-4 inline ml-4"/> </a>
|
||||||
<a href="" class="ui-btn ui-btn bg-white/80 border border-gray-300">Become a Broker</a>
|
<a href="{{route('register.create')}}" class="ui-btn ui-btn bg-white/80 border border-gray-300">Become a Broker</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Left section end -->
|
<!-- Left section end -->
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<!-- mobile menu btn-->
|
<!-- mobile menu btn-->
|
||||||
<div id='mobileMenu' class="hidden absolute top-0 h-[101vh] overflow-y-hidden w-[101vw] bg-gray-200 text-xl z-1 p-10">
|
<div id='mobileMenu' class="fixed top-0 left-0 z-100 h-screen w-full translate-x-full bg-gray-100/50 backdrop-blur-xl p-10 text-xl transition-transform duration-500 ease-in-out overflow-y-auto">
|
||||||
<div class="flex justify-between mb-8">
|
<div class="flex justify-between mb-8">
|
||||||
<x-logo/>
|
<x-logo/>
|
||||||
<x-ui.button id="closeBtn">
|
<x-ui.button id="closeBtn">
|
||||||
@ -46,7 +46,7 @@
|
|||||||
<div class="nav-links mb-10">
|
<div class="nav-links mb-10">
|
||||||
<ul class="flex flex-col space-y-8 text-accent-600">
|
<ul class="flex flex-col space-y-8 text-accent-600">
|
||||||
<x-nav-links :link="route('home')" name="Home"/>
|
<x-nav-links :link="route('home')" name="Home"/>
|
||||||
<x-nav-links :link="route('home')" name="Explore deals"/>
|
<x-nav-links :link="route('explore')" name="Explore deals"/>
|
||||||
<x-nav-links :link="route('home')" name="About"/>
|
<x-nav-links :link="route('home')" name="About"/>
|
||||||
<x-nav-links :link="route('home')" name="Contact"/>
|
<x-nav-links :link="route('home')" name="Contact"/>
|
||||||
<a href="{{route('login.create')}}">Login</a>
|
<a href="{{route('login.create')}}">Login</a>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
@props(['image' => '', 'alt' => ''])
|
@props(['image' => '', 'alt' => ''])
|
||||||
<div {{$attributes->merge(['class' => "border border-gray-200 rounded-xl overflow-clip flex flex-col h-full"])}}>
|
<div {{$attributes->merge(['class' => "border border-gray-200 rounded-xl overflow-clip flex flex-col h-full"])}}>
|
||||||
<div class="flex flex-col h-full">
|
<div class="flex flex-col h-full">
|
||||||
<div class="rounded-t-xl h-70">
|
<div class="rounded-t-xl h-70 bg-gray-100 flex justify-center items-center">
|
||||||
<img src="{{$image}}" alt="" class="object-cover">
|
<img src="{{$image}}" alt="" class="object-cover">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
|
|||||||
@ -38,8 +38,8 @@ class="opacity-0 absolute w-full h-full top-0 left-0 cursor-pointer z-20"
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<dialog id="image-modal"
|
<dialog id="image-modal"
|
||||||
class="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-lg p-4 shadow-lg">
|
class="fixed w-max max-h-[90vh] top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-lg p-4 shadow-lg">
|
||||||
<div>
|
<div class="overflow-scroll max-h-[75vh]">
|
||||||
<img src="" alt="" id="image-placeholder">
|
<img src="" alt="" id="image-placeholder">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex space-x-4 mt-6 justify-end">
|
<div class="flex space-x-4 mt-6 justify-end">
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<div id="preloader"
|
<div id="preloader"
|
||||||
class="bg-white fixed top-0 left-0 h-screen w-screen z-1000 flex items-center justify-center opacity-100 transition-opacity duration-300 ease-in-out">
|
class="bg-gray-100 fixed top-0 left-0 h-screen w-screen z-1000 flex items-center justify-center opacity-100 transition-all duration-500 ease-in-out">
|
||||||
<div
|
<div
|
||||||
class="inline-block h-8 w-8 animate-spin rounded-full border-4
|
class="inline-block h-8 w-8 animate-spin rounded-full border-4
|
||||||
border-solid border-black border-e-transparent align-[-0.125em]
|
border-solid border-black border-e-transparent align-[-0.125em]
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class=" h-full items-center flex justify-center">
|
|||||||
</x-ui.table.row>
|
</x-ui.table.row>
|
||||||
@empty
|
@empty
|
||||||
<x-ui.table.row>
|
<x-ui.table.row>
|
||||||
<td colspan="2" class="text-center text-sm text-accent-600 py-2">No Customer found</td>
|
<td colspan="3" class="text-center text-sm text-accent-600 py-2">No Customer found</td>
|
||||||
</x-ui.table.row>
|
</x-ui.table.row>
|
||||||
@endforelse
|
@endforelse
|
||||||
</x-ui.table>
|
</x-ui.table>
|
||||||
|
|||||||
@ -6,58 +6,9 @@
|
|||||||
description="Approve or reject deals"
|
description="Approve or reject deals"
|
||||||
/>
|
/>
|
||||||
</x-slot:heading>
|
</x-slot:heading>
|
||||||
<div class="flex items-center justify-center px-4 pb-4 pt-0 md:px-8 md:pb-8">
|
<div class="flex flex-col items-center justify-center space-y-4 md:space-y-8 px-4 pb-4 pt-0 md:px-8 md:pb-8">
|
||||||
<x-dashboard.card class="w-full">
|
<x-dashboard.admin.pending-deals :deals="$pendingDeals" />
|
||||||
<h3 class="text-md font-bold mb-2">Approve deals</h3>
|
<x-dashboard.admin.all-deals :deals="$activeDeals" />
|
||||||
<x-ui.table>
|
|
||||||
<x-ui.table.head>
|
|
||||||
<th>Title</th>
|
|
||||||
<th>Description</th>
|
|
||||||
<th>Link</th>
|
|
||||||
<th>Category</th>
|
|
||||||
<th>Broker</th>
|
|
||||||
</x-ui.table.head>
|
|
||||||
|
|
||||||
@forelse($deals as $deal)
|
|
||||||
<x-ui.table.row>
|
|
||||||
<td class="text-sm font-medium px-4 text-center truncate max-w-20">{{ucfirst($deal->title)}}</td>
|
|
||||||
<td class="text-sm text-accent-600 px-4 text-center truncate max-w-60">{{$deal->description}}</td>
|
|
||||||
<td class="text-sm px-4 text-center">{{$deal->link}}</td>
|
|
||||||
<td class="text-sm px-4 text-center">{{$deal->category->name}}</td>
|
|
||||||
<td class="text-sm px-4 text-center">{{$deal->broker->name}}</td>
|
|
||||||
<x-slot:actions>
|
|
||||||
<div class="flex items-center justify-center space-x-2 py-1 px-2">
|
|
||||||
<form action="{{route('admin.deals.approve', $deal)}}"
|
|
||||||
onsubmit="return confirm('Are you sure to activate the deal ?')" method="post"
|
|
||||||
class=" h-full items-center flex justify-center">
|
|
||||||
@csrf
|
|
||||||
<x-ui.button-sm tooltip="Approve deal" variant="green">
|
|
||||||
<x-heroicon-o-check class="w-4"/>
|
|
||||||
</x-ui.button-sm>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form action="{{route('admin.deals.reject', $deal)}}"
|
|
||||||
onsubmit="return confirm('Are you sure to delete the deal ?')" method="post"
|
|
||||||
class=" h-full items-center flex justify-center">
|
|
||||||
@csrf
|
|
||||||
<x-ui.button-sm tooltip="Delete deal" variant="red">
|
|
||||||
<x-heroicon-o-x-mark class="w-4"/>
|
|
||||||
</x-ui.button-sm>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<x-ui.button-sm data-deal-id="{{$deal->id}}" class="view-deal-btn" tooltip="View Content" variant="ghost">
|
|
||||||
<x-heroicon-o-eye class="w-4"/>
|
|
||||||
</x-ui.button-sm>
|
|
||||||
</div>
|
|
||||||
</x-slot:actions>
|
|
||||||
</x-ui.table.row>
|
|
||||||
@empty
|
|
||||||
<x-ui.table.row>
|
|
||||||
<td colspan="2" class="text-center text-sm text-accent-600 py-2">No Customer found</td>
|
|
||||||
</x-ui.table.row>
|
|
||||||
@endforelse
|
|
||||||
</x-ui.table>
|
|
||||||
</x-dashboard.card>
|
|
||||||
</div>
|
</div>
|
||||||
<x-dashboard.user.deal-modal />
|
<x-dashboard.user.deal-modal />
|
||||||
@vite('resources/js/admin-deals.js')
|
@vite('resources/js/admin-deals.js')
|
||||||
|
|||||||
@ -78,7 +78,7 @@ class=" h-full items-center flex justify-center">
|
|||||||
</x-ui.table.row>
|
</x-ui.table.row>
|
||||||
@empty
|
@empty
|
||||||
<x-ui.table.row>
|
<x-ui.table.row>
|
||||||
<td colspan="2" class="text-center text-sm text-accent-600 py-2">No Customer found</td>
|
<td colspan="5" class="text-center text-sm text-accent-600 py-2">No deals found</td>
|
||||||
</x-ui.table.row>
|
</x-ui.table.row>
|
||||||
@endforelse
|
@endforelse
|
||||||
</x-ui.table>
|
</x-ui.table>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user