newdevs:angularclient:basicadmin
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
newdevs:angularclient:basicadmin [2025/03/28 16:09] – fleshing vs. settings; IDL vs. Hash sleary | newdevs:angularclient:basicadmin [2025/04/02 15:59] (current) – syntax highlighting sleary | ||
---|---|---|---|
Line 16: | Line 16: | ||
To render a combobox, set that field' | To render a combobox, set that field' | ||
+ | <code html> | ||
| | ||
myFieldName1: | myFieldName1: | ||
| | ||
+ | </ | ||
To render a custom template (with optional context arguments), set: | To render a custom template (with optional context arguments), set: | ||
+ | <code html> | ||
| | ||
| | ||
| | ||
| | ||
+ | </ | ||
for example: | for example: | ||
+ | <code html> | ||
| | ||
event: {customTemplate: | event: {customTemplate: | ||
Line 45: | Line 49: | ||
</ | </ | ||
</ | </ | ||
+ | </ | ||
Always use: | Always use: | ||
Line 56: | Line 61: | ||
Use '' | Use '' | ||
+ | <code JavaScript> | ||
| | ||
+ | </ | ||
Use '' | Use '' | ||
+ | <code JavaScript> | ||
| | ||
+ | </ | ||
Use '' | Use '' | ||
+ | <code JavaScript> | ||
| | ||
for (const org of orgs) { | for (const org of orgs) { | ||
Line 71: | Line 79: | ||
} | } | ||
} ); | } ); | ||
+ | </ | ||
* Note that booleans are given as ''' | * Note that booleans are given as ''' | ||
Line 78: | Line 86: | ||
Record notes example: | Record notes example: | ||
+ | <code JavaScript [enable_line_numbers=" | ||
const where = { | const where = { | ||
record: this.recId, | record: this.recId, | ||
Line 103: | Line 112: | ||
complete: this.emitNoteCount | complete: this.emitNoteCount | ||
})); | })); | ||
+ | </ | ||
==== Fleshing ==== | ==== Fleshing ==== | ||
Line 115: | Line 124: | ||
Pcrud returns columns as functions: | Pcrud returns columns as functions: | ||
+ | <code JavaScript> | ||
| | ||
+ | </ | ||
To set a new value, pass the value as an argument: | To set a new value, pass the value as an argument: | ||
+ | <code JavaScript> | ||
| | ||
+ | </ | ||
The IDL service has a toHash() method that can make this easier to work with if all you're doing is reading data: | The IDL service has a toHash() method that can make this easier to work with if all you're doing is reading data: | ||
+ | <code JavaScript> | ||
idl.toHash(org_unit); | idl.toHash(org_unit); | ||
console.debug(" | console.debug(" | ||
+ | </ | ||
Note there is an option to flatten the data. | Note there is an option to flatten the data. | ||
Line 130: | Line 145: | ||
As of 3.15, there is also a way to go from a hash back to a proper IDL object: | As of 3.15, there is also a way to go from a hash back to a proper IDL object: | ||
+ | <code JavaScript> | ||
idl.fromHash(some_object, | idl.fromHash(some_object, | ||
+ | </ | ||
| | ||
The classname is the second argument. There is an optional third argument to convert booleans from ''' | The classname is the second argument. There is an optional third argument to convert booleans from ''' |
newdevs/angularclient/basicadmin.1743192550.txt.gz · Last modified: 2025/03/28 16:09 by sleary