Compare commits

..

No commits in common. '6c45d9a8e7b89a97369bc8efb3286c59b7ab45d0' and '925437ac3c68726a667cb63773f10b942696dcdf' have entirely different histories.

@ -33,14 +33,6 @@ class UserController extends XController
public function save($user, $request)
{
if ($user->role == 'DEVELOPER' && !auth()->user()->hasRole('developer')) {
abort(403);
}
if (!auth()->user()->hasRole('developer') && $request->role == 'DEVELOPER') {
abort(403);
}
$user->name = $request->input('name');
$user->email = $request->input('email');
if (trim($request->input('password')) != '') {

@ -234,22 +234,22 @@ class ClientController extends Controller
if (mb_strlen($q) < 3) {
return abort(403, __('Search word is too short'));
}
$q = '%' . $q . '%';
$posts = Post::where('status', 1)->where(function ($query) use ($q) {
$q = '%'.$q.'%';
$posts = Post::where('status', 1)->where(function($query) use ($q) {
$query->where('title', 'LIKE', $q)
->orWhere('subtitle', 'LIKE', $q)
->orWhere('body', 'LIKE', $q);
})->paginate(100);
$products = Product::where('status', 1)->where(function ($query) use ($q) {
$products = Product::where('status', 1)->where(function($query) use ($q) {
$query->where('name', 'LIKE', $q)
->orWhere('excerpt', 'LIKE', $q)
->orWhere('description', 'LIKE', $q);
})->paginate(100);
$clips = Clip::where('status', 1)->where(function ($query) use ($q) {
$clips = Clip::where('status', 1)->where(function($query) use ($q) {
$query->where('title', 'LIKE', $q)
->orWhere('body', 'LIKE', $q);
})->paginate(100);
$title = __('Search for') . ': ' . $request->input('q');
$title = __('Search for') . ': ' . $request->input('q');
$subtitle = '';
return view('client.tag', compact('posts', 'products', 'clips', 'title', 'subtitle'));
}
@ -469,7 +469,7 @@ class ClientController extends Controller
{
$area = 'login';
$title = __("sign in");
$subtitle = __('Sign in as customer');
$subtitle = 'Sign in as customer';
return view('client.default-list', compact('area', 'title', 'subtitle'));
}
@ -624,14 +624,13 @@ class ClientController extends Controller
}
public function pay($hash)
{
public function pay($hash){
$invoice = Invoice::where('hash', $hash)->first();
// dd($invoice->created_at->timestamp , (time() - 3600));
if (!in_array($invoice->status, ['PENDING', 'CANCELED', 'FAILED']) || $invoice->created_at->timestamp < (time() - 3600)) {
return redirect()->back()->withErrors(__('This payment method is not available.'));
if (!in_array($invoice->status, ['PENDING', 'CANCELED', 'FAILED'] ) || $invoice->created_at->timestamp < (time() - 3600) ){
return redirect()->back()->withErrors(__('This payment method is not available.'));
}
$activeGateway = config('xshop.payment.active_gateway');
/** @var Payment $gateway */

@ -7,8 +7,6 @@ use App\Models\Customer;
use App\Models\Invoice;
use App\Models\Product;
use App\Models\Ticket;
use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QROptions;
use Illuminate\Http\Request;
use Illuminate\Validation\Rules\In;
@ -20,18 +18,18 @@ class CustomerController extends Controller
$address->address = $request->input('address');
$address->lat = $request->input('lat');
$address->lng = $request->input('lng');
$address->state_id = $request->input('state_id') ?? null;
$address->city_id = $request->input('city_id') ?? null;
$address->state_id = $request->input('state_id')??null;
$address->city_id = $request->input('city_id')??null;
$address->zip = $request->input('zip');
$address->save();
return $address;
}
//
public function __construct()
{
$this->middleware(function ($request, $next) {
if (!auth('customer')->check()) {
@ -78,22 +76,7 @@ class CustomerController extends Controller
public function invoice(Invoice $invoice)
{
if (!auth('customer')->check() || $invoice->customer_id != auth('customer')->id()) {
return redirect()->route('client.sign-in')->withErrors([__('You need to login to access this page')]);
}
$area = 'invoice';
$title = __("Invoice");
$subtitle = __("Invoice ID:") . ' ' . $invoice->hash;
$options = new QROptions([
'version' => 5,
'outputType' => QRCode::OUTPUT_MARKUP_SVG,
'eccLevel' => QRCode::ECC_L,
// 'imageTransparent' => true,
]);
$qr = new QRCode($options);
return view('client.invoice', compact('area', 'title', 'subtitle','invoice','qr'));
return $invoice;
}
@ -125,13 +108,12 @@ class CustomerController extends Controller
}
public function addresses()
{
public function addresses(){
return auth('customer')->user()->addresses;
}
public function addressUpdate(Request $request, $item)
public function addressUpdate(Request $request, $item)
{
$item = Address::where('id', $item)->firstOrFail();
@ -160,10 +142,10 @@ class CustomerController extends Controller
if ($item->customer_id != auth('customer')->id()) {
return abort(403);
}
$add = $item->address;
$add = $item->address ;
$item->delete();
return ['OK' => true, "message" => __(":ADDRESS removed", ['ADDRESS' => $add])];
return ['OK' => true, "message" => __(":ADDRESS removed",['ADDRESS' => $add])];
}
public function addressStore(Request $request)
@ -182,15 +164,14 @@ class CustomerController extends Controller
$address = new Address();
$address->customer_id = auth('customer')->user()->id;
$address = $this->addressSave($address, $request);
return ['OK' => true, 'message' => __("Address added successfully"), 'list' => auth('customer')->user()->addresses];
return ['OK' => true,'message' => __("Address added successfully"), 'list'=> auth('customer')->user()->addresses];
}
public function submitTicket(Request $request)
{
public function submitTicket(Request $request){
$request->validate([
'title' => ['required', 'string', 'max:255'],
'body' => ['required', 'string'],
'title' => ['required', 'string', 'max:255'],
'body' => ['required', 'string'],
]);
$ticket = new Ticket();
@ -201,14 +182,12 @@ class CustomerController extends Controller
return redirect()->route('client.profile')->with('message', __('Ticket added successfully'));
}
public function showTicket(Ticket $ticket)
{
return view('client.ticket', compact('ticket'));
public function showTicket(Ticket $ticket){
return view('client.ticket',compact('ticket'));
}
public function ticketAnswer(Ticket $ticket, Request $request)
{
public function ticketAnswer(Ticket $ticket, Request $request){
$request->validate([
'body' => ['required', 'string'],
@ -222,7 +201,7 @@ class CustomerController extends Controller
$nticket->body = trim($request->body);
$nticket->customer_id = auth('customer')->user()->id;
$nticket->save();
return redirect(route('client.profile') . '#tickets')->with('message', __('Ticket answered successfully'));
return redirect(route('client.profile').'#tickets')->with('message', __('Ticket answered successfully'));
}

@ -8,12 +8,4 @@ use Illuminate\Database\Eloquent\Model;
class Address extends Model
{
use HasFactory;
public function state(){
return $this->belongsTo(State::class);
}
public function city(){
return $this->belongsTo(City::class);
}
}

@ -24,7 +24,7 @@ class Invoice extends Model
public static $invoiceStatus = ['PENDING', 'CANCELED', 'FAILED', 'PAID', 'PROCESSING', 'COMPLETED'];
public function getRouteKeyName()
public function getRouteKey()
{
return 'hash';
}
@ -147,9 +147,4 @@ class Invoice extends Model
return $payment;
}
public function address()
{
return $this->belongsTo(Address::class);
}
}

2
composer.lock generated

@ -10516,5 +10516,5 @@
"php": "^8.2"
},
"platform-dev": [],
"plugin-api-version": "2.6.0"
"plugin-api-version": "2.3.0"
}

@ -16,7 +16,7 @@ return [
*/
'name' => env('APP_NAME', 'Laravel'),
'version' => env('APP_VERSION', '2.0.0-beta-2'),
'version' => env('APP_VERSION', '2.0.0-beta'),
/*
|--------------------------------------------------------------------------

@ -34,7 +34,7 @@ class AreaSeeder extends Seeder
'icon' => 'ri-ai-generate',
],
[
'name' => 'defaultHeader',
'name' => 'default_header',
'valid_segments' => json_encode(
["top", "header", "other", "ads", "menu"]
),
@ -43,7 +43,7 @@ class AreaSeeder extends Seeder
'icon' => 'ri-window-line',
],
[
'name' => 'defaultFooter',
'name' => 'default_footer',
'valid_segments' => json_encode(
["footer", "other", "ads", "groups"]
),

@ -6,7 +6,6 @@ use App\Models\Customer;
use App\Models\State;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
class CustomerSeeder extends Seeder
{
@ -16,8 +15,6 @@ class CustomerSeeder extends Seeder
public function run(): void
{
//
$faker = Faker::create(config('app.faker_locale'));
Customer::factory(35)->create();
foreach (Customer::all() as $customer) {
$s = State::inRandomOrder()->first();
@ -28,7 +25,7 @@ class CustomerSeeder extends Seeder
'zip' => rand(12345, 54321),
'lat' => $c->lat,
'lng' => $c->lng,
'address' =>$faker->address,
'address' => 'some address',
]);
}
}

@ -87,7 +87,7 @@ class PartSeeder extends Seeder
$part = new Part();
$part->segment = 'menu';
$part->part = 'AplMenu';
$part->area_id = Area::where('name', 'defaultHeader')->first()->id;
$part->area_id = Area::where('name', 'default_header')->first()->id;
$part->sort = 0;
$part->save();
@ -95,14 +95,14 @@ class PartSeeder extends Seeder
$part = new Part();
$part->segment = 'header';
$part->part = 'SimpleHeader';
$part->area_id = Area::where('name', 'defaultHeader')->first()->id;
$part->area_id = Area::where('name', 'default_header')->first()->id;
$part->sort = 0;
$part->save();
$part = new Part();
$part->segment = 'footer';
$part->part = 'WaveFooter';
$part->area_id = Area::where('name', 'defaultFooter')->first()->id;
$part->area_id = Area::where('name', 'default_footer')->first()->id;
$part->sort = 2;
$part->save();
@ -179,26 +179,6 @@ class PartSeeder extends Seeder
$part->area_id = Area::where('name', 'clips-list')->first()->id;
$part->sort = 1;
$part->save();
// -------------------------------------------------------------
$part = new Part();
$part->segment = 'posts_page';
$part->part = 'GridPostListSidebar';
$part->area_id = Area::where('name', 'group')->first()->id;
$part->sort = 1;
$part->save();
// -------------------------------------------------------------
$part = new Part();
$part->segment = 'invoice';
$part->part = 'LianaInvoice';
$part->area_id = Area::where('name', 'invoice')->first()->id;
$part->sort = 1;
$part->save();
// -------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 0 B

@ -29,8 +29,6 @@ import "../views/segments/product/ProductKaren/ProductKaren.js";
import "../views/segments/posts_page/GridPostListSidebar/GridPostListSidebar.js";
import "../views/segments/post/PostSidebar/PostSidebar.js";
import "../views/segments/clips_page/ClipListGrid/ClipListGrid.js";
import "../views/segments/posts_page/GridPostListSidebar/GridPostListSidebar.js";
import "../views/segments/invoice/LianaInvoice/LianaInvoice.js";
import "../views/segments/clip/DorClip/DorClip.js";
import "../views/segments/galleries_page/GalleriesList/GalleriesList.js";
import "../views/segments/gallery/GallaryGrid/GallaryGrid.js";
@ -40,3 +38,4 @@ import "../views/segments/customer/AvisaCustomer/AvisaCustomer.js";
import "../views/segments/attachments_page/DenaAttachList/DenaAttachList.js";
import "../views/segments/attachment/AttachmentWithPreview/AttachmentWithPreview.js";
import "../views/segments/contact/MeloContact/MeloContact.js";
import "../views/segments/index/InlineMap/InlineMap.js";

@ -36,7 +36,6 @@
"Add new discount": "افزودن یک تخفیف",
"Add new gallery": "افزودن یک گالری",
"Add new group": "افزودن یک سرفصل",
"Add new invoice": "",
"Add new language": "افزودن یک زبان جدید",
"Add new menu": "افزودن فهرست جدید",
"Add new post": "افزودن یک نوشته",
@ -58,7 +57,7 @@
"Added items view depends on theme part": "موارد اضافه شده بسته به نوع نمای انتخاب شده متفاوت خواهد بود",
"Additional data": "اطلاعات تکمیلی",
"Address": "نشانی",
"Address added successfully": "نشانی اضافه شد",
"Address added successfully": "",
"Address added to :CUSTOMER": "نشانی به :CUSTOMER اضافه شد",
"Address editor": "ویرایشگر نشانی",
"Addresses": "نشانی‌ها",
@ -82,13 +81,12 @@
"As you wished sort saved": "همانطور که شما مایل بودید مرتب شدند",
"As you wished updated successfully": "همانطور که شما مایل بودید به روز شد",
"Attaching": "پیوست کردن",
"Attachment": "پیوست",
"Attachments": "پیوست‌ها",
"Attachments list": "فهرست پیوست ها",
"Auth code": "کد احراز هویت",
"Auth code is invalid": "کد احراز هویت اشتباه اسات",
"Auth code send successfully": "کد احراز هویت ارسال شد",
"Back to profile": "بازگشت به نمایه",
"Back to profile": "",
"Background image": "تصویر زمینه",
"Base price": "مبلغ پایه",
"Basic data": "اطلاعات پایه",
@ -97,7 +95,6 @@
"Before proceeding, please check your email for a verification link.": "قبل از ادامه فرآیند لطفا رایانه خودتون رو بررسی کنید که لینک ارسال شده باشد",
"Bulk actions:": "کار دسته‌جمعی",
"Call us!": "با ما تماس بگیرید!",
"Card": "سبدخرید",
"Card cleared": "سبدخرید خالی شد",
"Catalog": "کاتالوگ",
"Categories": "دسته‌ها",
@ -114,7 +111,6 @@
"Cities list": "فهرست شهرها",
"City": "شهر",
"Click here to upload or drag and drop here": "برای بارگزاری اینجا کلیک کنید یا موارد را کشیده و اینجا رها کنید",
"Clip": "کلیپ‌ها",
"Clips list": "فهرست کلیپ‌ها",
"Close": "بستن",
"Code": "کد",
@ -125,7 +121,6 @@
"Comment replay": "پاسخ دیدگاه",
"Commentator": "ارسال کننده دیدگاه",
"Comments": "دیدگاه‌ها",
"Compare": "مقایسه",
"Compare products": "مقایسه محصولات",
"Confirm Password": "تایید گذرواژه",
"Contact us": "تماس با ما",
@ -139,7 +134,6 @@
"Credit history": "تاریخچه اعتبار",
"Credits": "اعتبارات",
"Customer": "مشتری",
"Customer mobile": "",
"Customers": "مشتری‌ها",
"Customers list": "فهرست مشتری‌ها",
"Dashboard": "پیشخوان",
@ -147,8 +141,6 @@
"Datetime": "تاریخ و زمان",
"Deattach": "عدم پیوست",
"Default": "پیش‌فرض",
"DefaultFooter": "فوتر پیش‌فرض",
"DefaultHeader": "هدر پیش‌فرض",
"Description": "توضیحات",
"Description Table": "جدول توضیحات",
"Description Text": "نوشته توضیحات",
@ -179,7 +171,6 @@
"Edit discount": "ویرایش تخفیف",
"Edit gallery": "ویرایش گالری",
"Edit group": "ویرایش سرفصل",
"Edit invoice": "",
"Edit language": "ویرایش زبان",
"Edit menu": "ویرایش فهرست",
"Edit post": "ویرایش نوشته",
@ -200,7 +191,6 @@
"Expire date": "تاریخ انقضا",
"Expire date": "تاریخ انقضا",
"Extra description": "توضیحات اضافه",
"Failed Invoices": "",
"False": "خیر",
"Favorites": "علاقه‌مندی‌ها",
"Feature image": "تصویر شاخص",
@ -211,18 +201,14 @@
"Filter": "صافی",
"Find more": "موارد بیشتر",
"Flag": "پرچم",
"Floats": "شناورها",
"Follow us": "",
"Forgot Your Password?": "آیا گذرواژه خود را فراموش کردید",
"From - To": "از - تا",
"GFX": "طراحی",
"GFX of website updated": "گرافیک سایت به روز شد",
"Gfxes": "طراحی‌ها",
"Galleries": "گالری‌ها",
"Galleries list": "فهرست گالری‌ها",
"Gallery": "گالری",
"Gfxes": "طراحی‌ها",
"Graphic": "گرافیک",
"Group": "سرفصل",
"Group Parent": "والد سرفصل",
"Group name": "نام سرفصل",
"Group slug": "نامک سرفصل",
@ -230,14 +216,10 @@
"Groups list": "فهرست سرفصل‌ها",
"Guest": "میهمان",
"Home": "خانه",
"ID": "",
"Icon": "نماد",
"If not choose expire expire time will be unlimited": "اگر زمان انقصا را انتخاب نکنید، هرگز منقضی نخواهد شد",
"If you cancel this, You must increase credit yourself.": "",
"If you change transport method you must think about think about the price diffrance": "",
"If you did not receive the email": "اگر ایمیلی دریافت نکردید",
"If you forget your password call us": "اگر گذرواژه خود را فراموش کردید با ما تماس بگیرید",
"If you removed order from invoice, system adding amount to customer's credit automatically": "",
"If you want to change the password, choose both the same. Otherwise, leave the password field blank.": "اگر می‌خواهید گذرواژه را عوض کنید هر دو را یکسان پر کنید، در غیر این صورت آن را خالی رها کنید",
"If you want to only attach to other staff members and do not want to appear in the website attachment list, uncheck `fillable`": "اگر می‌خواهید این پوست در فهرست پیوست‌های وبسایت نمایش داده نشود مورد مورد `قابل نمایش` را غیرفعال کنید",
"Image": "تصویر",
@ -245,19 +227,14 @@
"Image uploaded successfully": "تصویر افزوده شد",
"Images": "تصاویر",
"Increase \/ decrease by Admin": "افزودن \/ کاهش توسط مدیر سایت",
"Increase by Admin removed:": "",
"Index": "صفحه نخست",
"Index image": "تصویر شاخص",
"Information": "اطلاعات",
"Interaction": "تعامل",
"Invalid area segment": "محیط نامطلوب است",
"Invalid json file!": "فایل جی‌سان معتبر نیست",
"Invalid morph": "چند ریخیتی نا معتبر",
"Invoice": "صورت حساب",
"Invoice ID:": "",
"Invoice payed.": "صورت‌حساب پرداخت شد",
"Invoices": "صورت‌حساب‌ها",
"Invoices list": "",
"Is default": "آی پیش‌فرض است",
"Is effective price?": "آیا در قیمت تاثیر دارد؟",
"Is fillable": "قابل نمایش",
@ -291,7 +268,7 @@
"Message": "پیام",
"Message replay": "پاسخ پیام",
"Message...": "پیام...",
"Mobile": "موبایل",
"Mobile": "شماره همراه",
"Model": "ماژول",
"Name": "نام",
"Name and lastname": "نام و نام‌خانوادگی",
@ -299,7 +276,6 @@
"Next": "بعدی",
"No parent": "بدون والد",
"Not required": "غیر ضرروری",
"Order removed successfully": "",
"Orders": "سفارشاات",
"Orders count": "تعداد سفارش",
"Password": "گذرواژه",
@ -319,11 +295,9 @@
"Post your comment": "دیدگاه خود را ارسال کنید",
"Posts": "نوشته‌ها",
"Posts list": "فهرست نوشته‌ها",
"Preloader": "نماد انتظار",
"Preview": "پیش‌نمایش",
"Previous": "قبلی",
"Price": "مبلغ",
"Print": "",
"Product": "محصول",
"Product added to compare": "محصول به فهرست مقایسه افزوده شد",
"Product added to favorites": "محصول به علاقه‌مندی شما افزوده شد",
@ -356,7 +330,6 @@
"Related products": "محصولات مشابه",
"Remember Me": "مرا به خاطر بسپار",
"Remove": "حذف",
"Removed": "مورد حذف شده",
"Reply": "پاسخ",
"Reply comment": "پاسخ دیدگاه",
"Reply message...": "پاسخ پیام...",
@ -388,11 +361,9 @@
"Setting": "تنظیمات",
"Setting added to website": "تنظیم به سایت اضافه شد",
"Setting of website updated": "تنظیمات به روز شدند",
"Settings": "تنظیمات",
"Shopping card": "سبد خرید",
"Show": "نمایش",
"Show list": "نمایش فهرست",
"Sign in as customer": "",
"Sign-in": "ورود",
"Sign-out": "خروج",
"Signed in successfully": "با موفقیت وارد شدید",
@ -413,7 +384,6 @@
"Subject": "عنوان",
"Submit new ticket": "ارسال یک تیکت جدید",
"Subtitle": "زیرعنوان",
"Successfully Invoices": "",
"Summary": "خلاصه",
"System notification": "پیام سیستم",
"Tag": "برچسب",
@ -426,9 +396,8 @@
"There is nothing added to card!": "چیزی در سبد خرید وجود ندارد",
"There is nothing to show!": "اینجا چیزی برای نمایش وجود ندارد",
"There is noting file to show!": "هیچ پرونده ای برای نمایش وجود ندارد",
"This payment method is not available.": "",
"Ticket added successfully": "تیکت با موفقیت اضافه شد",
"Ticket answered successfully": "تیکت پاسخ داده شد",
"Ticket added successfully": "",
"Ticket answered successfully": "",
"Tickets": "تیکت‌های پشتیبانی",
"Tickets list": "فهرست تیکت‌های پشتیبانی",
"Tips": "نکات",
@ -439,7 +408,6 @@
"Toggle selection": "برعکس کردن انتخاب",
"Total": "همه",
"Total price": "مبلغ کل",
"Tracking code": "",
"Translate": "ترجمه",
"Translate model": "ترجمه ماژول",
"Translate updated": "ترجمه افزوده شد",
@ -483,13 +451,12 @@
"You can create \/ edit clip as draft, publish it when you want": "شما میتوانید کلیپ را ایجاد و ویرایش کنید، هر زمان که خواستید آن را منتشر کنید",
"You can leave the slug empty; it will be generated automatically.": "شما می‌توانید نامک را خالی بگذارید به صورت خودکار ساخته شود",
"You don't have access this action": "شما دسترسی لازم برای این بخش را ندارید",
"You don't have any comments, We are so pleased to hear your look-out": "شما هیچ دیدگاهی تاکنون ارسال نکرده‌اید، از شما تقاضا داریم تجربیات و نگرش خود را برای ما ارسال کنید، چون بسیار ارزشمند است",
"You don't have any comments, We are so pleased to hear your look-out": "",
"You have some products in your shopping card.": "در سبد خرید شما محصول وجود دارد",
"You must add a pinned post to :GROUP": "برای این قسمت در :GROUP یک نوشته سنجاق شده اضافه کنید",
"You need at least one address to order, Please add address": "شما برای ادامه فرآیند خرید به حداقل یک نشانی نیاز دارید",
"You need complete your information": "شما می‌بایستی اطلاعات خود را تکمیل کنید",
"You need to login first": "شما برای ادامه می‌بایستی وارد شوید",
"You need to login to access this page": "",
"You need to sign in\/up to continue": "شما برای ادامه نیاز است وارد شوید یا ثبت‌نام کنید",
"You try attempts, Try it a few minutes": "تلاش شما از حداکثر درخواستی بیشتر است",
"You try more than :COUNT attempts, Try it later": "شما بیش از :COUNT تلاش کردید لطفاً بعداً تلاش کنید",
@ -506,23 +473,20 @@
"address updated": "نشانی به روز شد",
"an hour ago": "یک ساعت پیش",
"approved": "تایید شد",
"area": "محیط",
"area :NAME of website updated": "محیط :NAME وبسایت به روز شد",
"article": "مقاله",
"click here to request another": "برای ایجاد درخواست دیگر اینجا کلیک کنید",
"customer_id": "مشتری",
"email": "رایانامه",
"emoji": "ایموجی",
"email": "رایانامه",
"error in payment.": "خطا در پرداخت",
"error in payment. contact admin.": "خطا در پرداخت با مدیر وبسایت تماس بگیرید",
"image": "تصویر",
"invoice": "صورت حساب",
"jpg": "",
"minute": "دقیقه",
"minute(s)": "دقیقه",
"mobile": "موبایل",
"name": "نام",
"news": "خبر",
"mobile": "موبایل",
"not searchable": "غیرقابل جستجو",
"one second ago": "یک ثانیه پیش",
"password repeat": "تکرار گذرواژه",
@ -530,10 +494,11 @@
"pending": "معلق",
"rejected": "رد شده",
"sign in": "ورود",
"webp": "",
"xShop": "",
"status": "وضعیت",
"title": "عنوان",
"customer_id": "مشتری",
"user_id": "کاربر",
"webp": "",
"xShop": "",
"yesterday": "دیروز"
}

@ -162,11 +162,3 @@ body {
height: 64px;
object-fit: cover;
}
@media print {
.no-print{
display: none;
}
}

@ -40,8 +40,6 @@ $xshop-shadow:2px 2px 4px #777777;
@import "../views/segments/posts_page/GridPostListSidebar/GridPostListSidebar";
@import "../views/segments/post/PostSidebar/PostSidebar";
@import "../views/segments/clips_page/ClipListGrid/ClipListGrid";
@import "../views/segments/posts_page/GridPostListSidebar/GridPostListSidebar";
@import "../views/segments/invoice/LianaInvoice/LianaInvoice";
@import "../views/segments/clip/DorClip/DorClip";
@import "../views/segments/galleries_page/GalleriesList/GalleriesList";
@import "../views/segments/gallery/GallaryGrid/GallaryGrid";
@ -51,3 +49,4 @@ $xshop-shadow:2px 2px 4px #777777;
@import "../views/segments/attachments_page/DenaAttachList/DenaAttachList";
@import "../views/segments/attachment/AttachmentWithPreview/AttachmentWithPreview";
@import "../views/segments/contact/MeloContact/MeloContact";
@import "../views/segments/index/InlineMap/InlineMap";

@ -110,11 +110,11 @@
<tr>
<th>
<div
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-custom-class="custom-tooltip"
data-bs-title="{{__("Check all")}}"
class="form-check form-switch mt-1 mx-2">
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-custom-class="custom-tooltip"
data-bs-title="{{__("Check all")}}"
class="form-check form-switch mt-1 mx-2">
<input class="form-check-input chkall"
type="checkbox" role="switch">
</div>
@ -178,56 +178,35 @@
{{ $item->parent?->{$cols[0]}??'-' }}
@break
@case('status')
<div class="model-status status-{{$item->status}} float-start"
data-bs-toggle="tooltip"
<div class="model-status status-{{$item->status}} float-start" data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-custom-class="custom-tooltip"
data-bs-title="{{$item->status}}"></div>
@break
@case('user_id')
@if($item->user != null)
<a href="{{route('admin.user.edit',$item->user?->email)}}">
{{ $item->user?->name??'-' }}
</a>
@else
{{__("Removed")}}
@endif
<a href="{{route('admin.user.edit',$item->user?->email)}}">
{{ $item->user?->name??'-' }}
</a>
@break
@case('customer_id')
@if($item->customer != null)
<a href="{{route('admin.customer.edit',$item->customer?->id)}}">
{{ $item->customer?->name??'-' }}
</a>
@else
{{__("Removed")}}
@endif
<a href="{{route('admin.customer.edit',$item->customer?->id)}}">
{{ $item->customer?->name??'-' }}
</a>
@break
@case('category_id')
@if($item->category != null)
<a href="{{route('admin.category.edit',$item->category?->slug)}}">
{{ $item->category?->name??'-' }}
</a>
@else
{{__("Removed")}}
@endif
<a href="{{route('admin.category.edit',$item->category?->slug)}}">
{{ $item->category?->name??'-' }}
</a>
@break
@case('state_id')
@if($item->state != null)
<a href="{{route('admin.state.edit',$item->state?->id)}}">
{{ $item->state?->name??'-' }}
</a>
@else
{{__("Removed")}}
@endif
<a href="{{route('admin.category.edit',$item->state?->id)}}">
{{ $item->state?->name??'-' }}
</a>
@break
@case('product_id')
@if($item->product != null)
<a href="{{route('admin.product.edit',$item->product?->slug)}}">
{{ $item->product?->name??'-' }}
</a>
@else
{{__("Removed")}}
@endif
<a href="{{route('admin.product.edit',$item->product?->slug)}}">
{{ $item->product?->name??'-' }}
</a>
@break
@case('expire')
@case('created_at')
@ -281,16 +260,15 @@
</a>
</li>
@endforeach
@if(config('app.xlang.active') && isset($item->translatable))
@if(config('app.xlang.active') && isset($item->translatable))
<li>
<a class="dropdown-item"
href="{{route('admin.lang.model',[$item->id, get_class($item)])}}">
<a class="dropdown-item" href="{{route('admin.lang.model',[$item->id, get_class($item)])}}">
<i class="ri-translate"></i>
&nbsp;
{{__("Translate")}}
</a>
</li>
@endif
@endif
</ul>
</div>
@endif
@ -355,12 +333,12 @@
<div class="row">
<div class="col-md-3 text-start">
<div
id="toggle-select"
class="btn btn-outline-light mx-2"
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-custom-class="custom-tooltip"
data-bs-title="{{__("Toggle selection")}}">
id="toggle-select"
class="btn btn-outline-light mx-2"
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-custom-class="custom-tooltip"
data-bs-title="{{__("Toggle selection")}}">
<i class="ri-toggle-line"></i>
</div>
</div>

@ -11,7 +11,7 @@ if ($category->bg != null){
@section('content')
<main>
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultHeader') as $part)
@foreach(getParts('default_header') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@ -21,7 +21,7 @@ if ($category->bg != null){
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultFooter') as $part)
@foreach(getParts('default_footer') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach

@ -6,7 +6,7 @@
@section('content')
<main>
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultHeader') as $part)
@foreach(getParts('default_header') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@ -16,7 +16,7 @@
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultFooter') as $part)
@foreach(getParts('default_footer') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach

@ -6,7 +6,7 @@
@section('content')
<main>
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultHeader') as $part)
@foreach(getParts('default_header') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@ -16,7 +16,7 @@
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultFooter') as $part)
@foreach(getParts('default_footer') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach

@ -11,7 +11,7 @@ if ($group->bg != null){
@section('content')
<main>
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultHeader') as $part)
@foreach(getParts('default_header') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@ -21,7 +21,7 @@ if ($group->bg != null){
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultFooter') as $part)
@foreach(getParts('default_footer') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach

@ -1,29 +0,0 @@
@extends('website.inc.website-layout')
@section('title')
{{$title}} - {{config('app.name')}}
@endsection
@section('content')
<main>
<div class="no-print">
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultHeader') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@endif
</div>
@foreach(getParts($area) as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
<div class="no-print">
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultFooter') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@endif
</div>
</main>
@endsection

@ -6,7 +6,7 @@
@endsection
@section('content')
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultHeader') as $part)
@foreach(getParts('default_header') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@ -16,7 +16,7 @@
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultFooter') as $part)
@foreach(getParts('default_footer') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach

@ -4,7 +4,7 @@
{{$title}} - {{config('app.name')}}
@endsection
@section('content')
@foreach(getParts('defaultHeader') as $part)
@foreach(getParts('default_header') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@ -94,7 +94,7 @@
</div>
</div>
</div>
@foreach(getParts('defaultFooter') as $part)
@foreach(getParts('default_footer') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach

@ -6,7 +6,7 @@
@section('content')
<main>
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultHeader') as $part)
@foreach(getParts('default_header') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach
@ -16,7 +16,7 @@
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(\App\Models\Area::where('name',$area)->first()->use_default)
@foreach(getParts('defaultFooter') as $part)
@foreach(getParts('default_footer') as $part)
@php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']])
@endforeach

@ -175,7 +175,7 @@
</li>
@endif
@if( auth()->user()->hasRole('developer') )
@if( auth()->user()->hasAnyAccess( 'gfx' ))
<li>
<a href="{{route('admin.gfx.index')}}">
<i class="ri-color-filter-line"></i>
@ -183,7 +183,7 @@
</a>
</li>
@endif
@if( auth()->user()->hasRole('developer'))
@if( auth()->user()->hasAnyAccess( 'area' ))
<li>
<a href="{{route('admin.area.index')}}">
<i class="ri-paint-brush-line"></i>

@ -16,10 +16,6 @@
img{
height: 64px;
}
.tns-outer{
direction: ltr;
}
.tns-nav,button{
display: inline-block;
}

@ -1,10 +0,0 @@
<section id='FollowUsSocial'>
<span>
{{__("Follow us")}}
</span>
@foreach(getSettingsGroup('social_')??[] as $k => $social)
<a href="{{$social}}">
<i class="ri-{{$k}}-line"></i>
</a>
@endforeach
</section>

@ -1,10 +0,0 @@
{
"name": "FollowUsSocial",
"version": "1.0",
"author": "xStack",
"email": "xshop@xstack.ir",
"license": "GPL-3.0-or-later",
"url": "https:\/\/xstack.ir",
"author_url": "https:\/\/4xmen.ir",
"packages": []
}

@ -1,21 +0,0 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Part;
class FollowUsSocial
{
public static function onAdd(Part $part = null)
{
}
public static function onRemove(Part $part = null)
{
}
public static function onMount(Part $part = null)
{
return $part;
}
}

@ -1,30 +0,0 @@
#FollowUsSocial {
z-index: 99;
position: fixed;
inset-inline-start: -125px;
bottom: 10rem;
transform: rotateZ(90deg);
width: 300px;
span{
display: inline-block;
font-size: 27px;
padding: .5rem;
position:relative;
top: -2px;
}
a,a:visited{
font-size: 35px;
color: black;
padding: 0 2px;
transition: 600ms;
&:hover{
color: dodgerblue;
background: white;
}
}
i{
transform: rotateZ(-90deg);
display: inline-block;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

@ -1,4 +1,4 @@
<header class='ParallaxHeader' style="background-image: url('{{$bg??asset('upload/images/'.$part->area->name . '.' . $part->part.'.jpg')}}')">
<header class='ParallaxHeader' style="background-image: url('{{$bg??asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')">
<div class="{{gfx()['container']}}">
<h1>
{{$title}}

@ -20,7 +20,7 @@ class ParallaxHeader
$setting->title = $part->area->name . ' ' . $part->part.' default image';
$setting->save();
File::copy(__DIR__.'/../../default-assets/bg.jpg',public_path('upload/images/').$part->area->name . '_' . $part->part.'.jpg');
File::copy(__DIR__.'/../../default-assets/bg.jpg',public_path('upload/images/').$part->area->name . '.' . $part->part.'.jpg');
}
public static function onRemove(Part $part = null)
{

@ -1,4 +1,4 @@
<header class='ParallaxHeaderPin' style="background-image: url('{{$bg??asset('upload/images/'.$part->area->name . '.' . $part->part.'.jpg')}}')">
<header class='ParallaxHeaderPin' style="background-image: url('{{$bg??asset('upload/images/'.$data->area->name.'.'.$data->part.'.jpg')}}')">
<div class="{{gfx()['container']}}">
<h1>
{{$title}}

@ -1,118 +0,0 @@
<section class='LianaInvoice'>
<div class="p-3">
<div class="row mb-4">
<div class="col-10">
<div class="overflow-hidden">
<img src="{{asset('upload/images/logo.png')}}" class="float-end liana-logo" alt="">
<h3 class="mt-3">
{{config('app.name')}}
</h3>
</div>
{{-- @php($invoice == \App\Models\Invoice::first())--}}
<div class="row">
<div class="col">
{{__("Date")}}: {{$invoice->created_at->ldate('Y-m-d')}}
</div>
<div class="col-7 text-center">
{{__("Customer")}}: {{$invoice->customer->name}}
</div>
</div>
<div class="row">
<div class="col">
{{__("ID")}}: {{$invoice->hash}} ({{$invoice->status}})
</div>
<div class="col-7 text-center">
{{__("Customer mobile")}}: {{$invoice->customer->mobile}}
</div>
</div>
</div>
<div class="col-2 text-center">
<img src="{{$qr->render(route('client.invoice',$invoice->hash))}}" alt="qr code"
class="qr-code">
</div>
</div>
<table class="table table-striped align-middle table-bordered text-center">
<tr>
<th>
#
</th>
<th>
{{__("Product")}}
</th>
<th>
{{__("Count")}}
</th>
<th>
{{__("Quantity")}}
</th>
<th>
{{__("Price")}}
</th>
</tr>
@foreach($invoice->orders as $k => $order)
<tr>
<td>
{{$k + 1}}
</td>
<td>
{{$order->product->name}}
</td>
<td>
{{number_format($order->count)}}
</td>
<td>
@if( ($order->quantity->meta??null) == null)
-
@else
@foreach($order->quantity->meta as $m)
<span>
{{$m->human_value}}
</span>
@endforeach
@endif
</td>
<td>
{{number_format($order->price_total)}}
</td>
</tr>
@endforeach
<tr>
<td>
-
</td>
<td>
{{__("Transport")}}
{{number_format($invoice->transport_price)}}
</td>
<td colspan="2">
{{__("Total price")}}
{{number_format($invoice->total_price)}}
</td>
<td colspan="2">
{{__("Orders count")}}: ({{number_format($invoice->count)}})
</td>
</tr>
</table>
<div class="inv-footer">
<p>
{{$invoice->desc}}
</p>
<hr>
{{__("Address")}}:
{{$invoice->address->state->name}}, {{$invoice->address->city->name}}, {{$invoice->address->address}}
, {{$invoice->address->zip}}
@if(trim(getSetting($data->area->name.'_'.$data->part.'_desc')) != '')
<hr>
{!! getSetting($data->area->name.'_'.$data->part.'_desc') !!}
@endif
</div>
<div class="no-print btn btn-primary mt-2 w-100" onclick="window.print()">
{{__("Print")}}
</div>
</div>
</section>

@ -1,10 +0,0 @@
{
"name": "LianaInvoice",
"version": "1.0",
"author": "xStack",
"email": "xshop@xstack.ir",
"license": "GPL-3.0-or-later",
"url": "https:\/\/xstack.ir",
"author_url": "https:\/\/4xmen.ir",
"packages": []
}

@ -1,30 +0,0 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Part;
use App\Models\Setting;
class LianaInvoice
{
public static function onAdd(Part $part = null)
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area->name . '_' . $part->part.'_desc';
$setting->value = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus aliquid consequuntur culpa cupiditate dignissimos dolor doloremque error facilis ipsum iure officia quam qui, tempora! Fuga harum impedit iusto magnam veniam.';
$setting->size = 12;
$setting->title = $part->area->name . ' ' . $part->part. ' invoice footer description';
$setting->type = 'EDITOR';
$setting->save();
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area->name . '_' . $part->part.'_desc')->first()?->delete();
}
public static function onMount(Part $part = null)
{
return $part;
}
}

@ -1,31 +0,0 @@
.LianaInvoice {
.inv-footer{
border: 1px solid gray;
padding: 1rem;
border-radius: var(--xshop-border-radius);
}
.liana-logo{
height: 64px;
margin-top: 2rem;
}
.qr-code{
max-width: 150px;
}
@media print {
&{
font-size: 90%;
}
.qr-code{
max-width: 100%;
}
.liana-logo{
width: 64px;
margin-top: 0;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

@ -4,7 +4,7 @@
{{__("Latest products")}}
</h1>
<div class="row">
@foreach(\App\Models\Product::where('status',1)->orderByDesc('id')->limit(4)->get() as $product)
@foreach(\App\Models\Product::where('status',1)->limit(4)->get() as $product)
<div class="col-lg-3 col-md-6">
<div class="product-item">
<a class="fav-btn" data-slug="{{$product->slug}}" data-is-fav="{{$product->isFav()}}"

@ -1,5 +1,4 @@
.LatestProducts {
padding: 3rem 0;
h1{
margin-bottom: 1rem;
font-size: 27px;

Loading…
Cancel
Save