Add a save dialog at the bottom of the screen that is present whenever there are unsaved changes. This dialog provides a diff between the client and server state so that the user can easily confirm the changes they are about to make are the correct changes before applying them to the server.
28 lines
574 B
Vue
28 lines
574 B
Vue
<template>
|
|
<div>
|
|
<h4>{{ state }} {{ location.name }}</h4>
|
|
<DiffFieldString
|
|
title="Name"
|
|
:before="location.serverName"
|
|
:after="location.name"
|
|
:state
|
|
/>
|
|
<DiffFieldString
|
|
title="Description"
|
|
:before="location.serverDescription"
|
|
:after="location.description"
|
|
:state
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
const props = defineProps<{
|
|
location: ClientScheduleLocation,
|
|
}>();
|
|
const state = computed(() => {
|
|
if (props.location.deleted) return "deleted";
|
|
if (props.location.isNew()) return "created";
|
|
return "modified";
|
|
});
|
|
</script>
|