From 87d69bd81ba463f5621e2967467a148b87ed6154 Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 14 Jun 2024 16:47:39 +0530 Subject: [PATCH 1/7] fixing changes --- .../Admin/ManageSubAdminController.php | 22 +++++++++---------- .../Pages/manage_leads/view-lead.blade.php | 19 ++++++++-------- .../partial/overview-row.blade.php | 2 +- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/app/Http/Controllers/Admin/ManageSubAdminController.php b/app/Http/Controllers/Admin/ManageSubAdminController.php index c36d6ef..5d8465b 100644 --- a/app/Http/Controllers/Admin/ManageSubAdminController.php +++ b/app/Http/Controllers/Admin/ManageSubAdminController.php @@ -59,7 +59,7 @@ class ManageSubAdminController extends Controller if (!$check) { abort(404); } - $subAdmin = User::where(['role' => 2])->whereNotIn('id', [auth()->user()->id])->orderBy('last_login','desc')->get(); + $subAdmin = User::where(['role' => 2])->whereNotIn('id', [auth()->user()->id])->orderBy('created_at','desc')->get(); // $subAdmin = User::where('status', 1)->whereIn('role', ['1', '2'])->whereNotIn('id', [auth()->user()->id])->latest()->get(); // dd($subAdmin); return view('Admin.sub_admin_list', ['subAdmin' => $subAdmin]); @@ -72,9 +72,9 @@ class ManageSubAdminController extends Controller $validator = Validator::make($request->post(), [ 'name' => 'required', // 'address' => 'required', - 'mobile_number' => 'required', + 'mobile_number' => 'required|unique:users,contact_number', 'password' => 'required', - 'email' => 'required', + 'email' => 'required|unique:users', ], [ 'unique' => ':attribute should be unique', 'required' => ':attribute is required' @@ -86,14 +86,14 @@ class ManageSubAdminController extends Controller // $principalType = Iam_Principal_Type::find($request->role_type); $emailAlreadyExists = User::where('email',$request->email)->exists(); $contactAlreadyExists = User::where('contact_number',$request->contact_number)->exists(); - if($emailAlreadyExists) - { - return response()->json(['status' => 400, 'message' =>'email should be unique']); - } - if($contactAlreadyExists) - { - return response()->json(['status' => 400, 'message' =>'Mobile number should be unique']); - } + // if($emailAlreadyExists) + // { + // return response()->json(['status' => 400, 'message' =>'email should be unique']); + // } + // if($contactAlreadyExists) + // { + // return response()->json(['status' => 400, 'message' =>'Mobile number should be unique']); + // } // defining user type if ($request->role_type == 1) { diff --git a/resources/views/Admin/Pages/manage_leads/view-lead.blade.php b/resources/views/Admin/Pages/manage_leads/view-lead.blade.php index f93cde5..8e83614 100644 --- a/resources/views/Admin/Pages/manage_leads/view-lead.blade.php +++ b/resources/views/Admin/Pages/manage_leads/view-lead.blade.php @@ -511,20 +511,21 @@ {{-- @dd($lead) --}} - {{ $lead->owner ? $lead->owner->name : '--' }} + {{ $lead->owner ? $lead->owner->name : 'N/A' }} - {{-- {{$lead->product->category->category_name ? $lead->product->category->category_name:'--'}} --}} - {{ $lead->product->category->category_name ?? 'NA' }} - {{ $lead->title }} - {{ $lead->first_name ? $lead->first_name : '--' }} + {{-- {{$lead->product->category->category_name ? $lead->product->category->category_name:'N/A'}} --}} + {{ $lead->product->category->category_name ?? 'N/A' }} + {{ $lead->title ?? 'N/A' }} + {{ $lead->first_name ? $lead->first_name : 'N/A' }} {{ $lead->phone ? $lead->phone : '--' }} + href="">{{ $lead->phone ? $lead->phone : 'N/A' }} {{ $lead->mobile ? $lead->mobile : '--' }} + href="">{{ $lead->mobile ? $lead->mobile : 'N/A' }} - {{ $lead->leadSource ? $lead->leadSource->name : '--' }} - {{ $lead->modified_by ?? '--' }} + {{ $lead->lead_source ?? 'N/A' }} + {{ $lead->annual_revenue ?? 'N/A' }} + {{ $lead->total_employees ?? 'N/A' }} diff --git a/resources/views/Admin/Pages/pre_owned_investment/partial/overview-row.blade.php b/resources/views/Admin/Pages/pre_owned_investment/partial/overview-row.blade.php index f8c8d38..c89aaf2 100644 --- a/resources/views/Admin/Pages/pre_owned_investment/partial/overview-row.blade.php +++ b/resources/views/Admin/Pages/pre_owned_investment/partial/overview-row.blade.php @@ -51,7 +51,7 @@ - + From 70a6981f72827b8d8bd924dd28b7cd986b847ab0 Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 14 Jun 2024 17:33:59 +0530 Subject: [PATCH 2/7] added eye icon --- public/assets/css/style.bundle.css | 10 + .../manage_sub_admin/reset-password.blade.php | 318 ++++++++++-------- 2 files changed, 180 insertions(+), 148 deletions(-) diff --git a/public/assets/css/style.bundle.css b/public/assets/css/style.bundle.css index 72fb8d4..8b74683 100644 --- a/public/assets/css/style.bundle.css +++ b/public/assets/css/style.bundle.css @@ -122,6 +122,16 @@ h6 { color: var(--bs-heading-color); } +.reset { + position: relative; +} + +.reset span.toggle-password { + position: absolute; + right: 8px; + top: 17px; + font-size: 12px; +} .h1, h1 { font-size: calc(1.3rem + 0.6vw); diff --git a/resources/views/Admin/Pages/manage_sub_admin/reset-password.blade.php b/resources/views/Admin/Pages/manage_sub_admin/reset-password.blade.php index 23acfa9..30fa675 100644 --- a/resources/views/Admin/Pages/manage_sub_admin/reset-password.blade.php +++ b/resources/views/Admin/Pages/manage_sub_admin/reset-password.blade.php @@ -9,82 +9,88 @@
-
- - @if(!$expirePage) -
- -
- - - @endsection - @section('scripts') - - @endsection + + $(document).ready(function() { + $.validator.addMethod("StrongPassword", function(value) { + return /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/.test( + value + ); + }, + "Password Must Contain
8 characters
At least 1 uppercase letter and symbol
Has a number" + ); + + $("#update_password").validate({ + ignore: [], + debug: false, + rules: { + email: { + required: true, + }, + password: { + required: true, + StrongPassword: true, + }, + confirm_password: { + required: true, + // equalTo: '#password', + }, + }, + messages: { + email: { + required: "Please enter a valid email", + }, + password: { + required: "This field is required", + }, + confirm_password: { + required: "This field is required", + // equalTo: "Password not matched", + }, + }, + submitHandler: function(form) { + var formData = new FormData(form); + // $('.update_btn').prop('disabled',true); + // $('.update_btn').html('Wait'); + $.ajax({ + url: "{{ route('admin.update-password') }}", + type: "POST", + data: formData, + processData: false, + contentType: false, + dataType: "json", + success: function(result) { + if (result.status == 200) { + $('#result').removeClass('d-none alert-warning'); + $('#result').addClass('alert-success'); + $('#message').html(result.message); + setTimeout(function() { + $('#result').addClass('d-none'); + window.location.href = + "{{ route('admin.login') }}"; + }, 5000); + } else { + $('#result').removeClass('d-none alert-success'); + $('#result').addClass('alert-warning'); + $('#message').html(result.message); + setTimeout(function() { + $('#result').addClass('d-none'); + }, 5000); + } + }, + }); + }, + }); + }); + + @endsection From b7f31a667ff6b0757176df188c59983df760ff9d Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Mon, 17 Jun 2024 12:54:10 +0530 Subject: [PATCH 3/7] fixed changes --- .../Admin/ManageLeadController.php | 1 + .../Admin/ManageTestimonialController.php | 2 + app/Http/Requests/StoreLeadRequest.php | 2 +- app/Http/Requests/StoreTestimonialRequest.php | 10 +- app/Models/Lead.php | 2 +- public/assets/css/FrontendCss/style.css | 8 + public/assets/css/style.css | 9 + public/assets/css/style1.css | 10 + .../add_testimonial.blade.php | 8 +- .../edit_testimonial.blade.php | 8 +- .../Pages/manage_leads/add_lead.blade.php | 45 ++--- .../manage_leads/completed_leads.blade.php | 2 +- .../Pages/manage_leads/edit-lead.blade.php | 28 +-- .../Pages/manage_leads/lost_leads.blade.php | 2 +- .../Pages/manage_leads/manage_leads.blade.php | 2 +- .../Pages/manage_leads/new_leads.blade.php | 2 +- .../Pages/manage_leads/old_leads.blade.php | 2 +- .../manage_leads/ongoing_leads.blade.php | 2 +- .../views/Admin/personal-dashboard.blade.php | 2 +- .../profile/market-list/buyer-form.blade.php | 2 +- .../market-list/edit-buyer-form.blade.php | 2 +- .../Frontend/Pages/testimonial.blade.php | 32 ++-- .../views/Frontend/Pages/why_freeU.blade.php | 175 +++++++++--------- 23 files changed, 200 insertions(+), 158 deletions(-) diff --git a/app/Http/Controllers/Admin/ManageLeadController.php b/app/Http/Controllers/Admin/ManageLeadController.php index b06e89b..09548f1 100644 --- a/app/Http/Controllers/Admin/ManageLeadController.php +++ b/app/Http/Controllers/Admin/ManageLeadController.php @@ -135,6 +135,7 @@ class ManageLeadController extends Controller public function editLead($id) { + // dd($this->lead->edit($id)); return view('Admin.Pages.manage_leads.edit-lead', [ 'lead' => $this->lead->edit($id), 'users' => User::admins()->get(), diff --git a/app/Http/Controllers/Admin/ManageTestimonialController.php b/app/Http/Controllers/Admin/ManageTestimonialController.php index 3a35f69..d9758df 100644 --- a/app/Http/Controllers/Admin/ManageTestimonialController.php +++ b/app/Http/Controllers/Admin/ManageTestimonialController.php @@ -40,6 +40,7 @@ class ManageTestimonialController extends Controller public function store_testimonial(StoreTestimonialRequest $request) { + // dd($request->all()); $testimonialAdded = $this->testimonial->store($request); return $testimonialAdded ? $this->response('Testimonial Added Successfully!', 200) : @@ -48,6 +49,7 @@ class ManageTestimonialController extends Controller public function edit_testimonial($id) { + // dd($this->testimonial->show($id)); return view('Admin.Pages.manage_cms.manage_testimonials.edit_testimonial', [ 'testimonial_data' => $this->testimonial->show($id), ]); diff --git a/app/Http/Requests/StoreLeadRequest.php b/app/Http/Requests/StoreLeadRequest.php index d23e922..21444f0 100644 --- a/app/Http/Requests/StoreLeadRequest.php +++ b/app/Http/Requests/StoreLeadRequest.php @@ -37,7 +37,7 @@ class StoreLeadRequest extends FormRequest public function rules() { return [ - 'users_id' => 'required', + // 'users_id' => 'required', 'lead_owner' => 'required', 'products_id' => 'required', 'lead_company' => 'nullable|string|max:255', diff --git a/app/Http/Requests/StoreTestimonialRequest.php b/app/Http/Requests/StoreTestimonialRequest.php index dac119d..c736621 100644 --- a/app/Http/Requests/StoreTestimonialRequest.php +++ b/app/Http/Requests/StoreTestimonialRequest.php @@ -47,10 +47,10 @@ class StoreTestimonialRequest extends FormRequest // $this->client_images_one->move(public_path('/uploads/testimonials/images'), $image); // } // } - // return array_merge(parent::validated(), [ - // 'rating' => $this->rating, - // 'client_image' => $image - // ]); - return parent::validated(); + return array_merge(parent::validated(), [ + 'rating' => $this->rating, + // 'client_image' => $image + ]); + // return parent::validated(); } } diff --git a/app/Models/Lead.php b/app/Models/Lead.php index 7d01c91..0ffbdb6 100644 --- a/app/Models/Lead.php +++ b/app/Models/Lead.php @@ -11,7 +11,7 @@ class Lead extends Model { use HasFactory, SoftDeletes; - protected $fillable = ['users_id', 'lead_owner', 'products_id', 'lead_company', 'first_name', 'last_name', 'title', 'advisor', 'phone', 'email', 'mobile', 'website', 'total_employees', 'annual_revenue', 'industry', 'lead_source', 'lead_status', 'street', 'city', 'state', 'zip_code', 'country', 'description', 'created_by', 'modified_by']; + protected $fillable = ['users_id', 'lead_owner', 'investor_name', 'products_id', 'lead_company', 'first_name', 'last_name', 'title', 'advisor', 'phone', 'email', 'mobile', 'website', 'total_employees', 'annual_revenue', 'industry', 'lead_source', 'lead_status', 'street', 'city', 'state', 'zip_code', 'country', 'description', 'created_by', 'modified_by']; // for getting lead source name public function leadSource() diff --git a/public/assets/css/FrontendCss/style.css b/public/assets/css/FrontendCss/style.css index cfe2a9c..7e57d24 100644 --- a/public/assets/css/FrontendCss/style.css +++ b/public/assets/css/FrontendCss/style.css @@ -6516,4 +6516,12 @@ a.read_notification { } p.regist, p.regist a { color: #fff; +} +.rating i.fa.fa-star { + margin-top: 20px; + color: #ffbd59; +} +.about-inner-contain.aboutss:after { + content: ''; + position: relative; } \ No newline at end of file diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 6572d30..3ca558b 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -1338,7 +1338,16 @@ td a.action_icon { display: flex; justify-content: center; } +.reset { + position: relative; +} +.reset span.toggle-password { + position: absolute; + right: 8px; + top: 17px; + font-size: 12px; +} tr th:last-child { text-align: center !important; } diff --git a/public/assets/css/style1.css b/public/assets/css/style1.css index ac1bfd7..838e554 100644 --- a/public/assets/css/style1.css +++ b/public/assets/css/style1.css @@ -9,6 +9,16 @@ body { font-family: "Helvetica" !important; } +.reset { + position: relative; +} + +.reset span.toggle-password { + position: absolute; + right: 8px; + top: 17px; + font-size: 12px; +} .userdet_Rw { display: flex; diff --git a/resources/views/Admin/Pages/manage_cms/manage_testimonials/add_testimonial.blade.php b/resources/views/Admin/Pages/manage_cms/manage_testimonials/add_testimonial.blade.php index 7e35df9..5d53556 100644 --- a/resources/views/Admin/Pages/manage_cms/manage_testimonials/add_testimonial.blade.php +++ b/resources/views/Admin/Pages/manage_cms/manage_testimonials/add_testimonial.blade.php @@ -37,7 +37,7 @@
- {{--
+
@@ -61,7 +61,7 @@
-
+ {{--
-
-
--}} +
--}} +
diff --git a/resources/views/Admin/Pages/manage_cms/manage_testimonials/edit_testimonial.blade.php b/resources/views/Admin/Pages/manage_cms/manage_testimonials/edit_testimonial.blade.php index 60bf89a..ca169b3 100644 --- a/resources/views/Admin/Pages/manage_cms/manage_testimonials/edit_testimonial.blade.php +++ b/resources/views/Admin/Pages/manage_cms/manage_testimonials/edit_testimonial.blade.php @@ -39,7 +39,7 @@
- {{--
+
-
+ {{--
-
-
--}} +
--}} +
diff --git a/resources/views/Admin/Pages/manage_leads/add_lead.blade.php b/resources/views/Admin/Pages/manage_leads/add_lead.blade.php index 252327c..9671449 100644 --- a/resources/views/Admin/Pages/manage_leads/add_lead.blade.php +++ b/resources/views/Admin/Pages/manage_leads/add_lead.blade.php @@ -36,12 +36,13 @@
- + {{-- + --}}
{{--
@@ -68,7 +69,7 @@
- +
@@ -80,7 +81,7 @@
- +
@@ -95,7 +96,7 @@
- +
{{--
@@ -233,23 +234,23 @@ @endsection @section('scripts')