Skip to content

Commit 245ed5b

Browse files
author
Jicheng Lu
committed
add search name box
1 parent 2dbf61e commit 245ed5b

4 files changed

Lines changed: 18 additions & 3 deletions

File tree

src/lib/common/Select.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@
373373
>
374374
<Input
375375
type="text"
376+
name={'select-display-text'}
376377
class={`clickable ${disabled ? 'disabled' : ''}`}
377378
value={displayText}
378379
placeholder={placeholder}
@@ -392,6 +393,7 @@
392393
</div>
393394
<Input
394395
type="text"
396+
name={'select-search-text'}
395397
value={searchValue}
396398
placeholder={searchPlaceholder}
397399
on:input={e => changeSearchValue(e)}
@@ -411,6 +413,7 @@
411413
<div class="line-align-center select-box">
412414
<Input
413415
type="checkbox"
416+
name={'select-select-all'}
414417
style="pointer-events: none;"
415418
checked={selectAllChecked}
416419
readonly
@@ -448,6 +451,7 @@
448451
{#if multiSelect}
449452
<Input
450453
type="checkbox"
454+
name={`select-checkbox-${option.value}`}
451455
style="pointer-events: none;"
452456
checked={option.checked}
453457
readonly

src/lib/scss/custom/pages/_agent.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
gap: 8px;
3030

3131
> * {
32-
width: 100%;
32+
width: 100% !important;
3333
}
3434
}
3535
}

src/routes/page/agent/+page.svelte

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { goto } from '$app/navigation';
55
import Swal from 'sweetalert2';
66
import { page } from '$app/stores';
7-
import { Button, Col, Row } from '@sveltestrap/sveltestrap';
7+
import { Button, Col, Input, Row } from '@sveltestrap/sveltestrap';
88
import Breadcrumb from '$lib/common/Breadcrumb.svelte';
99
import HeadTitle from '$lib/common/HeadTitle.svelte';
1010
import LoadingToComplete from '$lib/common/LoadingToComplete.svelte';
@@ -281,6 +281,13 @@
281281
{/if}
282282
</div>
283283
<div class="agent-filter">
284+
<Input
285+
type="text"
286+
placeholder="Search by name"
287+
style="width: fit-content;"
288+
value={filter.similarName}
289+
on:input={e => filter.similarName = e.target.value?.trim()}
290+
/>
284291
<Select
285292
tag={'agent-label-select'}
286293
placeholder={'Select labels'}

src/routes/page/conversation/+page.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020
import LoadingToComplete from '$lib/common/LoadingToComplete.svelte';
2121
import Select from '$lib/common/Select.svelte';
2222
import { getAgentOptions } from '$lib/services/agent-service';
23-
import { getConversations, deleteConversation, getConversationStateSearchKeys } from '$lib/services/conversation-service.js';
2423
import { utcToLocal } from '$lib/helpers/datetime';
2524
import { ConversationChannel, TimeRange } from '$lib/helpers/enums';
2625
import { TIME_RANGE_OPTIONS } from '$lib/helpers/constants';
26+
import {
27+
getConversations,
28+
deleteConversation,
29+
getConversationStateSearchKeys
30+
} from '$lib/services/conversation-service.js';
2731
import {
2832
getPagingQueryParams,
2933
setUrlQueryParams,

0 commit comments

Comments
 (0)