|
@ -18,17 +18,20 @@ |
|
|
type="text" |
|
|
type="text" |
|
|
placeholder="First Name" |
|
|
placeholder="First Name" |
|
|
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2" |
|
|
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2" |
|
|
|
|
|
v-model="firstName" |
|
|
/> |
|
|
/> |
|
|
<input |
|
|
<input |
|
|
type="text" |
|
|
type="text" |
|
|
placeholder="Last Name" |
|
|
placeholder="Last Name" |
|
|
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2" |
|
|
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2" |
|
|
|
|
|
v-model="lastName" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<div class="mt-8"> |
|
|
<div class="mt-8"> |
|
|
<button |
|
|
<button |
|
|
type="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" |
|
|
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 |
|
|
Save Changes |
|
|
</button> |
|
|
</button> |
|
@ -36,6 +39,7 @@ |
|
|
<button |
|
|
<button |
|
|
type="button" |
|
|
type="button" |
|
|
class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md" |
|
|
class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md" |
|
|
|
|
|
@click="onClickCancel()" |
|
|
> |
|
|
> |
|
|
Cancel |
|
|
Cancel |
|
|
</button> |
|
|
</button> |
|
@ -50,5 +54,27 @@ import { Options, Vue } from "vue-class-component"; |
|
|
@Options({ |
|
|
@Options({ |
|
|
components: {}, |
|
|
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> |
|
|
</script> |
|
|