|
|
@ -18,17 +18,20 @@ |
|
|
|
type="text" |
|
|
|
placeholder="First Name" |
|
|
|
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2" |
|
|
|
v-model="firstName" |
|
|
|
/> |
|
|
|
<input |
|
|
|
type="text" |
|
|
|
placeholder="Last Name" |
|
|
|
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2" |
|
|
|
v-model="lastName" |
|
|
|
/> |
|
|
|
|
|
|
|
<div class="mt-8"> |
|
|
|
<button |
|
|
|
type="button" |
|
|
|
class="block w-full text-center text-lg font-bold uppercase bg-blue-600 text-white px-2 py-3 rounded-md mb-2" |
|
|
|
@click="onClickSaveChanges()" |
|
|
|
> |
|
|
|
Save Changes |
|
|
|
</button> |
|
|
@ -36,6 +39,7 @@ |
|
|
|
<button |
|
|
|
type="button" |
|
|
|
class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md" |
|
|
|
@click="onClickCancel()" |
|
|
|
> |
|
|
|
Cancel |
|
|
|
</button> |
|
|
@ -50,5 +54,27 @@ import { Options, Vue } from "vue-class-component"; |
|
|
|
@Options({ |
|
|
|
components: {}, |
|
|
|
}) |
|
|
|
export default class NewEditAccountView extends Vue {} |
|
|
|
export default class NewEditAccountView extends Vue { |
|
|
|
firstName = |
|
|
|
localStorage.getItem("firstName") === null |
|
|
|
? "--" |
|
|
|
: localStorage.getItem("firstName"); |
|
|
|
lastName = |
|
|
|
localStorage.getItem("lastName") === null |
|
|
|
? "--" |
|
|
|
: localStorage.getItem("lastName"); |
|
|
|
|
|
|
|
onClickSaveChanges() { |
|
|
|
localStorage.setItem("firstName", this.firstName as string); |
|
|
|
localStorage.setItem("lastName", this.lastName as string); |
|
|
|
const route = { |
|
|
|
name: "account", |
|
|
|
}; |
|
|
|
this.$router.push(route); |
|
|
|
} |
|
|
|
|
|
|
|
onClickCancel() { |
|
|
|
this.$router.back(); |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|