Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/FOUR-9486: IT6 Default Welcome Screens #1453

Merged
merged 44 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
3ea4fa4
FOUR-9512:HOME - MY REQUEST - MY TASK: Create a new component to sup…
fagubla Oct 6, 2023
082e3c0
remove comments
fagubla Oct 6, 2023
bca5bde
FOUR-9486: Observations
pmPaulis Oct 9, 2023
0092098
Merge branch 'feature/FOUR-9486' into feature/FOUR-9512
pmPaulis Oct 9, 2023
986b43c
CI errors
fagubla Oct 9, 2023
a38c08d
Merge pull request #1452 from ProcessMaker/feature/FOUR-9512
pmPaulis Oct 9, 2023
0010828
FOUR-11020:HOME - START NEW REQUEST: Create a new component to suppor…
fagubla Oct 9, 2023
dc81207
Merge pull request #1454 from ProcessMaker/feature/FOUR-11020
pmPaulis Oct 10, 2023
2abf7f4
Saving changes 1
CarliPinell Oct 10, 2023
67104a4
Ready to PR
CarliPinell Oct 10, 2023
5d5dc3b
FOUR-9656:Home: Task and Request does not have the order by enable
fagubla Oct 10, 2023
e462fae
Adding FOUR-10338 functionality
CarliPinell Oct 10, 2023
848b2a6
Merge pull request #1457 from ProcessMaker/feature/FOUR-9656
pmPaulis Oct 10, 2023
91bbc68
Observations solved
CarliPinell Oct 11, 2023
ba95c86
Solving SonarQube observations
CarliPinell Oct 11, 2023
de3c7f4
Merge pull request #1456 from ProcessMaker/feature/FOUR-10042
pmPaulis Oct 11, 2023
c452e7a
FOUR-9506:My task needs to apply the same filter to TASK
fagubla Oct 11, 2023
4708ecb
Merge pull request #1459 from ProcessMaker/feature/FOUR-9506
pmPaulis Oct 11, 2023
e88a6d8
Saving work
CarliPinell Oct 11, 2023
b84b815
Saving changes
CarliPinell Oct 12, 2023
4862b6c
adding functionality of ticket FOUR-10363
CarliPinell Oct 12, 2023
0d48051
adding translations
CarliPinell Oct 12, 2023
d167740
Merge branch 'next' into feature/FOUR-9486
pmPaulis Oct 12, 2023
d33badb
Observations Solved
CarliPinell Oct 12, 2023
e746d6b
Making improvements
CarliPinell Oct 12, 2023
d9af8c1
Merge branch 'feature/FOUR-9486' of github.com:ProcessMaker/screen-bu…
CarliPinell Oct 12, 2023
5f88a94
Removing comments
CarliPinell Oct 12, 2023
2316032
FOUR-10454:Home: No Results message
fagubla Oct 12, 2023
e1406e3
Merge pull request #1461 from ProcessMaker/feature/FOUR-10336
pmPaulis Oct 12, 2023
17138fc
Merge pull request #1462 from ProcessMaker/feature/FOUR-10454
pmPaulis Oct 12, 2023
228877b
Merge branch 'next' into feature/FOUR-9486
pmPaulis Oct 13, 2023
6122bcf
Ready to PR
CarliPinell Oct 13, 2023
4649436
Merge branch 'feature/FOUR-9486' of github.com:ProcessMaker/screen-bu…
CarliPinell Oct 13, 2023
ef520ad
Making adjustments
CarliPinell Oct 13, 2023
c3089bd
Refactoring combined filters
CarliPinell Oct 13, 2023
dabf72a
Merge pull request #1463 from ProcessMaker/feature/FOUR-10340
pmPaulis Oct 13, 2023
a05a1b3
feature/FOUR-10857
luNunezProcessmaker Oct 16, 2023
16882f7
Ready to PR
CarliPinell Oct 16, 2023
6e4d6ed
Ready to PR removing comments
CarliPinell Oct 16, 2023
ce279b8
feature/FOUR-10857
luNunezProcessmaker Oct 17, 2023
bc953d4
feature/FOUR-10857
luNunezProcessmaker Oct 17, 2023
1f50de4
Applying Prettier Rules on CS
CarliPinell Oct 17, 2023
6ad2113
Merge pull request #1464 from ProcessMaker/feature/FOUR-10857-B
pmPaulis Oct 17, 2023
aaf7472
Merge pull request #1465 from ProcessMaker/feature/FOUR-10337
pmPaulis Oct 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/assets/table_empty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/components/index.js
100755 → 100644
Empty file.
Empty file modified src/components/inspector/index.js
100755 → 100644
Empty file.
22 changes: 22 additions & 0 deletions src/components/renderer/avatar-dropdown.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<template>
<b-dropdown-item>
<b-avatar
:variant="variant"
size="1.5rem"
:text="text"
class="text-white"
></b-avatar>
{{ label }}
</b-dropdown-item>
</template>

<script>
export default {
props: {
variant: String,
text: String,
label: String
}
};
</script>

157 changes: 157 additions & 0 deletions src/components/renderer/card.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
<template>
<div class="m-3 card-request">
<div v-for="event in emptyStartEvents" :key="event.id" class="card">
<div class="card-body">
<div class="d-flex justify-content-between">
<div>
<span v-uni-id="event.id.toString()">{{ transformedName }}</span>
<span v-if="process.startEvents.length > 1">
: {{ event.name }}
</span>
<a
href="#"
:aria-expanded="ariaExpanded"
:aria-controls="getComputedId(process)"
@click="showRequestDetails"
>
...
</a>
</div>
<div class="text-right">
<button
v-uni-aria-describedby="event.id.toString()"
:href="getNewRequestLinkHref(process, event)"
class="btn btn-primary btn-sm"
@click.prevent="newRequestLink(process, event)"
>
<i class="fas fa-caret-square-right mr-1"></i> {{ $t("Start") }}
</button>
</div>
</div>
<div
v-if="showdetail"
:id="getComputedId(process)"
:aria-hidden="ariaHidden"
>
<hr />
<p class="card-text text-muted">{{ process.description }}</p>
</div>
</div>
</div>
</div>
</template>

<script>
import { createUniqIdsMixin } from "vue-uniq-ids";

const uniqIdsMixin = createUniqIdsMixin();

export default {
mixins: [uniqIdsMixin],
props: ["name", "description", "filter", "id", "process"],
data() {
return {
disabled: false,
spin: 0,
showtip: true,
showdetail: false
};
},
computed: {
ariaHidden() {
return this.showdetail ? "false" : "true";
},
ariaExpanded() {
return this.showdetail ? "true" : "false";
},
emptyStartEvents() {
return this.process.startEvents.filter(
(event) =>
!event.eventDefinitions || event.eventDefinitions.length === 0
);
},
transformedName() {
return this.process.name.replace(
new RegExp(this.filter, "gi"),
(match) => {
return match;
}
);
},
truncatedDescription() {
if (!this.process.description) {
return `<span class="text-primary"></span>`;
}

let result = "";
const wordArray = this.process.description.split(" ");

// Number of maximum characters we want for our description
const maxLength = 100;
let word = null;

while ((word = wordArray.shift())) {
if (result.length + word.length + 1 <= maxLength) {
result = `${result} ${word}`;
}
}

return result.replace(new RegExp(this.filter, "gi"), (match) => {
return `<span class="text-primary"> ${match} </span>`;
});
}
},
methods: {
newRequestLink(process, event) {
if (this.disabled) return;
this.disabled = true;

// Start a process
this.spin = `${process.id}.${event.id}`;
const startEventId = event.id;

window.ProcessMaker.apiClient
.post(`/process_events/${this.process.id}?event=${startEventId}`)
.then((response) => {
this.spin = 0;
const instance = response.data;
if (this.$cookies.get("isMobile")) {
window.location = `/requests/mobile/${instance.id}?fromRedirect=true`;
} else {
window.location = `/requests/${instance.id}?fromRedirect=true`;
}
})
.catch((err) => {
this.disabled = false;
const { data } = err.response;
if (data.message) {
ProcessMaker.alert(data.message, "danger");
}
});
},
showRequestDetails(id) {
if (this.showdetail === false) {
this.showdetail = true;
} else {
this.showdetail = false;
}
},
getNewRequestLinkHref(process, event) {
const { id } = process;
const startEventId = event.id;
return `/process_events/${id}?event=${startEventId}`;
},
getComputedId(process) {
return `process-${process.id}`;
}
}
};
</script>

<style scoped>
.card-request {
width: 45%;
min-width: 40%;
max-width: 50%;
}
</style>
39 changes: 39 additions & 0 deletions src/components/renderer/form-empty-table.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<template>
<div class="container content">
<img src="../../assets/table_empty.svg" alt="empty table" />
<span class="title">
{{ $t(title) }}
</span>
<b-link :href="url">
{{ linkText }}
</b-link>
</div>
</template>

<script>
export default {
props:["title", "link", "url"],
data() {
const linkText = `View All ${this.link}`;
return {
linkText
};
}
};
</script>

<style scoped>
.content {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.title {
font-size: 32px;
font-style: normal;
font-weight: 600;
line-height: 38px;
letter-spacing: -1.28px;
}
</style>
Loading
Loading