Skip to content

Commit

Permalink
Merge pull request #83 from Aletheia-Data/development
Browse files Browse the repository at this point in the history
release v1.2.3
  • Loading branch information
EnzoVezzaro authored May 14, 2022
2 parents 7786068 + a22b325 commit 0cebf52
Show file tree
Hide file tree
Showing 25 changed files with 1,832 additions and 785 deletions.
2 changes: 1 addition & 1 deletion .eslintcache

Large diffs are not rendered by default.

77 changes: 38 additions & 39 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
{
"env": {
"es6": true,
"browser": true,
"node": true
"es6": true,
"browser": true,
"node": true
},
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"eslint:recommended"
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"eslint:recommended"
],
"overrides": [ { "files": ["*.ts"], "rules": { "no-undef": "off" } } ],
"overrides": [{ "files": ["*.ts"], "rules": { "no-undef": "off" } }],
"settings": {
"react": {
"version": "detect"
}
"react": {
"version": "detect"
}
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
"rules": {
// react
"react/prop-types": "off",
Expand All @@ -48,10 +46,7 @@
"allowNamespace": false
}
],
"react/jsx-fragments": [
"error",
"syntax"
],
"react/jsx-fragments": ["error", "syntax"],
"react/jsx-curly-brace-presence": [
"error",
{
Expand All @@ -70,13 +65,13 @@
],
// typescript
"no-undef": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/consistent-type-definitions": [
"@typescript-eslint/no-unused-vars": [
"error",
"interface"
{ "argsIgnorePattern": "^_" }
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
// eslint
"camelcase": "error",
"use-isnan": "error",
Expand All @@ -96,12 +91,16 @@
"initialized": "never"
}
],
"prefer-destructuring": ["error", {
"array": true,
"object": true
}, {
"enforceForRenamedProperties": false
}],
"prefer-destructuring": [
"error",
{
"array": true,
"object": true
},
{
"enforceForRenamedProperties": false
}
],
"padding-line-between-statements": [
"error",
{
Expand All @@ -125,5 +124,5 @@
"next": "if"
}
]
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "App-Aletheia-data",
"version": "1.2.1",
"version": "1.2.3",
"homepage": "/",
"repository": {
"type": "git",
Expand Down
16 changes: 16 additions & 0 deletions src/_start/assets/sass/core/components/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@
box-shadow: $card-box-shadow;
border: 0;

&.no-margin > .card-header{
margin: 0;
}

&.no-padding > .card-header{
padding: 0;
}

&.no-padding > .card-header{
padding: 0;
}

&.no-padding > .card-body{
padding: 0;
}

// Header
> .card-header {
display: flex;
Expand Down
9 changes: 9 additions & 0 deletions src/_start/helpers/ValidateURL.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const validURL = (str: string) => {
let url_string;
try {
url_string = new URL(str);
} catch (_) {
return false;
}
return url_string.protocol === "http:" || url_string.protocol === "https:" ;
}
2 changes: 1 addition & 1 deletion src/_start/layout/components/header/Topbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from "react";
import { Ktsvg, truncate } from "../../../helpers";
import { Ktsvg, truncate } from "../../../helpers";
import {
HeaderNotificationsMenu,
SearchModal,
Expand Down
40 changes: 26 additions & 14 deletions src/_start/partials/components/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ interface Props {
tableHeaderProps?: TableCellProps;
cardClassName?: string;
connectionLength?: number;
hideButton?: boolean;
hideCount?: boolean;
}

// TODO: Add use of react tables to manage table by hooks
Expand All @@ -33,6 +35,8 @@ const Table: FC<Props> = ({
tableHeaderProps,
cardClassName = "",
connectionLength = 0,
hideButton,
hideCount
}) => {
// constants
const cellsCount = useMemo(() => columns?.[0]?.cells?.length ?? 0, [columns]);
Expand All @@ -51,24 +55,32 @@ const Table: FC<Props> = ({
const hasRows = Boolean(rows.length);
const entityCount = connectionLength || rows.length;

console.log(hideButton);

return (
<div className={`card ${cardClassName}`}>
{/* begin::Header */}
<div className="card-header border-0 py-5">
<h3 className="card-title align-items-start flex-column">
{title ? (
<span className="card-label fw-bolder text-dark">{title}</span>
) : null}
<span className="text-muted mt-3 fw-bold fs-7">
{`${entityCount} elementos registrados`}
</span>
</h3>
<div className="card-toolbar">
<a className="btn btn-primary fw-bolder fs-7 disabled" href="#">
Subir Archivo
</a>
{
!hideCount &&
<div className="card-header border-0 py-5">
<h3 className="card-title align-items-start flex-column">
{title ? (
<span className="card-label fw-bolder text-dark">{title}</span>
) : null}
<span className="text-muted mt-3 fw-bold fs-7">
{`${entityCount} elementos registrados`}
</span>
</h3>
{
!hideButton &&
<div className="card-toolbar">
<a className="btn btn-primary fw-bolder fs-7 disabled" href="#">
Subir Archivo
</a>
</div>
}
</div>
</div>
}
{/* end::Header*/}
<div className="card-body py-0">
<div className="table-responsive">
Expand Down
14 changes: 8 additions & 6 deletions src/_start/partials/components/Timeline/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
import React from "react";
import { Ktsvg } from "../../../helpers";
import { Ktsvg, truncate } from "../../../helpers";
import { Dropdown1 } from "../../content/dropdown/Dropdown1";
import gql from "graphql-tag";
import { useQuery } from "@apollo/react-hooks";
Expand Down Expand Up @@ -168,11 +168,11 @@ const Timeline: React.FC<Props> = ({ className }) => {
let badge_color;
switch (item.status) {
case "in_progress":
message = `importando ${docs} documentos desde `;
message = `importando ${docs} ${docs === 1 ? 'documento' : 'documentos'}`;
badge_color = `text-warning`;
break;
case "done":
message = `${docs} documentos importados desde `;
message = `${docs} ${docs === 1 ? 'documento importado' : 'documentos importados'}`;
badge_color = `color-xls`;
break;
default:
Expand All @@ -199,9 +199,11 @@ const Timeline: React.FC<Props> = ({ className }) => {
{/* begin::Content */}
<div className="timeline-content d-flex">
<span className="fw-bolder text-gray-800 ps-3">
{`${message}`}
<a href={`${item.source}`} target="_blank">
source
{`${message}`} <br />
<a href={`${item.source}`} target="#">
{
`${truncate(`${item.wallet}`, 15)}`
}
</a>
</span>
</div>
Expand Down
Loading

0 comments on commit 0cebf52

Please sign in to comment.