Community admin
Merge request reports
Activity
80 83 <script> 81 84 import CommunityHamburger from "@/components/CommunityComponents/CommunityHamburger"; 82 85 import ColoredButton from "@/components/BaseComponents/ColoredButton"; 86 import CommunityService from "@/services/community.service"; 87 import CustomFooterModal from "@/components/BaseComponents/CustomFooterModal"; 88 import { parseCurrentUser } from "@/utils/token-utils"; 83 89 import { 84 90 JoinOpenCommunity, 85 GetIfUserAlreadyInCommunity, 91 // GetIfUserAlreadyInCommunity, 130 143 }, 131 getIfUserInCommunity: async function () { 132 try { 133 this.member = await GetIfUserAlreadyInCommunity( 134 this.$router.currentRoute.value.params.communityID 135 ); 136 } catch (error) { 137 console.log(error); 138 } 139 }, 140 144 }, 141 beforeMount() { 142 this.getIfUserInCommunity(); 145 // beforeMount() { 146 // this.getIfUserInCommunity(); 147 // }, 8 </div> 9 </template> 10 11 <script> 12 // import AdminService from "@/services/community-admin.service"; 13 import IconButton from "@/components/BaseComponents/IconButton.vue"; 14 15 //TODO: OPEN CONFIRMATION DIALOG WHEN DELETING 16 17 export default { 18 components: { 19 IconButton, 20 }, 21 methods: { 22 deleteCommunity() { 23 //console.log("DELETED"); 142 142 const newPasswordResponse = doNewPassword(newPasswordInfo); 143 143 144 144 if (newPasswordResponse.newPasswordSet === true) { 145 console.log("New password set"); 145 //console.log("New password set"); 146 146 await this.$router.push("/"); 147 147 } else if (newPasswordResponse.newPasswordSet === false) { 148 console.log("Couldn't set new password"); 148 //console.log("Couldn't set new password"); 149 149 } else { 150 console.log("Something went wrong"); 150 //console.log("Something went wrong"); 335 335 this.checkUser(); 336 336 337 console.log("Tittel: " + this.item.title); 338 console.log("Kategori: " + this.item.select); 339 console.log("Beskrivelse: " + this.item.description); 340 console.log("Addressen: " + this.item.address); 341 console.log("Pris: " + this.item.price); 342 console.log("bilder: " + this.item.images); 343 console.log("gruppe: " + this.item.selectedGroups); 337 //console.log("Tittel: " + this.item.title); 338 //console.log("Kategori: " + this.item.select); 339 //console.log("Beskrivelse: " + this.item.description); 340 //console.log("Addressen: " + this.item.address); 341 //console.log("Pris: " + this.item.price); 342 //console.log("bilder: " + this.item.images); 343 //console.log("gruppe: " + this.item.selectedGroups); 352 352 communityIDs: this.item.selectedGroups, 353 353 }; 354 354 355 console.log(itemInfo); 355 //console.log(itemInfo); 356 356 357 const postRequest = await postNewItem(itemInfo); 357 /* const postRequest = */ await postNewItem(itemInfo); 358 358 359 console.log("posted: " + postRequest); 359 //console.log("posted: " + postRequest); 360 360
Please register or sign in to reply