-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
244 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<template> | ||
<div class="switch-radio separate-bottom"> | ||
<template | ||
v-for="(item, index) in options.concat(addOption)"> | ||
<template v-if="filter(item)"> | ||
<input | ||
@click="$emit('input', item)" | ||
:value="item" | ||
:id="`switch-${name}-${index}`" | ||
:name="`switch-${name}-options`" | ||
type="radio" | ||
:checked="item === value" | ||
class="normal-input button-active" | ||
> | ||
<label | ||
:for="`switch-${name}-${index}`" | ||
class="capitalize">{{ item }} | ||
</label> | ||
</template> | ||
</template> | ||
</div> | ||
</template> | ||
<script> | ||
export default { | ||
props: { | ||
options: { | ||
type: Array, | ||
required: true | ||
}, | ||
value: { | ||
required: true | ||
}, | ||
addOption: { | ||
type: Array, | ||
required: false, | ||
default: () => { | ||
return [] | ||
} | ||
}, | ||
name: { | ||
type: String, | ||
required: true | ||
}, | ||
filter: { | ||
type: Function, | ||
default: () => { | ||
return true | ||
} | ||
} | ||
} | ||
} | ||
</script> |
18 changes: 18 additions & 0 deletions
18
app/javascript/vue/tasks/digitize/components/collectionEvent/components/GeographyLayout.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<div> | ||
<geography/> | ||
<elevation/> | ||
</div> | ||
</template> | ||
<script> | ||
import Geography from './geography/geography.vue' | ||
import Elevation from './geography/elevation.vue' | ||
export default { | ||
components: { | ||
Geography, | ||
Elevation | ||
} | ||
} | ||
</script> |
10 changes: 0 additions & 10 deletions
10
app/javascript/vue/tasks/digitize/components/collectionEvent/components/blockTwo.vue
This file was deleted.
Oops, something went wrong.
73 changes: 73 additions & 0 deletions
73
...vascript/vue/tasks/digitize/components/collectionEvent/components/geography/elevation.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<template> | ||
<div> | ||
<label>Elevation</label> | ||
<div> | ||
Minimun | ||
<input | ||
type="text" | ||
v-model="minimum_elevation"> | ||
</div> | ||
<div> | ||
Maximun | ||
<input | ||
type="text" | ||
v-model="maximum_elevation"> | ||
</div> | ||
<div> | ||
Precision | ||
<input | ||
type="text" | ||
v-model="elevation_precision"> | ||
</div> | ||
<div> | ||
Unit | ||
<label> | ||
<input | ||
type="radio" | ||
name="elevation"> | ||
Meters | ||
</label> | ||
<label> | ||
<input | ||
type="radio" | ||
name="elevation"> | ||
Feets | ||
</label> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { GetterNames } from '../../../../store/getters/getters.js' | ||
import { MutationNames } from '../../../../store/mutations/mutations.js' | ||
export default { | ||
computed: { | ||
minimum_elevation: { | ||
get() { | ||
return this.$store.getters[GetterNames.GetCollectionEvent].minimum_elevation | ||
}, | ||
set(value) { | ||
this.$store.commit(MutationNames.SetCollectionEventMinimumElevation, value) | ||
} | ||
}, | ||
maximum_elevation: { | ||
get() { | ||
return this.$store.getters[GetterNames.GetCollectionEvent].maximum_elevation | ||
}, | ||
set(value) { | ||
this.$store.commit(MutationNames.SetCollectionEventMaximumElevation, value) | ||
} | ||
}, | ||
elevation_precision: { | ||
get() { | ||
return this.$store.getters[GetterNames.GetCollectionEvent].elevation_precision | ||
}, | ||
set(value) { | ||
this.$store.commit(MutationNames.SetCollectionEventElevationPrecision, value) | ||
} | ||
} | ||
} | ||
} | ||
</script> |
26 changes: 26 additions & 0 deletions
26
...vascript/vue/tasks/digitize/components/collectionEvent/components/geography/geography.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<div> | ||
<h2>Geography</h2> | ||
<smart-selector | ||
name="geography" | ||
v-model="view" | ||
:options="tabs"/> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import SmartSelector from '../../../../../../components/switch.vue' | ||
export default { | ||
components: { | ||
SmartSelector | ||
}, | ||
data() { | ||
return { | ||
tabs: ['Quick', 'Look back', 'Search'], | ||
view: undefined | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
7 changes: 5 additions & 2 deletions
7
app/javascript/vue/tasks/digitize/components/collectionEvent/main.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
app/javascript/vue/tasks/digitize/store/getters/getCollectionEvent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function(state) { | ||
return state.collection_event | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.