diff --git a/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php b/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php index 8b1faf6e..3fe7b382 100644 --- a/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php +++ b/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php @@ -88,7 +88,7 @@ class CreateCustomerLogic extends AbstractControllerLogic public function logic(Request $request) : JsonResponse { /** @var User $user */ - $user = $this->createUserProcessor->execute($request, RoleTypes::USER, App::environment(['local', 'staging']) ? ApprovalStatus::APPROVED : ApprovalStatus::PENDING_VERIFICATION); + $user = $this->createUserProcessor->execute($request, RoleTypes::USER, App::environment(['local']) ? ApprovalStatus::APPROVED : ApprovalStatus::PENDING_VERIFICATION); /** @var Company $company */ $company = $this->createCompanyProcessor->execute($request, BusinessType::IMPORTER, $request->input('type'), ApprovalStatus::PENDING_SUBMISSION); @@ -100,7 +100,7 @@ class CreateCustomerLogic extends AbstractControllerLogic $this->assignSegmentProcessor->execute($company); - // $this->generateEmailVerificationAttemptProcessor->execute($user); + $this->generateEmailVerificationAttemptProcessor->execute($user); return $this->response($this->authenticationProcessor->execute($request)); diff --git a/app/Classes/Modules/Exports/Services/ExportsCustomers.php b/app/Classes/Modules/Exports/Services/ExportsCustomers.php new file mode 100644 index 00000000..f7750153 --- /dev/null +++ b/app/Classes/Modules/Exports/Services/ExportsCustomers.php @@ -0,0 +1,51 @@ +reference, + $company->name, + count($company->bookings), + $company->bookings()->sum('fix_amount'), + \PhpOffice\PhpSpreadsheet\Shared\Date::dateTimeToExcel($company->created_at) + ]; + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Exports/ExportCustomersToExcelController.php b/app/Http/Controllers/Exports/ExportCustomersToExcelController.php new file mode 100644 index 00000000..90ade160 --- /dev/null +++ b/app/Http/Controllers/Exports/ExportCustomersToExcelController.php @@ -0,0 +1,20 @@ +headers->set('Authorization', 'Bearer '.$token); + return $exportsCustomers->download('customers.csv', Excel::CSV, ['Content-Type' => 'text/csv']); + } +} \ No newline at end of file diff --git a/app/Models/Address.php b/app/Models/Address.php index 47a615b2..d240d714 100644 --- a/app/Models/Address.php +++ b/app/Models/Address.php @@ -3,9 +3,8 @@ namespace App\Models; use Illuminate\Database\Eloquent\Relations\BelongsTo; -use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Eloquent\SoftDeletes; - +use Illuminate\Database\Eloquent\Builder; /** * Class Address * @package App\Models @@ -58,4 +57,13 @@ class Address extends AbstractModel { return $this->BelongsTo(District::class, 'district_id', 'id'); } + + /** + * @param Builder $query + * @return Builder + */ + public function scopeDefault(Builder $query) + { + return $query->where('billing', '=',true)->first(); + } } diff --git a/app/Models/Booking.php b/app/Models/Booking.php index 3beacb25..33c33341 100644 --- a/app/Models/Booking.php +++ b/app/Models/Booking.php @@ -53,7 +53,7 @@ class Booking extends AbstractModel implements Documentable */ public function bank(): BelongsTo { - return $this->BelongsTo(Bank::class, 'bank_id'); + return $this->BelongsTo(Bank::class, 'bank_id')->withTrashed(); } /** diff --git a/composer.json b/composer.json index 4d27cd7f..7a3ac9b3 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,7 @@ "intervention/image": "^2.5", "laravel/framework": "^7.0", "laravel/tinker": "^2.0", + "maatwebsite/excel": "^3.1", "rinvex/countries": "^6.1", "spatie/laravel-activitylog": "^3.14", "spatie/laravel-permission": "^3.17", diff --git a/resources/assets/sass/_var.scss b/resources/assets/sass/_var.scss index eeff4640..69ae23e6 100644 --- a/resources/assets/sass/_var.scss +++ b/resources/assets/sass/_var.scss @@ -95,8 +95,7 @@ $panel-condensed-heading-min-height: 48px !default; //Forms $form-group-height: 54px !default; -$form-control-border-color: rgba($color-black, 0.4) !default; -$form-focus-border-color: #0fb5a9; +$form-control-border-color: rgba($color-black, 0.15) !default; //Dashboard $dashboard-background: #f5f5f5 !default; diff --git a/resources/assets/vue/components/accounts/forms/ForgetPasswordFormComponent.vue b/resources/assets/vue/components/accounts/forms/ForgetPasswordFormComponent.vue index 886dc836..4a0bfc1f 100644 --- a/resources/assets/vue/components/accounts/forms/ForgetPasswordFormComponent.vue +++ b/resources/assets/vue/components/accounts/forms/ForgetPasswordFormComponent.vue @@ -2,7 +2,7 @@
{{item.documents.created_at}}
+{{item.booking.marking}}
+{{item.booking.company.reference}}
+{{(Math.round((item.original_amount + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}}
+| Date | +Reference | +Marking | +Amount | +
|---|
We have received a request to reset the the password for your account on https://www.izyim.com
+We have received a request to reset the the password for your account on CIEF Exchange
Click the link below to complete the process. Note that the link expires in 24 hours
verify your email to finish your account registration on
+Please confirm that is your email address by clicking on the button below or use this link within 48 hours
+Support:
-To obtain access to this site or for any questions about its
use submit an email message to info@izyim.com