Now with the ability to clone template entries
This commit is contained in:
@@ -14,12 +14,24 @@ export async function load_ae_obj_id__journal(
|
||||
api_cfg,
|
||||
journal_id,
|
||||
inc_entry_li = false,
|
||||
enabled = 'enabled',
|
||||
hidden = 'not_hidden',
|
||||
limit = 99,
|
||||
offset = 0,
|
||||
order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'},
|
||||
params = {},
|
||||
try_cache = true,
|
||||
log_lvl = 0
|
||||
}: {
|
||||
api_cfg: any,
|
||||
journal_id: string,
|
||||
inc_entry_li?: boolean,
|
||||
enabled?: string, // all, disabled, enabled
|
||||
hidden?: string, // all, hidden, not_hidden
|
||||
limit?: number,
|
||||
offset?: number,
|
||||
order_by_li?: key_val, // Order by fields for the journal entries
|
||||
params?: key_val,
|
||||
try_cache?: boolean,
|
||||
log_lvl?: number
|
||||
}
|
||||
@@ -28,8 +40,6 @@ export async function load_ae_obj_id__journal(
|
||||
console.log(`*** load_ae_obj_id__journal() *** journal_id=${journal_id}`);
|
||||
}
|
||||
|
||||
let params = {};
|
||||
|
||||
ae_promises.load__journal_obj = await api.get_ae_obj_id_crud({
|
||||
api_cfg: api_cfg,
|
||||
obj_type: 'journal',
|
||||
@@ -72,7 +82,12 @@ export async function load_ae_obj_id__journal(
|
||||
api_cfg: api_cfg,
|
||||
for_obj_type: 'journal',
|
||||
for_obj_id: journal_id,
|
||||
params: {qry__enabled: 'all', qry__limit: 99},
|
||||
enabled: enabled, // all, disabled, enabled
|
||||
hidden: hidden, // all, hidden, not_hidden
|
||||
limit: limit, // Limit for the entries
|
||||
offset: offset,
|
||||
order_by_li: order_by_li,
|
||||
params: params,
|
||||
try_cache: try_cache,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
@@ -180,6 +195,11 @@ export async function load_ae_obj_li__journal(
|
||||
api_cfg: api_cfg,
|
||||
for_obj_type: 'journal',
|
||||
for_obj_id: journal_id,
|
||||
enabled: enabled,
|
||||
hidden: hidden,
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
order_by_li: order_by_li,
|
||||
params: params,
|
||||
try_cache: try_cache,
|
||||
log_lvl: log_lvl
|
||||
@@ -532,6 +552,7 @@ export function db_save_ae_obj_li__journal(
|
||||
person_id: obj.person_id_random,
|
||||
|
||||
name: obj.name,
|
||||
short_name: obj.short_name,
|
||||
summary: obj.summary,
|
||||
outline: obj.outline,
|
||||
|
||||
@@ -549,9 +570,9 @@ export function db_save_ae_obj_li__journal(
|
||||
sort_by: obj.sort_by,
|
||||
sort_by_desc: obj.sort_by_desc,
|
||||
|
||||
cfg_json: obj.cfg_json,
|
||||
cfg_json: obj.cfg_json ?? {},
|
||||
|
||||
data_json: obj.data_json,
|
||||
data_json: obj.data_json ?? {},
|
||||
|
||||
// ux_mode: obj.ux_mode,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user