Skip to content

Commit

Permalink
Include 'unique_template_id' in the file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjacornelius committed Mar 1, 2024
1 parent 1cc15e6 commit c5abb82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/scripts/generate_index.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ function initializeTemplateStructure()
"description" => "",
"screen_type" => "",
'version' => "",
'unique_template_id'=> "",
],
"assets" => [
"thumbnail" => "",
Expand Down Expand Up @@ -180,12 +181,14 @@ function loadXmlAttributes($contentInfo, &$categories, $currentCategory, $templa
$description = (string) $xml->attributes()['description'];
$screenType = (string) $xml->attributes()['screen_type'];
$version = (string) $xml->attributes()['version'];
$uniqueTemplateId = (string) $xml->attributes()['unique_template_id'];


$categories[$currentCategory][$templateName]['template_details']['name'] = $name;
$categories[$currentCategory][$templateName]['template_details']['description'] = $description;
$categories[$currentCategory][$templateName]['template_details']['screen_type'] = $screenType;
$categories[$currentCategory][$templateName]['template_details']['version'] = $version;
$categories[$currentCategory][$templateName]['template_details']['unique_template_id'] = $uniqueTemplateId;
}

// You also need to define the compute_hash and update_readme functions if they are not already defined.
Expand Down
1 change: 1 addition & 0 deletions Accounting/Business Expense/screen-template-details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
description="Approve and Reject invoice using OCR"
screen_type="FORM"
version="1.0.0"
unique_template_id="test-screen-template"
></screen-template>

0 comments on commit c5abb82

Please sign in to comment.