-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcruddy_crm.html
72 lines (72 loc) · 2.74 KB
/
cruddy_crm.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<html>
<head>
<!-- Generated by @jspm/generator VSCode Extension - https://github.com/jspm/jspm-vscode -->
<script async src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymous"></script>
<script type="importmap">
{
"imports": {
"@launchscout/live-template": "https://ga.jspm.io/npm:@launchscout/[email protected]/index.js"
},
"scopes": {
"https://ga.jspm.io/": {
"json-joy/esm/json-patch": "https://ga.jspm.io/npm:[email protected]/esm/json-patch/index.js",
"phoenix": "https://ga.jspm.io/npm:[email protected]/priv/static/phoenix.mjs",
"phx-live-state": "https://ga.jspm.io/npm:[email protected]/build/src/index.js",
"process": "https://ga.jspm.io/npm:@jspm/[email protected]/nodelibs/browser/process.js",
"reflect-metadata": "https://ga.jspm.io/npm:[email protected]/Reflect.js",
"sprae": "https://ga.jspm.io/npm:[email protected]/sprae.js",
"subscript": "https://ga.jspm.io/npm:[email protected]/subscript.js",
"swapdom/deflate": "https://ga.jspm.io/npm:[email protected]/deflate.js",
"wc-context": "https://ga.jspm.io/npm:[email protected]/core.js"
}
}
}
</script>
<script type="module">
import '@launchscout/live-template'
</script>
</head>
<body>
<live-template url="ws://localhost:4000/live_state" topic="people:all">
<table>
<thead>
<tr>
<th>Last name</th>
<th>First name</th>
<th>Birth date</th>
<th></th>
</tr>
</thead>
<tbody>
<tr :each="person in people">
<td :text="person.last_name"></td>
<td :text="person.first_name"></td>
<td :text="person.birth_date"></td>
<td><button :data-id="person.id" :sendclick="edit-person">Edit</button></td>
</tr>
</tbody>
</table>
<button :sendclick="add-person">Add Person</button>
<dialog :open="editing">
<form :sendsubmit="save-person">
<div>
<label>First Name</label>
<input name="first_name" :value="person.first_name" />
<span :text="errors.first_name"></span>
</div>
<div>
<label>Last Name</label>
<input name="last_name" :value="person.last_name" />
<span :text="errors.last_name"></span>
</div>
<div>
<label>Birth Date</label>
<input name="birth_date" type="date" :value="person.birth_date" />
<span :text="errors.birth_date"></span>
</div>
<button type="submit">Save Person</button>
</form>
</dialog>
</live-template>
</body>
</html>