{#3241
+"success": true
+"data": []
+"meta": {#3110
+"total": 0
+"per_page": 10
+"current_page": 1
+"last_page": 1
}
}
public function testHiddenCategory()
{
$catalog = Catalog::first();
$this->assertNotNull($catalog);
$categoryName = 'Test';
$relatedCategory = Category::create([
'catalog_id' => $catalog->id,
'name' => $categoryName,
'hidden' => true
]);
$itemName = 'Test item';
$testDescription = 'Test Description';
$relatedItem = Item::create([
'name' => $itemName,
'price' => 9999,
'description' => $testDescription,
'in_stock' => 1,
'quantity' => 1,
'quantity_mu' => 'u',
]);
$user = Aggregator::whereName('FSAggr')->first()->user()->first();
$this->assertNotNull($user);
$response = $this->actingAs($user)->get('/api/admin/catalog/units/index?itemsPerPage=10&page=1');
$response->assertStatus(200);
dd(json_decode($response->getContent()));
}
:class="[`col-lg-${colLg}`, `col-md-${colMd}`, `col-sm-${colSm}`, `col-xs-${colXs}`]"
import { defineComponent } from 'vue';
import { getModule } from 'vuex-module-decorators';
export default defineComponent({
name: 'BasketComponent',
data: () => ({
BasketStoreModule: null as BasketStoreModule | null,
}),
computed: {
BasketProducts(): Array<IUnitBasketItem> {
return this.BasketStoreModule?.BasketProducts ?? [];
},
},
beforeMount() {
this.BasketStoreModule = getModule(BasketStoreModule, this.$store);
},
methods: {
changeProduct(id: string, quantity: string) {
const product: IUnitBasketItem = { id, quantity };
this.BasketStoreModule.addBasketProduct(product);
},
},
});
const basketitem = this._BasketProducts.find(
(product: IUnitBasketItem, index: number) => {
item.id == product.id && (basketitemIndex = index);
return item.id == product.id;
},
)
; .cart-modal {
$this: &;
position: sticky;
top: 80px;
&-mb{
top: 0px;
#{$this}__inner {
height: 100vh;
}
}
&__empty {
margin: auto;
text-align: center;
}
&__inner {
height: calc( 100vh - 150px);
min-height: 300px;
max-height: 100vh;
display: flex;
flex-direction: column;
}
&__item-list{
flex: 1 1 auto;
}
}
actions: {
async sendCode(cnx, { phone }) {
// console.log(phone);
// phone = "+79522966236"; // пока для теста
const data = {
method: 'GET',
url: '/code',
params: { phone },
};
const res = await this.dispatch('request', data);
mutations: {
async request(cnx, { method = 'GET', url = '', headers, body, params }) {
const req = {
method,
url,
data: body,
params,
headers
};
class RequestService {
async request(data) {
const req = {
method: data.method || 'GET',
url:data.url || " ",
data:data.body?,
params:data.params,
headers:data.headers?
};
а что вас возмутило?
в последнем хроме делал так ,для бека с двойными кавычками строка не подходит