Skip to content

Commit cc2f524

Browse files
Merge pull request #2332 from RitvikSardana/sidebar-fields-update
fix: add modelValue to data fields
2 parents 5efb530 + 85b6de4 commit cc2f524

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

desk/src/components/UniInput2.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
:key="field.fieldname"
1515
class="form-control"
1616
:placeholder="`Add ${field.label}`"
17-
:value="transValue"
17+
:model-value="transValue"
1818
autocomplete="off"
1919
v-on="
2020
textFields.includes(field.fieldtype)
@@ -38,10 +38,10 @@
3838
</template>
3939

4040
<script setup lang="ts">
41-
import { computed, h } from "vue";
4241
import { Autocomplete, Link } from "@/components";
43-
import { createResource, FormControl, Tooltip } from "frappe-ui";
4442
import { Field, FieldValue } from "@/types";
43+
import { createResource, FormControl, Tooltip } from "frappe-ui";
44+
import { computed, h } from "vue";
4545
4646
interface P {
4747
field: Field;

desk/src/components/ticket/TicketAgentSidebar.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
<div
44
class="flex h-10.5 items-center border-b px-5 py-2.5 text-lg font-medium text-ink-gray-9 justify-between"
55
>
6-
<span class="cursor-copy text-lg font-semibold" @click="copyToClipboard()"
6+
<span
7+
class="cursor-copy text-lg font-semibold"
8+
@click="copyToClipboard(`'${ticket.name}' copied to clipboard`)"
79
>#{{ ticket.name }}
810
</span>
911
<Dropdown

desk/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ export function formatTime(seconds) {
8585

8686
export const isCustomerPortal = ref(false);
8787

88-
export async function copyToClipboard() {
89-
let text = "Copied to clipboard";
88+
export async function copyToClipboard(msg: string = "") {
89+
let text = msg || "Copied to clipboard";
9090
if (navigator.clipboard && window.isSecureContext) {
9191
await navigator.clipboard.writeText(text);
9292
} else {

0 commit comments

Comments
 (0)