xah

Untitled

xah
Jul 13th, 2021 (edited)
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.78 KB | None | 0 0
  1. <x-product-card class="cursor-pointer" src="{{ asset($variable['image_url']) }}" id="{{ $variable['id'] }}" x-on:click="{productBoxOpen=true, alt='{{ $variable['name'] }}', img='{{ asset($variable['image_url']) }}'}">  
  2.                 <x-slot name="brand"><button data-brand="brand-{{ $variable['brand_name']['Code'] }}" x-on:click="document.getElementById($event.currentTarget.getAttribute('data-brand')).click()">{{ explode(" ", $variable['brand_name']['Name'])[0] }}</button></x-slot>
  3.                 <x-slot name="category"><button data-category="category-{{ $variable['category_name']['Code'] }}" x-on:click="document.getElementById($event.currentTarget.getAttribute('data-category')).click()">{{ explode(" ", $variable['category_name']['Name'])[0] }}</button></x-slot>
  4.                 <x-slot name="title">
  5.                     @if(isset(Auth::user()->role()->first()->Role) && Auth::user()->role()->first()->Role == 'Administrator')
  6.                        <span><x-link href="{{ url('/procurement/edit/'.$variable['id']) }}"><x-svg.edit class="w-5 h-5 float-left"></x-svg.edit></x-link></span>
  7.                    @endif
  8.                    <h2 class="text-xl font-medium leading-6 tracking-wide text-gray-800 hover:text-black cursor-pointer" data-id="{{ $variable['id'] }}" x-on:click="{document.getElementById($event.currentTarget.getAttribute('data-id')).click()}">
  9.                    {{ $variable['name'] }}
  10.                    </h2>
  11.                </x-slot>
  12.                <x-slot name="search">
  13.                    <x-svg.search class="w-5 h-5 cursor-pointer" data-id="{{ $variable['id'] }}" x-on:click="{document.getElementById($event.currentTarget.getAttribute('data-id')).click()}"></x-svg.search>
  14.                </x-slot>
  15.                    {{ $variable['description'] }}
  16.                <x-slot name="price">
  17.                    ${{ $variable['unit_price'] }} + GST
  18.                </x-slot>
  19.                <x-slot name="basket">
  20.                    <div product-name="{{ $variable['name'] }}" product-price="{{ $variable['unit_price'] }}" product-id="{{ $variable['id'] }}" class="flex items-center space-x-1 cursor-pointer"
  21.                        :class="'{{ $variable['name'] }}' in shopping_cart ? 'text-gray-800' : 'text-gray-400 hover:text-gray-800'"
  22.                        x-on:click="{alt=$event.currentTarget.getAttribute('product-name'), unit_price=$event.currentTarget.getAttribute('product-price'), alt in shopping_cart ? delete shopping_cart[alt]
  23.                        : shopping_cart[alt] = {'quantity': 1, 'price': parseInt(unit_price), 'id': $event.currentTarget.getAttribute('product-id'), 'total_price': unit_price }}">
  24.                        <x-svg.basket class="h-5 w-5"></x-svg.basket>
  25.                    </div>
  26.                </x-slot>
  27.            </x-product-card>
Advertisement
Add Comment
Please, Sign In to add comment