General work through out the day. Lots of interruptions from the dogs.
This commit is contained in:
@@ -131,13 +131,21 @@ $: if (trigger == 'load__ds__code' && ds_code && ds_type) {
|
||||
});
|
||||
}
|
||||
|
||||
async function load_data_store({
|
||||
async function load_data_store(
|
||||
{
|
||||
code,
|
||||
type='text',
|
||||
for_type=null,
|
||||
for_id=null,
|
||||
try_cache=true
|
||||
}) {
|
||||
}: {
|
||||
code: string,
|
||||
type: string,
|
||||
for_type: string|null,
|
||||
for_id: string|null,
|
||||
try_cache: boolean
|
||||
}
|
||||
) {
|
||||
|
||||
// let ds_code_val = await api.get_data_store_obj_w_code({
|
||||
ds_get_results = api.get_data_store_obj_w_code({
|
||||
@@ -145,6 +153,7 @@ async function load_data_store({
|
||||
data_store_code: code,
|
||||
data_type: type,
|
||||
log_lvl: 1
|
||||
|
||||
})
|
||||
.then( function (ds_results) {
|
||||
// console.log(`ae_ Data Store ${code} = `, ds_results);
|
||||
@@ -210,18 +219,18 @@ async function load_data_store({
|
||||
}
|
||||
|
||||
|
||||
async function handle_submit_form(event) {
|
||||
console.log('*** handle_submit_form() ***');
|
||||
async function handle_submit_form(event: any) {
|
||||
// console.log('*** handle_submit_form() ***');
|
||||
|
||||
$ae_sess.ds.submit_status = 'processing';
|
||||
|
||||
|
||||
// Data in
|
||||
let form_data = new FormData(event.target);
|
||||
console.log(form_data);
|
||||
// console.log(form_data);
|
||||
|
||||
let data_store_di: key_val = ae_util.extract_prefixed_form_data({prefix: null, form_data: form_data, trim_values: true, bool_tf_str: true, log_lvl: 0});
|
||||
console.log(data_store_di);
|
||||
// console.log(data_store_di);
|
||||
|
||||
// Data out
|
||||
let data_store_do: key_val = {};
|
||||
@@ -423,7 +432,7 @@ async function handle_update__data_store({
|
||||
obj_id: obj_id,
|
||||
fields: data,
|
||||
key: $ae_api.api_crud_super_key,
|
||||
log_lvl: 2
|
||||
log_lvl: 1
|
||||
})
|
||||
.then(async function (update__obj_result) {
|
||||
if (!update__obj_result) {
|
||||
|
||||
Reference in New Issue
Block a user