Skip to content

Commit

Permalink
chore(caluma): update caluma schema
Browse files Browse the repository at this point in the history
  • Loading branch information
anehx committed Apr 7, 2022
1 parent 4a6c67b commit 45e7c69
Show file tree
Hide file tree
Showing 4 changed files with 1,355 additions and 899 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
- dbdata:/var/lib/postgresql/data

caluma:
image: ghcr.io/projectcaluma/caluma:7.15.0
image: ghcr.io/projectcaluma/caluma:8.0.0-beta.3
ports:
- "8000:8000"
depends_on:
Expand Down
49 changes: 26 additions & 23 deletions packages/core/addon/-private/possible-types.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,31 @@
export default {
Node: [
"Workflow",
"Form",
"Document",
"Case",
"WorkItem",
"Flow",
"DynamicOption",
"Option",
Question: [
"TextQuestion",
"StringAnswer",
"ChoiceQuestion",
"MultipleChoiceQuestion",
"ListAnswer",
"DynamicChoiceQuestion",
"DynamicMultipleChoiceQuestion",
"TextareaQuestion",
"FloatQuestion",
"FloatAnswer",
"IntegerQuestion",
"IntegerAnswer",
"DateQuestion",
"DateAnswer",
"TableQuestion",
"TableAnswer",
"FormQuestion",
"FileQuestion",
"StaticQuestion",
"FileAnswer",
"File",
"CalculatedFloatQuestion",
"ActionButtonQuestion",
"SimpleTask",
"CompleteWorkflowFormTask",
"CompleteTaskFormTask",
],
Task: ["SimpleTask", "CompleteWorkflowFormTask", "CompleteTaskFormTask"],
Question: [
Node: [
"TextQuestion",
"Form",
"Document",
"Case",
"Workflow",
"Flow",
"WorkItem",
"ChoiceQuestion",
"Option",
"MultipleChoiceQuestion",
"DynamicChoiceQuestion",
"DynamicMultipleChoiceQuestion",
Expand All @@ -50,17 +37,33 @@ export default {
"FormQuestion",
"FileQuestion",
"StaticQuestion",
"StringAnswer",
"ListAnswer",
"IntegerAnswer",
"FloatAnswer",
"DateAnswer",
"TableAnswer",
"FileAnswer",
"File",
"CalculatedFloatQuestion",
"ActionButtonQuestion",
"SimpleTask",
"CompleteWorkflowFormTask",
"CompleteTaskFormTask",
"AnalyticsTable",
"AvailableField",
"AnalyticsField",
"DynamicOption",
],
Answer: [
"StringAnswer",
"ListAnswer",
"FloatAnswer",
"IntegerAnswer",
"FloatAnswer",
"DateAnswer",
"TableAnswer",
"FileAnswer",
],
Task: ["SimpleTask", "CompleteWorkflowFormTask", "CompleteTaskFormTask"],
DynamicQuestion: ["DynamicChoiceQuestion", "DynamicMultipleChoiceQuestion"],
};
4 changes: 2 additions & 2 deletions packages/testing/addon/mirage-graphql/filters/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class BaseFilter {
return filters.map(({ key, value, options = {} }) => {
const fn = this[key];

return typeof fn === "function"
return typeof fn === "function" && ![null, undefined].includes(value)
? (records) => fn.call(this, records, value, options)
: (records) => records;
});
Expand All @@ -53,7 +53,7 @@ export default class BaseFilter {
}

filter(records, filters) {
return this._getFilterFns(filters.filter ?? filters).reduce(
return this._getFilterFns(filters?.filter ?? filters ?? []).reduce(
(recs, fn) => fn(recs),
this.sort(records, filters?.order)
);
Expand Down
Loading

0 comments on commit 45e7c69

Please sign in to comment.