Whatever
This commit is contained in:
@@ -5,6 +5,8 @@ import { SetupHandle, SetSize, ResetPosition, Top, CreateChildWindow, GetFirstWi
|
||||
import WindowHandle from './partials/WindowHandle.vue';
|
||||
import VersionRender from '../partials/VersionRender.vue';
|
||||
import EditUserPartial from '../partials/EditUserPartial.vue';
|
||||
import CampaignEntry from '../partials/CampaignEntry.vue';
|
||||
import Server from '~/services/Server';
|
||||
|
||||
const handle = ref(null);
|
||||
const wrapper = ref(null);
|
||||
@@ -12,10 +14,20 @@ const wrapper = ref(null);
|
||||
const props = defineProps(['data']);
|
||||
const data = props.data;
|
||||
|
||||
const campaings = ref([]);
|
||||
|
||||
let id = data.id;
|
||||
|
||||
function CreateCampaignWindow(){
|
||||
CreateChildWindow(GetFirstWindowId('main_menu'), 'create_campaign', {
|
||||
CreateChildWindow(GetFirstWindowId('main_menu'), 'create_campaign');
|
||||
}
|
||||
|
||||
function RefreshCampaigns(){
|
||||
Server().get('/campaign/list').then((response) => {
|
||||
console.log(response.data);
|
||||
response.data.forEach((camp) => {
|
||||
campaings.value.push(camp.campaign);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -24,6 +36,8 @@ onMounted(() => {
|
||||
SetupHandle(id, handle);
|
||||
SetSize(id, {width: 580, height: 760});
|
||||
ResetPosition(id, "center");
|
||||
|
||||
RefreshCampaigns();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -37,13 +51,17 @@ onMounted(() => {
|
||||
<div class="vert-expand">
|
||||
<div class="vert top">
|
||||
<h1>{{ $t("main-menu.main-menu")}}</h1>
|
||||
|
||||
<!-- HERE -->
|
||||
<div class="campaign-list">
|
||||
<CampaignEntry v-for="camp in myCampaigns" :key="camp._id" :data="camp"></CampaignEntry>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="vert bot">
|
||||
<div class="button-container">
|
||||
<button class="btn-primary button-expand sound-click" v-on:click="CreateCampaignWindow" ref="campaignButton">{{ $t("main-menu.create-campaign") }}</button>
|
||||
</div>
|
||||
<VersionRender></VersionRender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user