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
const temp = this.employees.filter(employee => { | |
return this.departments.find(department => department.id == employee.departmentId) | |
}).reduce((mem: any, cur: any) => { | |
mem[cur.departmentId] = (mem[cur.departmentId] || 0) + 1; | |
console.log(mem); | |
return mem; | |
}, {}); | |
const calculate = Object.keys(temp).map(key => ({ | |
departmentId: key, |
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
<?php | |
namespace App\Http\Controllers; | |
use App\Models\FreightRate; | |
use App\Models\ShoppingCart; | |
use App\Models\ShoppingSession; | |
use Illuminate\Http\JsonResponse; | |
use Illuminate\Http\RedirectResponse; | |
use Illuminate\Http\Request; |
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
import Alpine from 'alpinejs'; | |
import filterComponent from "./components/filter"; | |
window.filterComponent = filterComponent; | |
window.Alpine = Alpine; | |
Alpine.start(); |
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
<?php | |
namespace App\Models; | |
use App\Traits\Uuid; | |
use Illuminate\Database\Eloquent\Factories\HasFactory; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Database\Eloquent\Relations\BelongsTo; | |
class Product extends Model |
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
<div x-data="{ openTab: 1 }" class="flex flex-col-reverse"> | |
<div class="hidden mt-6 w-full max-w-2xl mx-auto sm:block lg:max-w-none"> | |
<div class="grid grid-cols-4 gap-6" aria-orientation="horizontal" role="tablist"> | |
@foreach ($product->productImages as $productImage) | |
<button x-on:click="{ openTab = {{ $loop->iteration }} }" id="tabs-1-tab-{{ $loop->iteration }}" | |
class="relative h-24 bg-white rounded-md flex items-center justify-center text-sm font-medium uppercase text-gray-900 cursor-pointer hover:bg-gray-50 focus:outline-none focus:ring focus:ring-offset-4 focus:ring-opacity-50" | |
aria-controls="tabs-1-panel-{{ $loop->iteration }}" | |
:tabindex="openTab === {{ $loop->iteration }} ? 0 : -1" | |
:aria-selected="openTab === {{ $loop->iteration }} ? 'true' : 'false'" | |
role="tab" |
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
<div class="max-w-7xl mx-auto overflow-hidden sm:px-6 lg:px-8"> | |
<h2 class="sr-only">Products</h2> | |
<div class="-mx-px border-l border-gray-200 grid grid-cols-2 sm:mx-0 md:grid-cols-3 lg:grid-cols-4"> | |
<!-- product --> | |
@foreach ($products as $product) | |
<div class="group relative p-4 border-r border-b border-gray-200 sm:p-6"> | |
<div class="rounded-lg overflow-hidden bg-gray-200 aspect-w-1 aspect-h-1 group-hover:opacity-75"> | |
<img src="https://tailwindui.com/img/ecommerce-images/category-page-05-image-card-01.jpg" alt="TODO" class="w-full h-full object-center object-cover"> | |
</div> | |
<div class="pt-10 pb-4 text-center"> |
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
export const deleteProduct = async (req, res, next) => { | |
const response = await productModel.findByIdAndRemove(req.params.productId); | |
if (!response) { | |
return next(res.status(200).json({ | |
success: false, | |
message: 'ürün bulunamadı' | |
})); | |
} | |
else return next(res.status(200).json({ | |
success: true, |
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
// Sorumluluk Alanımdakiler | |
/** | |
* Daire Başkanı - county ve neighborhood filtrelemesi olmamalı | |
* Şube Müdürü - county ve neighborhood filtrelemesi olmamalı | |
* Şef - county ve neighborhood filtrelemesi olmamalı | |
* Mesul Müdür - county ve neighborhood filtrelemesi olmamalı | |
* | |
* Bölge Sorumlusu - county filtrelemesi olmalı | |
* |
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
@Authorized() | |
@Query(() => [Coordinate]) | |
async coordinates( | |
@Arg('filter') filter: CoordinateFilterInput, | |
): Promise < Coordinate[] > { | |
console.log(filter); | |
const query = await getConnection().createQueryBuilder(Coordinate, 'coordinate'); |
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
.used-biocidal-box { | |
border: 1px solid #dddfe2; | |
padding: 10px 10px; | |
font-family: 'SF UI Display', sans-serif; | |
font-size: 14px; | |
} | |
.used-biocidal-box:not(:first-child) { | |
border-top: none; | |
} |