Skip to content

Commit

Permalink
Sakai services updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Mar 29, 2024
1 parent 1f5aeb1 commit ef6f80d
Show file tree
Hide file tree
Showing 20 changed files with 154 additions and 114 deletions.
60 changes: 30 additions & 30 deletions public/demo/data/photos.json
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
{
"data":[
{
"itemImageSrc": "demo/images/galleria/galleria1.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria1s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria1.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria1s.jpg",
"alt": "Description for Image 1",
"title": "Title 1"
},
{
"itemImageSrc": "demo/images/galleria/galleria2.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria2s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria2.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria2s.jpg",
"alt": "Description for Image 2",
"title": "Title 2"
},
{
"itemImageSrc": "demo/images/galleria/galleria3.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria3s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria3.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria3s.jpg",
"alt": "Description for Image 3",
"title": "Title 3"
},
{
"itemImageSrc": "demo/images/galleria/galleria4.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria4s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria4.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria4s.jpg",
"alt": "Description for Image 4",
"title": "Title 4"
},
{
"itemImageSrc": "demo/images/galleria/galleria5.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria5s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria5.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria5s.jpg",
"alt": "Description for Image 5",
"title": "Title 5"
},
{
"itemImageSrc": "demo/images/galleria/galleria6.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria6s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria6.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria6s.jpg",
"alt": "Description for Image 6",
"title": "Title 6"
},
{
"itemImageSrc": "demo/images/galleria/galleria7.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria7s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria7.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria7s.jpg",
"alt": "Description for Image 7",
"title": "Title 7"
},
{
"itemImageSrc": "demo/images/galleria/galleria8.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria8s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria8.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria8s.jpg",
"alt": "Description for Image 8",
"title": "Title 8"
},
{
"itemImageSrc": "demo/images/galleria/galleria9.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria9s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria9.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria9s.jpg",
"alt": "Description for Image 9",
"title": "Title 9"
},
{
"itemImageSrc": "demo/images/galleria/galleria10.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria10s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria10.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria10s.jpg",
"alt": "Description for Image 10",
"title": "Title 10"
},
{
"itemImageSrc": "demo/images/galleria/galleria11.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria11s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria11.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria11s.jpg",
"alt": "Description for Image 11",
"title": "Title 11"
},
{
"itemImageSrc": "demo/images/galleria/galleria12.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria12s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria12.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria12s.jpg",
"alt": "Description for Image 12",
"title": "Title 12"
},
{
"itemImageSrc": "demo/images/galleria/galleria13.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria13s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria13.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria13s.jpg",
"alt": "Description for Image 13",
"title": "Title 13"
},
{
"itemImageSrc": "demo/images/galleria/galleria14.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria14s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria14.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria14s.jpg",
"alt": "Description for Image 14",
"title": "Title 14"
},
{
"itemImageSrc": "demo/images/galleria/galleria15.jpg",
"thumbnailImageSrc": "demo/images/galleria/galleria15s.jpg",
"itemImageSrc": "/demo/images/galleria/galleria15.jpg",
"thumbnailImageSrc": "/demo/images/galleria/galleria15s.jpg",
"alt": "Description for Image 15",
"title": "Title 15"
}
Expand Down
2 changes: 1 addition & 1 deletion src/layout/AppFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { computed } from 'vue';
const { layoutConfig } = useLayout();
const logoUrl = computed(() => {
return `layout/images/${layoutConfig.darkTheme.value ? 'logo-white' : 'logo-dark'}.svg`;
return `/layout/images/${layoutConfig.darkTheme.value ? 'logo-white' : 'logo-dark'}.svg`;
});
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/layout/AppTopbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ onBeforeUnmount(() => {
});
const logoUrl = computed(() => {
return `layout/images/${layoutConfig.darkTheme.value ? 'logo-white' : 'logo-dark'}.svg`;
return `/layout/images/${layoutConfig.darkTheme.value ? 'logo-white' : 'logo-dark'}.svg`;
});
const onTopBarMenuButton = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/service/CountryService.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default class CountryService {
export class CountryService {
getCountries() {
return fetch('demo/data/countries.json')
return fetch('/demo/data/countries.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}
Expand Down
22 changes: 4 additions & 18 deletions src/service/CustomerService.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
export default class CustomerService {
export class CustomerService {
getCustomersSmall() {
return fetch('demo/data/customers-small.json')
return fetch('/demo/data/customers-small.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}

getCustomersMedium() {
return fetch('demo/data/customers-medium.json')
return fetch('/demo/data/customers-medium.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}

getCustomersLarge() {
return fetch('demo/data/customers-large.json')
return fetch('/demo/data/customers-large.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}

getCustomersXLarge() {
return fetch('demo/data/customers-xlarge.json')
.then((res) => res.json())
.then((d) => d.data);
}

getCustomers(params) {
const queryParams = Object.keys(params)
.map((k) => encodeURIComponent(k) + '=' + encodeURIComponent(params[k]))
.join('&');
return fetch('https://www.primefaces.org//demo/data/customers?' + queryParams).then((res) => res.json());
}
}
30 changes: 27 additions & 3 deletions src/service/NodeService.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
export default class NodeService {
export class NodeService {
getFiles() {
return fetch('/demo/data/files.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}

getLazyFiles() {
return fetch('/demo/data/files-lazy.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}

getFilesystem() {
return fetch('/demo/data/filesystem.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}

getLazyFilesystem() {
return fetch('/demo/data/filesystem-lazy.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}

getTreeTableNodes() {
return fetch('demo/data/treetablenodes.json')
return fetch('/demo/data/treetablenodes.json')
.then((res) => res.json())
.then((d) => d.root);
}

getTreeNodes() {
return fetch('demo/data/treenodes.json')
return fetch('/demo/data/treenodes.json')
.then((res) => res.json())
.then((d) => d.root);
}
Expand Down
4 changes: 2 additions & 2 deletions src/service/PhotoService.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default class PhotoService {
export class PhotoService {
getImages() {
return fetch('demo/data/photos.json')
return fetch('/demo/data/photos.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}
Expand Down
20 changes: 16 additions & 4 deletions src/service/ProductService.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
export default class ProductService {
export class ProductService {
getProductsSmall() {
return fetch('demo/data/products-small.json')
return fetch('/demo/data/products-small.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}

getProducts() {
return fetch('demo/data/products.json')
return fetch('/demo/data/products.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}

getProductsMixed() {
return fetch('/demo/data/products-mixed.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}

getProductsWithOrdersSmall() {
return fetch('demo/data/products-orders-small.json')
return fetch('/demo/data/products-orders-small.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}

getProductsWithOrdersLarge() {
return fetch('/demo/data/products-orders.json', { headers: { 'Cache-Control': 'no-cache' } })
.then((res) => res.json())
.then((d) => d.data);
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/Dashboard.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { onMounted, reactive, ref, watch } from 'vue';
import ProductService from '@/service/ProductService';
import { ProductService } from '@/service/ProductService';
import { useLayout } from '@/layout/composables/layout';
const { isDarkTheme } = useLayout();
Expand Down
2 changes: 1 addition & 1 deletion src/views/pages/Crud.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup>
import { FilterMatchMode } from 'primevue/api';
import { ref, onMounted, onBeforeMount } from 'vue';
import ProductService from '@/service/ProductService';
import { ProductService } from '@/service/ProductService';
import { useToast } from 'primevue/usetoast';
const toast = useToast();
Expand Down
2 changes: 1 addition & 1 deletion src/views/pages/Timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const horizontalEvents = ref(['2020', '2021', '2022', '2023']);
{{ slotProps.item.date }}
</template>
<template #content>
<img v-if="slotProps.item.image" :src="'demo/images/product/' + slotProps.item.image" :alt="slotProps.item.name" width="200" class="shadow-2 mb-3" />
<img v-if="slotProps.item.image" :src="'/demo/images/product/' + slotProps.item.image" :alt="slotProps.item.name" width="200" class="shadow-2 mb-3" />
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate
neque quas!
Expand Down
2 changes: 1 addition & 1 deletion src/views/uikit/FloatLabel.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { ref, onMounted } from 'vue';
import CountryService from '@/service/CountryService';
import { CountryService } from '@/service/CountryService';
const countries = ref([]);
const cities = ref([
Expand Down
4 changes: 2 additions & 2 deletions src/views/uikit/Input.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup>
import { ref, onMounted } from 'vue';
import CountryService from '@/service/CountryService';
import NodeService from '@/service/NodeService';
import { CountryService } from '@/service/CountryService';
import { NodeService } from '@/service/NodeService';
const floatValue = ref(null);
const autoValue = ref(null);
Expand Down
2 changes: 1 addition & 1 deletion src/views/uikit/InvalidState.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { ref, onMounted } from 'vue';
import CountryService from '@/service/CountryService';
import { CountryService } from '@/service/CountryService';
const countries = ref(null);
const filteredCountries = ref(null);
Expand Down
2 changes: 1 addition & 1 deletion src/views/uikit/List.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { ref, onMounted } from 'vue';
import ProductService from '@/service/ProductService';
import { ProductService } from '@/service/ProductService';
const picklistValue = ref([
[
Expand Down
Loading

0 comments on commit ef6f80d

Please sign in to comment.