Skip to content

Commit

Permalink
emits showbutton to false on previousstep
Browse files Browse the repository at this point in the history
  • Loading branch information
capetillo committed Nov 20, 2024
1 parent bf9856c commit 66e437a
Showing 1 changed file with 2 additions and 121 deletions.
123 changes: 2 additions & 121 deletions src/components/Scheduling/BeginnerScheduling.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ const nextStep = () => {
}
const previousStep = () => {
if (loading.value === true) {
loading.value = false
}
loading.value = false
emits('showButton', false)
if (currentStep.value > 1) currentStep.value -= 1
// Handles specific cases for going back: when user goes from a selected target to seeing the 3 targets
if (currentStep.value === 4) {
Expand Down Expand Up @@ -256,124 +255,6 @@ const handleExposuresUpdate = (exposures) => {
</script>
<!-- <template>
<template v-if="loading">
<v-progress-circular indeterminate color="white" class="loading" />
</template>
<div class="container">
<div v-if="!dateRange || currentStep === 1">
<ProposalDropdown @selectionsComplete="(proposal) => { selectedProposal = proposal; nextStep() }" />
</div>
<Calendar v-if="selectedProposal && currentStep === 2" @updateDateRange="handleDateRangeUpdate" />
<div v-if="currentStep === 3 && categories && categories.length > 0" class="content">
<h2>Schedule an Observation</h2>
<p>What do you want to take pictures of?</p>
<div v-for="category in categories" :key="category.location" class="content">
<h4>{{ category.location }}</h4>
<div class="buttons">
<button
v-for="option in category.options"
:key="option.object"
@click="handleObjectSelection(option)"
class="button"
>
{{ option.object }}
</button>
</div>
</div>
</div>
<div v-if="objectSelection.targets && currentStep === 4">
<h3>Requesting an Observation of a <span class="blue">{{ objectSelection.object }}</span></h3>
<div class="columns is-column-gap-3">
<div v-for="target in displayedTargets" :key="target.name" @click="handleTargetSelection(target)" class="column"
>
<div class="card target-highlight is-clickable">
<header class="card-header">
<p class="card-header-title">{{ target.name }}</p>
</header>
<div class="card-content">
<div class="content">{{ target.desc }}</div>
</div>
</div>
</div>
</div>
<button class="button" @click="resetSelections">Different targets</button>
<button class="button" @click="shuffleTargets">Shuffle Targets</button>
<button class="button" v-if="totalLoaded < selectedTargets.length && totalLoaded < 15" @click="loadMoreTargets">Load More Targets</button>
</div>
<div v-if="currentStep === 5">
<div v-if="targetSelected || (objectSelected && !objectSelection.targets)" class="content">
<h2>
Requesting an observation of
<span v-if="objectSelection.targets"> a </span>
<span class="selection blue">
{{ objectSelection.object }}
<span v-if="objectSelection.targets"> - {{ targetSelection.name }}</span>
</span>
</h2>
<p>How do you want to set up your observation?</p>
<div class="field is-grouped">
<p class="control">
<button class="button" @click="letMeChoose">Let Me Choose</button>
</p>
<p class="control">
<button class="button" @click="useDefaults">I'm OK with Defaults</button>
</p>
</div>
<button class="button" @click="resetSelections">Different targets</button>
</div>
<div v-if="beginner === true && (targetSelected || (objectSelected && !objectSelection.targets))" class="grey-bg content px-2 py-2">
<h4>Photon Ranch will schedule this for you</h4>
<div class="columns">
<div class="column is-half">
<span class="icon-text">
<span class="icon is-large">
<FontAwesomeIcon icon="fa-solid fa-gear" class="blue fa-2xl" />
</span>
<span>Any 0.35m telescope</span>
</span>
<p></p>
<span class="icon-text">
<span class="icon is-large">
<FontAwesomeIcon icon="fa-solid fa-calendar-days" class="blue fa-2xl" />
</span>
<span>Between {{ startDate }} and {{ endDate }}</span>
</span>
</div>
<div class="column">
<span class="icon-text">
<span class="icon is-large">
<FontAwesomeIcon icon="fa-solid fa-sliders" class="blue fa-2xl" />
</span>
<span class="icon-text-list">
<ul>
<li>{{ exposureSettings.length }} color images</li>
<li v-for="(setting, index) in exposureSettings" :key="index">
{{ setting.exposureTime }}s with {{ setting.filter }} filter
</li>
</ul>
</span>
</span>
</div>
</div>
</div>
<div
v-if="beginner === false && (targetSelected || (objectSelected && !objectSelection.targets))"
class="grey-bg content px-2 py-2"
>
<SchedulingSettings
:show-project-field="false"
:show-title-field="false"
:target="targetSelection?.name"
@exposuresUpdated="handleExposuresUpdate"
/>
</div>
</div>
</div>
<div v-if="currentStep > 1" class="navigation-buttons">
<button @click="previousStep" class="button">Back</button>
</div>
</template> -->
<template>
<template v-if="loading">
<v-progress-circular indeterminate color="white" class="loading" />
Expand Down

0 comments on commit 66e437a

Please sign in to comment.