Skip to content

Commit

Permalink
Rename summary.options.filter to instanceNameFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmeister committed Aug 23, 2024
1 parent a6578ee commit 4c919fc
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/print/config/SummaryConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@input="$emit('input')"
/>
<e-text-field
v-model="options.filter"
v-model="options.instanceNameFilter"
:label="$tc('components.print.config.summaryConfig.instanceNameFilter')"
:filled="false"
clearable
Expand Down
2 changes: 1 addition & 1 deletion pdf/src/campPrint/summary/Summary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:id="id"
:period="period"
:content-type="content.options.contentType"
:filter="content.options.filter ?? ''"
:instance-name-filter="content.options.instanceNameFilter ?? ''"
/>
</Page>
</template>
Expand Down
8 changes: 4 additions & 4 deletions pdf/src/campPrint/summary/SummaryDay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
period: { type: Object, required: true },
day: { type: Object, required: true },
contentType: { type: String, required: true },
filter: { type: String, default: '' },
instanceNameFilter: { type: String, default: '' },
},
computed: {
date() {
Expand All @@ -58,12 +58,12 @@ export default {
contentNode.root()._meta.self ===
scheduleEntry.activity().rootContentNode()._meta.self &&

Check failure on line 59 in pdf/src/campPrint/summary/SummaryDay.vue

View workflow job for this annotation

GitHub Actions / Lint: ClientPrint (ESLint)

Insert `··`
!isEmptyHtml(contentNode.data.html) &&
(!this.filter || contentNode.instanceName
(!this.instanceNameFilter || contentNode.instanceName

Check failure on line 61 in pdf/src/campPrint/summary/SummaryDay.vue

View workflow job for this annotation

GitHub Actions / Lint: ClientPrint (ESLint)

Insert `⏎···············`
?.toLowerCase()
.includes(this.filter.toLowerCase()) ||
.includes(this.instanceNameFilter.toLowerCase()) ||
this.$tc(`contentNode.${camelCase(this.contentType)}.name`)
.toLowerCase()
.includes(this.filter.toLowerCase()))
.includes(this.instanceNameFilter.toLowerCase()))
)
.map((chapter) => ({
...chapter,
Expand Down
8 changes: 4 additions & 4 deletions pdf/src/campPrint/summary/SummaryPeriod.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
$tc('print.summary.title') +

Check failure on line 6 in pdf/src/campPrint/summary/SummaryPeriod.vue

View workflow job for this annotation

GitHub Actions / Lint: ClientPrint (ESLint)

Translation key `print.summary.title` should start with `campPrint.summary.summaryPeriod.`, based on file path `campPrint/summary/SummaryPeriod`
' ' +
translatedContentNode +
(filter ? ` '${filter}'` : '') +
(instanceNameFilter ? ` '${instanceNameFilter}'` : '') +
': ' +
period.description,
fit: true,
}"
class="summary-period-title"
>{{ $tc('print.summary.title') }} {{ translatedContentNode

Check failure on line 15 in pdf/src/campPrint/summary/SummaryPeriod.vue

View workflow job for this annotation

GitHub Actions / Lint: ClientPrint (ESLint)

Translation key `print.summary.title` should start with `campPrint.summary.summaryPeriod.`, based on file path `campPrint/summary/SummaryPeriod`
}}<template v-if="filter"> "{{ filter }}"</template>: {{ period.description }}</Text
}}<template v-if="instanceNameFilter"> "{{ instanceNameFilter }}"</template>: {{ period.description }}</Text

Check failure on line 16 in pdf/src/campPrint/summary/SummaryPeriod.vue

View workflow job for this annotation

GitHub Actions / Lint: ClientPrint (ESLint)

Insert `⏎···`
>
<SummaryDay
v-for="day in days"
:id="id"
:period="period"
:day="day"
:content-type="contentType"
:filter="filter"
:instance-name-filter="instanceNameFilter"
/>
</template>
<script>
Expand All @@ -38,7 +38,7 @@ export default {
props: {

Check warning on line 38 in pdf/src/campPrint/summary/SummaryPeriod.vue

View workflow job for this annotation

GitHub Actions / Lint: ClientPrint (ESLint)

The "props" property should be above the "methods" property on line 35
period: { type: Object, required: true },
contentType: { type: String, required: true },
filter: { type: String, default: '' },
instanceNameFilter: { type: String, default: '' },
},
computed: {

Check warning on line 43 in pdf/src/campPrint/summary/SummaryPeriod.vue

View workflow job for this annotation

GitHub Actions / Lint: ClientPrint (ESLint)

The "computed" property should be above the "methods" property on line 35
days() {
Expand Down
2 changes: 1 addition & 1 deletion pdf/src/campPrint/tableOfContents/entry/Summary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Text
>{{ $tc('print.summary.title') }}

Check failure on line 4 in pdf/src/campPrint/tableOfContents/entry/Summary.vue

View workflow job for this annotation

GitHub Actions / Lint: ClientPrint (ESLint)

Translation key `print.summary.title` should start with `campPrint.tableOfContents.entry.summary.`, based on file path `campPrint/tableOfContents/entry/Summary`
{{ $tc(`contentNode.${camelCase(entry.options.contentType)}.name`)
}}<template v-if="entry.options.filter"> "{{ entry.options.filter }}"</template>:
}}<template v-if="entry.options.instanceNameFilter"> "{{ entry.options.instanceNameFilter }}"</template>:

Check failure on line 6 in pdf/src/campPrint/tableOfContents/entry/Summary.vue

View workflow job for this annotation

GitHub Actions / Lint: ClientPrint (ESLint)

Replace `·"{{·entry.options.instanceNameFilter·}}"</template>:` with `⏎········"{{·entry.options.instanceNameFilter·}}"</template`
{{ period.description }}</Text

Check failure on line 7 in pdf/src/campPrint/tableOfContents/entry/Summary.vue

View workflow job for this annotation

GitHub Actions / Lint: ClientPrint (ESLint)

Insert `·>:`
>
</Link>
Expand Down
4 changes: 3 additions & 1 deletion print/components/Toc/TocSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<div class="toc-element-level-1">
{{ $t('print.summary.title') }}
{{ $t(`contentNode.${camelCase(options.contentType)}.name`)
}}<template v-if="options.filter"> "{{ options.filter }}"</template>
}}<template v-if="options.instanceNameFilter">
"{{ options.instanceNameFilter }}"</template
>
</div>
<ul>
<generic-error-message v-if="error" :error="error" />
Expand Down
2 changes: 1 addition & 1 deletion print/components/config/Summary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:camp="camp"
:index="index"
:content-type="options.contentType"
:filter="options.filter"
:instance-name-filter="options.instanceNameFilter"
/>
</div>
</template>
Expand Down
8 changes: 4 additions & 4 deletions print/components/summary/SummaryDay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default {
index: { type: Number, required: true },
allContentNodes: { type: Array, required: true },
contentType: { type: String, required: true },
filter: { type: String, default: '' },
instanceNameFilter: { type: String, default: '' },
},
computed: {
// returns scheduleEntries of current day without the need for an additional API call
Expand All @@ -90,13 +90,13 @@ export default {
contentNode.root()._meta.self ===
scheduleEntry.activity().rootContentNode()._meta.self &&
!isEmptyHtml(contentNode.data.html) &&
(!this.filter ||
(!this.instanceNameFilter ||
contentNode.instanceName
?.toLowerCase()
.includes(this.filter.toLowerCase()) ||
.includes(this.instanceNameFilter.toLowerCase()) ||
this.$t(`contentNode.${camelCase(this.contentType)}.name`)
.toLowerCase()
.includes(this.filter.toLowerCase()))
.includes(this.instanceNameFilter.toLowerCase()))
),
}))
},
Expand Down
6 changes: 3 additions & 3 deletions print/components/summary/SummaryPeriod.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
>
{{ $t('print.summary.title') }}
{{ $t(`contentNode.${camelCase(contentType)}.name`)
}}<template v-if="filter"> "{{ filter }}"</template>:
}}<template v-if="instanceNameFilter"> "{{ instanceNameFilter }}"</template>:
{{ period.description }}
</h1>

Expand All @@ -18,7 +18,7 @@
:day="day"
:all-content-nodes="data.contentNodes"
:content-type="contentType"
:filter="filter"
:instance-name-filter="instanceNameFilter"
/>
</div>
</template>
Expand All @@ -34,7 +34,7 @@ const props = defineProps({
},
index: { type: Number, required: true },
contentType: { type: String, default: 'Storycontext' },
filter: { type: String, default: '' },
instanceNameFilter: { type: String, default: '' },
})
const { $api } = useNuxtApp()
Expand Down

0 comments on commit 4c919fc

Please sign in to comment.