Commit f0344e11 authored by Mark Harding's avatar Mark Harding
Browse files

(feat): helpdesk support position for categories

parent fe328ecf
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@ class Category
    /** @var string $branch */
    protected $branch;

    /** @var int $position */
    protected $position = 10;    
    
    protected $questions;

@@ -52,6 +54,7 @@ class Category
        $export['parent'] = $this->getParent() ? $this->getParent()->export() : null;
        $export['branch'] = $this->getBranch();
        $export['questions'] = $this->getQuestions() ? Factory::exportable($this->getQuestions()) : [];
        $export['position'] = $this->getPosition();

        return $export;
    }
+2 −1
Original line number Diff line number Diff line
@@ -59,7 +59,8 @@ class Repository
                $category->setUuid($row['uuid']->uuid())
                    ->setTitle($row['title'])
                    ->setParentUuid($row['parent'])
                    ->setBranch($row['branch']);
                    ->setBranch($row['branch'])
                    ->setPosition($row['position'] ?? 10);

                if ($opts['recursive']) {
                    if ($category->getParentUuid()) {
+1 −1

File changed.

Contains only whitespace changes.