Skip to content

Commit

Permalink
Merge pull request #1567 from /issues/1520
Browse files Browse the repository at this point in the history
HfNotes Component optimization done
  • Loading branch information
Vishwas1 authored Aug 16, 2022
2 parents 685b117 + 81badb5 commit 1cf7959
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 15 deletions.
32 changes: 32 additions & 0 deletions src/components/elements/HfNotes.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<p
class="my-4 border rounded-lg p-2 modal-text"
v-html="notes"
:style="backroundThemeCss"
>
{{ notes }}
</p>
</template>

<script>
import config from "../../config"
export default {
props: {
notes: String,
},
computed:{
backroundThemeCss(){
return{
'--modal-bg-text': config.app.headerBGColor,
}
},
}
};
</script>

<style>
.modal-text {
font-size: 12px;
background-color:var(--modal-bg-text);
}
</style>
9 changes: 9 additions & 0 deletions src/utils/messages/admin/Notes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const LOTTERY_NOTES=`<b>Lottery</b> is the process of selecting winners of an event. Upon
clicking on "<b>Execute button</b>", the lottery process begins, which
may take sometime and screen may freeze. Once done, you will get
selected records in excel sheet. The winner selection is primarly based
on their "<b>score</b>" unless checked "<b>randomly</b>".`

module.exports={
LOTTERY_NOTES
}
20 changes: 5 additions & 15 deletions src/views/admin/Participants.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ label {
background-color: var(--button-bg-color);;
margin: 1px 0;
}
.modal-text {
font-size: 12px;
}
.projectSelector {
min-width: 220px;
max-width: 220px;
Expand Down Expand Up @@ -114,16 +111,7 @@ label {
></loading>

<b-modal hide-footer id="modal-1" title="Lottery">
<p
class="my-4 border rounded-lg p-2 modal-text"
style="background: #f0f9ff"
>
<b>Lottery</b> is the process of selecting winners of an event. Upon
clicking on "<b>Execute button</b>", the lottery process begins, which
may take sometime and screen may freeze. Once done, you will get
selected records in excel sheet. The winner selection is primarly based
on their "<b>score</b>" unless checked "<b>randomly</b>".
</p>
<hf-notes :notes="notes"></hf-notes>
<div class="d-flex mx-auto justify-content-between px-4">
<div class="bold">Total Records</div>
<div class="bold">{{ project.count }}</div>
Expand Down Expand Up @@ -259,10 +247,11 @@ import FileDownload from "js-file-download";
const issuedImgLink = require("../../assets/issued-icon.png");
import Messages from "../../utils/messages/admin/en";
import eventBus from "../../eventBus";
import HfNotes from '../../components/elements/HfNotes.vue';
const {LOTTERY_NOTES} = require("../../utils/messages/admin/Notes");
export default {
name: "Investor",
components: { Loading, Paginate },
components: { Loading, Paginate, HfNotes },
computed:{
buttonThemeCss() {
return {
Expand Down Expand Up @@ -403,6 +392,7 @@ computed:{
accessToken: localStorage.getItem("accessToken"),
isLoading: false,
fullPage: true,
notes:LOTTERY_NOTES
};
},
Expand Down

0 comments on commit 1cf7959

Please sign in to comment.