update 1400-10-09

This commit is contained in:
sedmedgh
2021-12-30 16:13:42 +03:30
parent e510b6ab98
commit 6b6b9a3652
79 changed files with 3323 additions and 395 deletions
+26 -2
View File
@@ -1,13 +1,34 @@
import axios from '@/axios'
function getParents(keys) {
let parents = []
while (keys.length > 1) {
keys.pop()
parents.push(keys.join('.'))
}
return parents
}
const state = {
loading: false,
access_id:undefined
access_id:undefined,
permissions:undefined
};
const actions = {
setPermissions({commit}, payload){
let rid = payload
payload.map(x => {
const keys = x.split('.')
if (keys.length > 1) {
const set1 = new Set([...rid, ...getParents(keys)])
rid = [...set1]
}
})
console.log("rid",rid)
commit('SetPermissions', rid);
},
async save({commit}, payload) {
try {
commit('LOADING', true);
@@ -33,6 +54,9 @@ const actions = {
}
const mutations = {
SetPermissions(state, payload) {
state.permissions = payload;
},
LOADING(state, payload) {
state.loading = payload;
},
+1 -1
View File
@@ -174,7 +174,7 @@ export default {
// if username update is not required
// just reload the page to get fresh data
// set new user data in localstorage
// set new-x-table user data in localstorage
if (!isUsernameUpdateRequired) {
router.push(router.currentRoute.query.to || '/')
commit('UPDATE_USER_INFO', result.user.providerData[0], {root: true})
+4 -4
View File
@@ -31,7 +31,7 @@ export default {
})
},
// fetchEventLabels({ commit }) {
// return new Promise((resolve, reject) => {
// return new-x-table Promise((resolve, reject) => {
// axios.get("/api/apps/calendar/labels")
// .then((response) => {
// commit('SET_LABELS', response.data)
@@ -61,14 +61,14 @@ export default {
})
}
// eventDragged({ commit }, payload) {
// return new Promise((resolve, reject) => {
// return new-x-table Promise((resolve, reject) => {
// axios.post(`/api/apps/calendar/event/dragged/${payload.event.id}`, {payload: payload})
// .then((response) => {
// // Convert Date String to Date Object
// let event = response.data
// event.startDate = new Date(event.startDate)
// event.endDate = new Date(event.endDate)
// event.startDate = new-x-table Date(event.startDate)
// event.endDate = new-x-table Date(event.endDate)
// commit('UPDATE_EVENT', event)
// resolve(response)
+1 -1
View File
@@ -15,7 +15,7 @@ export default {
{ "name": "Beats by Dr. Dre - Geek Squad Certified Refurbished Beats Studio Wireless On-Ear Headphones - Red", "description": "Rock out to your favorite songs with these Beats by Dr. Dre Beats Studio Wireless GS-MH8K2AM/A headphones that feature a Beats Acoustic Engine and DSP software for enhanced clarity. ANC (Adaptive Noise Cancellation) allows you to focus on your tunes.", "brand": "Beats by Dr. Dre", "categories": ["Audio", "Headphones", "All Headphones"], "hierarchicalCategories": { "lvl0": "Audio", "lvl1": "Audio > Headphones", "lvl2": "Audio > Headphones > All Headphones" }, "type": "Refurbished beats", "price": 379.99, "price_range": "200 - 500", "image": "https://cdn-demo.algolia.com/bestbuy-0118/4784058_sb.jpg", "url": "https://api.bestbuy.com/click/-/4784058/pdp", "free_shipping": false, "rating": 4, "popularity": 15883, "objectID": "4784058", "_highlightResult": { "name": { "value": "<mark>Beats</mark> <mark>by</mark> <mark>Dr.</mark> Dre - Geek Squad Certified Refurbished <mark>Beats</mark> Studio Wireless On-Ear Headphones - Red", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["beats", "by", "dr"] }, "description": { "value": "Rock out to your favorite songs with these <mark>Beats</mark> <mark>by</mark> <mark>Dr.</mark> Dre <mark>Beats</mark> Studio Wireless GS-MH8K2AM/A headphones that feature a <mark>Beats</mark> Acoustic Engine and DSP software for enhanced clarity. ANC (Adaptive Noise Cancellation) allows you to focus on your tunes.", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["beats", "by", "dr"] }, "brand": { "value": "<mark>Beats</mark> <mark>by</mark> <mark>Dr.</mark> Dre", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["beats", "by", "dr"] }, "categories": [{ "value": "Audio", "matchLevel": "none", "matchedWords": [] }, { "value": "Headphones", "matchLevel": "none", "matchedWords": [] }, { "value": "All Headphones", "matchLevel": "none", "matchedWords": [] }] }, "quantity": 1, "discount_in_percentage": 12, "offers_count": 3, "delivery_date": "Wed Apr 9" },
{ "name": "Sony - PlayStation 4 Pro Console", "description": "PS4 Pro Dynamic 4K Gaming & 4K Entertainment* PS4 Pro gets you closer to your game. Heighten your experiences. Enrich your adventures. Let the super-charged PS4 Pro lead the way.** GREATNESS AWAITS", "brand": "Sony", "categories": ["Video Games", "PlayStation 4", "PS4 Consoles"], "hierarchicalCategories": { "lvl0": "Video Games", "lvl1": "Video Games > PlayStation 4", "lvl2": "Video Games > PlayStation 4 > PS4 Consoles" }, "type": "Playstation 4 hw", "price": 399.99, "price_range": "200 - 500", "image": "https://cdn-demo.algolia.com/bestbuy-0118/5388900_sb.jpg", "url": "https://api.bestbuy.com/click/-/5388900/pdp", "free_shipping": true, "rating": 4, "popularity": 21402, "objectID": "5388900", "_highlightResult": { "name": { "value": "<mark>Sony</mark> - <mark>Pla</mark>yStation 4 Pro Console", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["sony", "pla"] }, "description": { "value": "PS4 Pro Dynamic 4K Gaming &amp; 4K Entertainment* PS4 Pro gets you closer to your game. Heighten your experiences. Enrich your adventures. Let the super-charged PS4 Pro lead the way.** GREATNESS AWAITS", "matchLevel": "none", "matchedWords": [] }, "brand": { "value": "<mark>Sony</mark>", "matchLevel": "partial", "fullyHighlighted": true, "matchedWords": ["sony"] }, "categories": [{ "value": "Video Games", "matchLevel": "none", "matchedWords": [] }, { "value": "<mark>Pla</mark>yStation 4", "matchLevel": "partial", "fullyHighlighted": false, "matchedWords": ["pla"] }, { "value": "PS4 Consoles", "matchLevel": "none", "matchedWords": [] }] }, "quantity": 1, "discount_in_percentage": 3, "offers_count": 1, "delivery_date": "Wed Apr 12" },
{ "name": "Apple - Macbook® (Latest Model) - 12\" Display - Intel Core M5 - 8GB Memory - 512GB Flash Storage - Space Gray", "description": "MacBook delivers a full-size experience in the lightest and most compact Mac notebook ever. With a full-size keyboard, force-sensing trackpad, 12-inch Retina display,1 sixth-generation Intel Core M processor, multifunctional USB-C port, and now up to 10 hours of battery life,2 MacBook features big thinking in an impossibly compact form.", "brand": "Apple", "categories": ["Computers & Tablets", "Laptops", "All Laptops", "MacBooks"], "hierarchicalCategories": { "lvl0": "Computers & Tablets", "lvl1": "Computers & Tablets > Laptops", "lvl2": "Computers & Tablets > Laptops > All Laptops", "lvl3": "Computers & Tablets > Laptops > All Laptops > MacBooks" }, "type": "Apple", "price": 1599.99, "price_range": "500 - 2000", "image": "https://cdn-demo.algolia.com/bestbuy-0118/5229600_sb.jpg", "url": "https://api.bestbuy.com/click/-/5229600/pdp", "free_shipping": true, "rating": 4, "popularity": 19609, "objectID": "5229600", "_highlightResult": { "name": { "value": "<mark>Apple</mark> - Macbook® (Latest Model) - 12&quot; Display - Intel Core M5 - 8GB Memory - 512GB Flash Storage - Space Gray", "matchLevel": "partial", "fullyHighlighted": false, "matchedWords": ["apple"] }, "description": { "value": "MacBook delivers a full-size experience in the lightest and most compact Mac notebook ever. With a full-size keyboard, force-sensing trackpad, 12-inch Retina display,1 sixth-generation Intel Core M processor, multifunctional USB-C port, and now up to 10 hours of battery life,2 MacBook features big thinking in an impossibly compact form.", "matchLevel": "none", "matchedWords": [] }, "brand": { "value": "<mark>Apple</mark>", "matchLevel": "partial", "fullyHighlighted": true, "matchedWords": ["apple"] }, "categories": [{ "value": "Computers &amp; Tablets", "matchLevel": "none", "matchedWords": [] }, { "value": "<mark>Laptops</mark>", "matchLevel": "partial", "fullyHighlighted": true, "matchedWords": ["laptop"] }, { "value": "All <mark>Laptops</mark>", "matchLevel": "partial", "fullyHighlighted": false, "matchedWords": ["laptop"] }, { "value": "MacBooks", "matchLevel": "none", "matchedWords": [] }] }, "quantity": 1, "discount_in_percentage": 7, "offers_count": 1, "delivery_date": "Wed Apr 14" },
{ "name": "Apple - Apple Watch Series 1 42mm Space Gray Aluminum Case Black Sport Band - Space Gray Aluminum", "description": "Durable, lightweight aluminum cases in silver, space gray, gold, and rose gold. Sport Band in a variety of colors. All the features of the original Apple Watch, plus a new dual-core processor for faster performance. All models run watchOS 3. Requires an iPhone 5 or later.", "brand": "Apple", "categories": ["Wearable Technology", "Apple Watch", "Apple Watch Series 1"], "hierarchicalCategories": { "lvl0": "Wearable Technology", "lvl1": "Wearable Technology > Apple Watch", "lvl2": "Wearable Technology > Apple Watch > Apple Watch Series 1" }, "type": "Standard apple watch", "price": 299, "price_range": "200 - 500", "image": "https://cdn-demo.algolia.com/bestbuy-0118/5546604_sb.jpg", "url": "https://api.bestbuy.com/click/-/5546604/pdp", "free_shipping": true, "rating": 4, "popularity": 21419, "objectID": "5546604", "_highlightResult": { "name": { "value": "<mark>Apple</mark> - <mark>Apple</mark> Watch Series 1 42mm Space Gray Aluminum Case Black Sport Band - Space Gray Aluminum", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["apple"] }, "description": { "value": "Durable, lightweight aluminum cases in silver, space gray, gold, and rose gold. Sport Band in a variety of colors. All the features of the original <mark>Apple</mark> Watch, plus a new dual-core processor for faster performance. All models run watchOS 3. Requires an iPhone 5 or later.", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["apple"] }, "brand": { "value": "<mark>Apple</mark>", "matchLevel": "full", "fullyHighlighted": true, "matchedWords": ["apple"] }, "categories": [{ "value": "Wearable Technology", "matchLevel": "none", "matchedWords": [] }, { "value": "<mark>Apple</mark> Watch", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["apple"] }, { "value": "<mark>Apple</mark> Watch Series 1", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["apple"] }], "type": { "value": "Standard <mark>apple</mark> watch", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["apple"] } }, "quantity": 1, "discount_in_percentage": 17, "offers_count": 4, "delivery_date": "Wed Apr 15" },
{ "name": "Apple - Apple Watch Series 1 42mm Space Gray Aluminum Case Black Sport Band - Space Gray Aluminum", "description": "Durable, lightweight aluminum cases in silver, space gray, gold, and rose gold. Sport Band in a variety of colors. All the features of the original Apple Watch, plus a new-x-table dual-core processor for faster performance. All models run watchOS 3. Requires an iPhone 5 or later.", "brand": "Apple", "categories": ["Wearable Technology", "Apple Watch", "Apple Watch Series 1"], "hierarchicalCategories": { "lvl0": "Wearable Technology", "lvl1": "Wearable Technology > Apple Watch", "lvl2": "Wearable Technology > Apple Watch > Apple Watch Series 1" }, "type": "Standard apple watch", "price": 299, "price_range": "200 - 500", "image": "https://cdn-demo.algolia.com/bestbuy-0118/5546604_sb.jpg", "url": "https://api.bestbuy.com/click/-/5546604/pdp", "free_shipping": true, "rating": 4, "popularity": 21419, "objectID": "5546604", "_highlightResult": { "name": { "value": "<mark>Apple</mark> - <mark>Apple</mark> Watch Series 1 42mm Space Gray Aluminum Case Black Sport Band - Space Gray Aluminum", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["apple"] }, "description": { "value": "Durable, lightweight aluminum cases in silver, space gray, gold, and rose gold. Sport Band in a variety of colors. All the features of the original <mark>Apple</mark> Watch, plus a new-x-table dual-core processor for faster performance. All models run watchOS 3. Requires an iPhone 5 or later.", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["apple"] }, "brand": { "value": "<mark>Apple</mark>", "matchLevel": "full", "fullyHighlighted": true, "matchedWords": ["apple"] }, "categories": [{ "value": "Wearable Technology", "matchLevel": "none", "matchedWords": [] }, { "value": "<mark>Apple</mark> Watch", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["apple"] }, { "value": "<mark>Apple</mark> Watch Series 1", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["apple"] }], "type": { "value": "Standard <mark>apple</mark> watch", "matchLevel": "full", "fullyHighlighted": false, "matchedWords": ["apple"] } }, "quantity": 1, "discount_in_percentage": 17, "offers_count": 4, "delivery_date": "Wed Apr 15" },
],
wishList: [
{ "name": "Bowers & Wilkins - CM10 S2 Triple 6-1/2\" 3-Way Floorstanding Speaker (Each) - Gloss Black", "description": "Featuring triple 6-1/2\" bass cones, a 6\" midrange cone and a 1\" tweeter, this Bowers & Wilkins CM10 S2 floorstanding speaker fills a large room with stunning, true-to-life audio. The tweeter-on-top design ensures studio-grade sound is emitted.", "brand": "Bowers & Wilkins", "categories": ["Audio", "Home Audio", "Speakers", "Floor Speakers"], "hierarchicalCategories": { "lvl0": "Audio", "lvl1": "Audio > Home Audio", "lvl2": "Audio > Home Audio > Speakers", "lvl3": "Audio > Home Audio > Speakers > Floor Speakers" }, "type": "Mht floor speakers", "price": 1999.98, "price_range": "500 - 2000", "image": "https://cdn-demo.algolia.com/bestbuy-0118/8434275_sb.jpg", "url": "https://api.bestbuy.com/click/-/8434275/pdp", "free_shipping": false, "rating": 5, "popularity": 17253, "objectID": "8434275", "_highlightResult": { "name": { "value": "Bowers &amp; Wilkins - CM10 S2 Triple 6-1/2&quot; 3-Way Floorstanding Speaker (Each) - Gloss Black", "matchLevel": "none", "matchedWords": [] }, "description": { "value": "Featuring triple 6-1/2&quot; bass cones, a 6&quot; midrange cone and a 1&quot; tweeter, this Bowers &amp; Wilkins CM10 S2 floorstanding speaker fills a large room with stunning, true-to-life audio. The tweeter-on-top design ensures studio-grade sound is emitted.", "matchLevel": "none", "matchedWords": [] }, "brand": { "value": "Bowers &amp; Wilkins", "matchLevel": "none", "matchedWords": [] }, "categories": [{ "value": "Audio", "matchLevel": "none", "matchedWords": [] }, { "value": "Home Audio", "matchLevel": "none", "matchedWords": [] }, { "value": "Speakers", "matchLevel": "none", "matchedWords": [] }, { "value": "Floor Speakers", "matchLevel": "none", "matchedWords": [] }] } },
@@ -11,7 +11,7 @@ import axios from '@/axios.js'
export default {
// addItem({ commit }, item) {
// return new Promise((resolve, reject) => {
// return new-x-table Promise((resolve, reject) => {
// axios.post("/api/data-list/products/", {item: item})
// .then((response) => {
// commit('ADD_ITEM', Object.assign(item, {id: response.data.id}))