-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsilly_crm.html
77 lines (74 loc) · 2.92 KB
/
silly_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
73
74
75
76
77
<html>
<script async src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymous"></script>
<script type="importmap">
{
"imports": {
"lit": "https://ga.jspm.io/npm:[email protected]/index.js",
"phx-live-state": "https://ga.jspm.io/npm:[email protected]/build/src/index.js",
"sprae": "https://ga.jspm.io/npm:[email protected]/sprae.js",
"wc-context": "https://ga.jspm.io/npm:[email protected]/core.js"
},
"scopes": {
"https://ga.jspm.io/": {
"@lit/reactive-element": "https://ga.jspm.io/npm:@lit/[email protected]/development/reactive-element.js",
"json-joy/esm/json-patch": "https://ga.jspm.io/npm:[email protected]/esm/json-patch/index.js",
"lit-element/lit-element.js": "https://ga.jspm.io/npm:[email protected]/development/lit-element.js",
"lit-html": "https://ga.jspm.io/npm:[email protected]/development/lit-html.js",
"lit-html/is-server.js": "https://ga.jspm.io/npm:[email protected]/development/is-server.js",
"phoenix": "https://ga.jspm.io/npm:[email protected]/priv/static/phoenix.mjs",
"process": "https://ga.jspm.io/npm:@jspm/[email protected]/nodelibs/browser/process.js",
"reflect-metadata": "https://ga.jspm.io/npm:[email protected]/Reflect.js",
"subscript": "https://ga.jspm.io/npm:[email protected]/subscript.js",
"subscript/justin": "https://ga.jspm.io/npm:[email protected]/justin.js",
"swapdom": "https://ga.jspm.io/npm:[email protected]/inflate.js",
"ulive": "https://ga.jspm.io/npm:[email protected]/dist/ulive.es.js"
}
}
}
</script>
<script type="module">
import './src/live-template.js';
import './simple-field.js';
</script>
</head>
<body>
<live-template url="ws://localhost:4000/live_state" topic="people:all">
<table>
<thead>
<tr>
<th><a :sendclick="sort" data-sort-key="last_name">Last name</a></th>
<th>First name</th>
</tr>
</thead>
<tbody>
<tr :each="person in people">
<td><a :sendclick="edit-person" :data-id="person.id" :text="person.last_name"></a></td>
<td :text="person.first_name"></td>
<td :text="person.birth_date"></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>Save</button>
</form>
</dialog>
</live-template>
</body>
</html>