Skip to content

Commit ab9b979

Browse files
authored
Merge pull request #93 from iceljc/features/refine-chat-window
refine agent page
2 parents eaf953c + 06b00f3 commit ab9b979

File tree

5 files changed

+38
-10
lines changed

5 files changed

+38
-10
lines changed

src/lib/common/LoadingToComplete.svelte

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,22 @@
1212
</script>
1313

1414
{#if isLoading}
15-
<Loader size={spinnerSize} />
15+
<Loader size={spinnerSize} />
1616
{/if}
1717

18+
1819
{#if isComplete}
19-
<Alert color="success">
20-
<div>{successText}</div>
21-
</Alert>
20+
<div class="alert-container">
21+
<Alert class="success">
22+
<div>{successText}</div>
23+
</Alert>
24+
</div>
2225
{/if}
2326

2427
{#if isError}
25-
<Alert color="danger">
26-
<div>{errorText}</div>
27-
</Alert>
28-
{/if}
28+
<div class="alert-container">
29+
<Alert class="error">
30+
<div>{errorText}</div>
31+
</Alert>
32+
</div>
33+
{/if}

src/lib/helpers/types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
* @property {string} fieldType
173173
* @property {boolean} required
174174
* @property {string} redirectTo
175-
* @property {string?} [redirectToAgentName]
175+
* @property {string?} [redirect_to_agent]
176176
*/
177177

178178
/**

src/lib/scss/app.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ File: Main Css File
3939
@import "custom/components/print";
4040
@import "custom/components/loader";
4141
@import "custom/components/chat";
42+
@import "custom/components/alert";
4243

4344
// Plugins
4445
@import "custom/plugins/custom-scrollbar";
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.alert-container {
2+
position: fixed;
3+
top: 10%;
4+
left: 35%;
5+
right: 35%;
6+
z-index: 8888;
7+
8+
.alert {
9+
color: white;
10+
text-align: center;
11+
}
12+
13+
.success {
14+
background-color: rgba(52, 195, 143, 0.9) !important;
15+
}
16+
17+
.error {
18+
background-color: rgba(244, 106, 106, 0.9) !important;
19+
}
20+
}

src/routes/page/agent/[agentId]/agent-routing.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@
2828
<div class="table-responsive rule-body">
2929
<Table>
3030
<tbody>
31+
{#if !!rule.field}
3132
<tr>
3233
<th class="agent-prop-key">Field</th>
3334
<td>{rule.field}</td>
3435
</tr>
36+
{/if}
3537
{#if !!rule.description}
3638
<tr>
3739
<th class="agent-prop-key">Description</th>
@@ -52,7 +54,7 @@
5254
<tr>
5355
<th class="agent-prop-key">Redirect to Agent</th>
5456
<td style="cursor: pointer;" on:click={() => redirectToAgent(rule.redirectTo)}>
55-
{rule.redirectToAgentName}
57+
{rule.redirect_to_agent || ''}
5658
</td>
5759
</tr>
5860
{/if}

0 commit comments

Comments
 (0)