Skip to content

Commit

Permalink
Merge pull request #160 from dbarzin/dev
Browse files Browse the repository at this point in the history
fix documents
  • Loading branch information
dbarzin authored Oct 9, 2024
2 parents 4e9e543 + ec5da01 commit dd63a3f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
4 changes: 3 additions & 1 deletion app/Http/Controllers/ControlController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,9 @@ public function template()
$templateProcessor = new PhpWordTemplateProcessor($template_filename);

// Replace names
$templateProcessor->setValue('ref', $control->clause);
$clauses = $control->measures->map(function($measure) { return $measure->clause; })->implode(", ");

$templateProcessor->setValue('ref', $clauses);
$templateProcessor->setValue('name', $control->name);
$templateProcessor->setValue('scope', $control->scope);
$templateProcessor->setValue('attributes', $control->attributes);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"laravel/tinker": "^2.9",
"laravel/ui": "^4.5",
"maatwebsite/excel": "^3.1",
"phpoffice/phpword": "^1.1.0"
"phpoffice/phpword": "^1.3"
},
"require-dev": {
"fakerphp/faker": "^1.23",
Expand Down
20 changes: 12 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified storage/app/models/control.docx
Binary file not shown.

0 comments on commit dd63a3f

Please sign in to comment.