-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from frontChapter/develop
Develop
- Loading branch information
Showing
9 changed files
with
108 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
database/migrations/2024_03_04_120328_add_expired_at_to_gifts_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class () extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::table('gifts', function (Blueprint $table) { | ||
$table->timestamp('expired_at')->nullable(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::table('gifts', function (Blueprint $table) { | ||
$table->dropColumn('expired_at'); | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,51 @@ | ||
<div class="flex flex-col gap-3 lg:flex-row items-center p-4 text-secondary-200 rounded {{ $bgColor }}"> | ||
<div class="w-full"> | ||
<h3 class="mb-1 text-xl font-semibold leading-tight"> | ||
{{ $title }} | ||
</h3> | ||
<p>{{ $description }}</p> | ||
</div> | ||
<div class="flex gap-3 shadow items-stretch text-secondary-200 rounded {{ $bgColor }}"> | ||
<div class="flex gap-2 w-full p-4 flex-col lg:flex-row"> | ||
<div class="w-full"> | ||
<h3 class="mb-1 text-xl font-semibold leading-tight"> | ||
{{ $title }} | ||
</h3> | ||
<p>{{ $description }}</p> | ||
@isset($href) | ||
<div class="hidden lg:block"> | ||
<x-button sm :rightIcon="app()->getLocale() === 'fa' ? 'chevron-left' : 'chevron-right'" class="mt-2 min-w-max" dark | ||
target="_blank" :label="__('Apply Coupon')" :$href /> | ||
</div> | ||
@endisset | ||
</div> | ||
|
||
<div class="flex items-center justify-start w-full gap-4 lg:justify-end ms-auto"> | ||
<div class="flex flex-col w-full gap-1 lg:w-max"> | ||
<div class="flex items-center justify-start w-full gap-2 lg:justify-end"> | ||
<p> | ||
{{ __('Discount code') }}: | ||
<div class="flex lg:flex-col items-center lg:justify-center text-sm min-w-max gap-4 lg:gap-2"> | ||
@isset($value) | ||
<div class="lg:w-full"> | ||
<p class="opacity-85"> | ||
{{ __('Discount amount') }} | ||
</p> | ||
<x-badge class="font-mono ms-auto lg:ms-0" white lg :label="$code" /> | ||
<p class="font-semibold">{{ $value }}</p> | ||
</div> | ||
@isset($expire) | ||
<p class="text-end">{{ __('Expires at: :expiration', ['Expiration' => $expire]) }}</p> | ||
<div class="border-r-2 lg:border-r-0 lg:border-b-2 border-white/30 h-4 lg:h-0 lg:w-full"></div> | ||
@endisset | ||
@endisset | ||
@isset($expire) | ||
<div class="lg:w-full"> | ||
<p class="opacity-85"> | ||
{{ __('Expired at') }} | ||
</p> | ||
<p class="font-semibold">{{ $expire }}</p> | ||
</div> | ||
@endisset | ||
</div> | ||
</div> | ||
|
||
<div class="flex flex-col min-w-36 justify-center items-center bg-white/15 p-4 gap-1"> | ||
<p> | ||
{{ __('Discount code') }} | ||
</p> | ||
<x-badge class="font-mono shadow-lg" white lg :label="$code" /> | ||
@isset($href) | ||
<x-button class="ms-auto lg:ms-0 min-w-max" dark target="_blank" :label="__('Apply Coupon')" :$href /> | ||
<div> | ||
<x-button sm :rightIcon="app()->getLocale() === 'fa' ? 'chevron-left' : 'chevron-right'" | ||
class="mt-3 min-w-max lg:hidden" dark target="_blank" :label="__('Apply Coupon')" :$href /> | ||
</div> | ||
@endisset | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters