Skip to content

Commit

Permalink
Merge pull request #93 from iceljc/features/refine-chat-window
Browse files Browse the repository at this point in the history
refine agent page
  • Loading branch information
Oceania2018 authored Mar 25, 2024
2 parents eaf953c + 06b00f3 commit ab9b979
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 10 deletions.
21 changes: 13 additions & 8 deletions src/lib/common/LoadingToComplete.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,22 @@
</script>

{#if isLoading}
<Loader size={spinnerSize} />
<Loader size={spinnerSize} />
{/if}


{#if isComplete}
<Alert color="success">
<div>{successText}</div>
</Alert>
<div class="alert-container">
<Alert class="success">
<div>{successText}</div>
</Alert>
</div>
{/if}

{#if isError}
<Alert color="danger">
<div>{errorText}</div>
</Alert>
{/if}
<div class="alert-container">
<Alert class="error">
<div>{errorText}</div>
</Alert>
</div>
{/if}
2 changes: 1 addition & 1 deletion src/lib/helpers/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
* @property {string} fieldType
* @property {boolean} required
* @property {string} redirectTo
* @property {string?} [redirectToAgentName]
* @property {string?} [redirect_to_agent]
*/

/**
Expand Down
1 change: 1 addition & 0 deletions src/lib/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ File: Main Css File
@import "custom/components/print";
@import "custom/components/loader";
@import "custom/components/chat";
@import "custom/components/alert";

// Plugins
@import "custom/plugins/custom-scrollbar";
Expand Down
20 changes: 20 additions & 0 deletions src/lib/scss/custom/components/_alert.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.alert-container {
position: fixed;
top: 10%;
left: 35%;
right: 35%;
z-index: 8888;

.alert {
color: white;
text-align: center;
}

.success {
background-color: rgba(52, 195, 143, 0.9) !important;
}

.error {
background-color: rgba(244, 106, 106, 0.9) !important;
}
}
4 changes: 3 additions & 1 deletion src/routes/page/agent/[agentId]/agent-routing.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
<div class="table-responsive rule-body">
<Table>
<tbody>
{#if !!rule.field}
<tr>
<th class="agent-prop-key">Field</th>
<td>{rule.field}</td>
</tr>
{/if}
{#if !!rule.description}
<tr>
<th class="agent-prop-key">Description</th>
Expand All @@ -52,7 +54,7 @@
<tr>
<th class="agent-prop-key">Redirect to Agent</th>
<td style="cursor: pointer;" on:click={() => redirectToAgent(rule.redirectTo)}>
{rule.redirectToAgentName}
{rule.redirect_to_agent || ''}
</td>
</tr>
{/if}
Expand Down

0 comments on commit ab9b979

Please sign in to comment.