Skip to content

Commit

Permalink
Merge pull request #830 from IATI/report-page
Browse files Browse the repository at this point in the history
Restoring some previous styles
  • Loading branch information
tillywoodfield authored Dec 17, 2024
2 parents 1e9919d + 600f480 commit fb77507
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 16 deletions.
6 changes: 5 additions & 1 deletion src/components/AppAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@

<template>
<div v-auto-animate class="w-full">
<button class="relative flex w-full items-center space-x-3" :aria-expanded="isOpen" @click="toggleAccordion()">
<button
class="relative flex w-full items-center space-x-3 p-0 border-none"
:aria-expanded="isOpen"
@click="toggleAccordion()"
>
<slot name="title" />

<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppAlert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
</script>

<template>
<div class="border-l-[6px] bg-slate-100 p-3" :class="borderColour"><slot /></div>
<div class="border-solid border-0 border-l-[6px] bg-slate-100 p-3" :class="borderColour"><slot /></div>
</template>
2 changes: 1 addition & 1 deletion src/components/organisation/DocumentList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { getSortDirection, getSortValue, sortDocuments, sortOptions } from "../../utils";
import DocumentListItem from "./DocumentListItem.vue";
const headerClassNames = "hidden border-y border-solid border-gray-300 p-2.5 font-bold sm:block";
const headerClassNames = "hidden border-0 border-y border-solid border-gray-300 p-2.5 font-bold sm:block";
const props = defineProps({
documents: { type: Object, default: () => {} },
sortvariable: { type: String, default: "" },
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisation/DocumentListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<template>
<div
class="flex flex-col gap-0 border-t border-solid border-gray-300 odd:bg-white even:bg-slate-100 sm:grid sm:grid-cols-5 sm:border-0"
class="flex flex-col gap-0 border border-b-0 border-solid border-gray-300 odd:bg-white even:bg-slate-100 sm:grid sm:grid-cols-5 sm:border-0"
:class="{
'hover:bg-gray-200': !hasProperLink(props.document),
'cursor-pointer': !hasProperLink(props.document),
Expand Down
2 changes: 1 addition & 1 deletion src/components/report/ActivityErrors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</div>
</template>
<template #content>
<div class="border border-gray-200 p-4">
<div class="border border-solid border-gray-200 p-4">
<FeedbackGroup v-for="activity in pageData" :key="activity.identifier" :activity="activity" />
<AppPagination v-if="filteredData.length > 10" @next="onNext" @previous="onPrevious">
<span class="text-sm">Page {{ page }} of {{ Math.ceil(filteredData.length / PAGE_LIMIT) }}</span>
Expand Down
7 changes: 6 additions & 1 deletion src/components/report/DocumentInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@
<div>
<span>IATI version: {{ props.report.iatiVersion }}</span>
<span> | Type: {{ props.report.fileType }}</span>
<span> | <button @click="downloadCSV()">Download Validation Report CSV</button></span>
<span>
|
<button class="bg-transparent border-none underline p-0 m-0" @click="downloadCSV()">
Download Validation Report CSV
</button>
</span>
</div>
<h2 :class="validationStatusClass">{{ validationStatus.caption }}</h2>
</template>
2 changes: 1 addition & 1 deletion src/components/report/FileErrors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
</template>
<template #content>
<div class="border border-gray-200 p-4">
<div class="border border-solid border-gray-200 p-4">
<AppAlert v-if="!messages.length" variant="success">
<span>
Congratulations! This IATI {{ props.fileType }} file has successfully passed IATI XML schema validation!
Expand Down
10 changes: 5 additions & 5 deletions src/components/report/ReportDocumentStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
<template>
<div
v-if="props.document"
class="flex flex-col gap-0 border-t border-solid border-gray-300 odd:bg-white even:bg-slate-100 sm:grid sm:grid-cols-5 sm:border-0"
class="flex flex-col gap-0 border border-solid border-gray-300 odd:bg-white even:bg-slate-100 sm:grid sm:grid-cols-5 sm:border-0"
>
<div class="py-2 pb-2 first:pl-3.5" :class="textClasses">
<p class="text-base font-bold sm:hidden">File Name</p>
<div class="text-base font-bold sm:hidden">File Name</div>
<a
v-if="hasProperLink(props.document)"
:href="props.document.url"
Expand All @@ -55,11 +55,11 @@
<span v-else>{{ fileName }}</span>
</div>
<div class="pl-3.5 pt-0 pb-2 sm:py-2" :class="textClasses">
<p class="text-base font-bold sm:hidden">Identified in Registry</p>
<div class="text-base font-bold sm:hidden">Identified in Registry</div>
<span>{{ formatDate(props.document.modified || props.document.first_seen) }}</span>
</div>
<div class="pt-0 pb-2 pl-3.5 sm:py-2" :class="textClasses">
<p class="text-base font-bold sm:hidden">Validated</p>
<div class="text-base font-bold sm:hidden">Validated</div>
<span v-if="validationDate">{{ validationDate }}</span>
<span v-else>{{ getDocumentDownloadStatus(props.document) }}</span>
</div>
Expand All @@ -68,7 +68,7 @@
<span :class="validationStatusClass" class="text-base">{{ validationStatus.caption }}</span>
</div>
<div class="pt-0 pb-2 pl-3.5 sm:py-2" :class="textClasses">
<p class="text-base font-bold sm:hidden">Availability in Datastore</p>
<div class="text-base font-bold sm:hidden">Availability in Datastore</div>
{{ datastoreAvailability }}
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/OrganisationPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@
</span>
<span v-if="!reportsLoading">
|
<button @click="downloadCSV()">Download Validation Report CSV</button>
<button class="bg-transparent border-none underline p-0 m-0" @click="downloadCSV()">
Download Validation Report CSV
</button>
</span>
</div>
<div v-if="documents && documents.length" class="flex flex-col sm:mt-0 sm:flex-row">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ReportPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
!isTestFile ? getDocumentURL(route.params?.name) : null,
() => fetchDocument(route.params.name),
);
const headerClassNames = "hidden border-b border-solid border-gray-300 p-2.5 font-bold sm:block";
const headerClassNames = "hidden border-0 border-y border-solid border-gray-300 p-2.5 font-bold sm:block";
const { data: organisation, error: organisationError } = useSWRV(
() => document.value && getOrganisationURL(document.value.publisher, "id"),
Expand Down
4 changes: 2 additions & 2 deletions src/pages/ValidationResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
}
};
const headerClassNames = "hidden border-b border-solid border-gray-300 p-2.5 font-bold sm:block";
const headerClassNames = "hidden border-0 border-b border-solid border-gray-300 p-2.5 font-bold sm:block";
const textClasses =
"overflow-hidden text-ellipsis whitespace-nowrap hover:overflow-visible hover:whitespace-normal text-tiny";
</script>
Expand Down Expand Up @@ -146,7 +146,7 @@
</div>
</div>
<div v-if="workspaceData.length" class="flex gap-2">
<div v-if="workspaceData.length" class="flex gap-2 mt-2">
<button class="iati-button" @click="onAddMoreFiles">Add more files</button>
<button class="iati-button" @click="onClearWorkspace">Clear workspace</button>
</div>
Expand Down

0 comments on commit fb77507

Please sign in to comment.