Alerts page icons
This commit is contained in:
parent
7e9625ecf3
commit
013886a2ff
|
|
@ -4,6 +4,7 @@ import { DataTable } from '@/components/DataTable'
|
||||||
import { useState } from 'preact/hooks'
|
import { useState } from 'preact/hooks'
|
||||||
import { useMutation, useQuery } from 'react-query'
|
import { useMutation, useQuery } from 'react-query'
|
||||||
import { AlertFormModal } from './components/AlertFormModal'
|
import { AlertFormModal } from './components/AlertFormModal'
|
||||||
|
import { EditIcon, PlusIcon, RefreshIcon } from '@/icons'
|
||||||
|
|
||||||
export const AlertsTable = () => {
|
export const AlertsTable = () => {
|
||||||
const alerts = useQuery('/alerts', () => getAlerts())
|
const alerts = useQuery('/alerts', () => getAlerts())
|
||||||
|
|
@ -23,8 +24,14 @@ export const AlertsTable = () => {
|
||||||
<div className="alerts">
|
<div className="alerts">
|
||||||
<div className="section-title">
|
<div className="section-title">
|
||||||
<h2>Alerts</h2>
|
<h2>Alerts</h2>
|
||||||
<button onClick={() => alerts.refetch()}>Refresh</button>
|
<div>
|
||||||
<button onClick={() => setShowNew(true)}>Add alert</button>
|
<button onClick={() => alerts.refetch()}>
|
||||||
|
<RefreshIcon /> Refresh
|
||||||
|
</button>{' '}
|
||||||
|
<button onClick={() => setShowNew(true)}>
|
||||||
|
<PlusIcon /> Add alert
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="box-shadow">
|
<div className="box-shadow">
|
||||||
|
|
@ -45,7 +52,9 @@ export const AlertsTable = () => {
|
||||||
className: 'actions',
|
className: 'actions',
|
||||||
render: (c) => (
|
render: (c) => (
|
||||||
<div>
|
<div>
|
||||||
<button onClick={() => setEdited(c)}>Edit</button>
|
<button onClick={() => setEdited(c)}>
|
||||||
|
<EditIcon /> Edit
|
||||||
|
</button>{' '}
|
||||||
<button onClick={() => setShowDelete(c)}>Delete</button>
|
<button onClick={() => setShowDelete(c)}>Delete</button>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import { useMutation, useQuery } from 'react-query'
|
||||||
import { ContactPointFormModal } from './components/ContactPointFormModal'
|
import { ContactPointFormModal } from './components/ContactPointFormModal'
|
||||||
import { DataTable } from '@/components/DataTable'
|
import { DataTable } from '@/components/DataTable'
|
||||||
import { ConfirmModal } from '@/components/ConfirmModal'
|
import { ConfirmModal } from '@/components/ConfirmModal'
|
||||||
|
import { PlusIcon } from '@/icons'
|
||||||
|
|
||||||
export const ContactPointsTable = () => {
|
export const ContactPointsTable = () => {
|
||||||
const contactPoints = useQuery('/contact-points', () => getContactPoints())
|
const contactPoints = useQuery('/contact-points', () => getContactPoints())
|
||||||
|
|
@ -27,7 +28,9 @@ export const ContactPointsTable = () => {
|
||||||
<div className="contact-points">
|
<div className="contact-points">
|
||||||
<div className="section-title">
|
<div className="section-title">
|
||||||
<h2>Contact Points</h2>
|
<h2>Contact Points</h2>
|
||||||
<button onClick={() => setShowNew(true)}>Add contact point</button>
|
<button onClick={() => setShowNew(true)}>
|
||||||
|
<PlusIcon /> Add contact point
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="box-shadow">
|
<div className="box-shadow">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue