|
|
@@ -137,6 +137,15 @@
|
|
|
@click="goToProposalFlow"
|
|
|
/>
|
|
|
|
|
|
+ <q-btn
|
|
|
+ flat
|
|
|
+ rounded
|
|
|
+ no-caps
|
|
|
+ class="refuse-btn"
|
|
|
+ label="Recusar oportunidade"
|
|
|
+ @click="openRefuseDialog"
|
|
|
+/>
|
|
|
+
|
|
|
<!-- ALERTA -->
|
|
|
<div class="alert-box">
|
|
|
<q-icon
|
|
|
@@ -159,10 +168,9 @@ import { ref, onMounted } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { useDialogPluginComponent } from 'quasar'
|
|
|
import { userStore } from 'src/stores/user'
|
|
|
-import {
|
|
|
- getOpportunityById,
|
|
|
- proposalOpportunity
|
|
|
-} from 'src/api/opportunities'
|
|
|
+import {getOpportunityById,proposalOpportunity} from 'src/api/opportunities'
|
|
|
+import { Dialog } from 'quasar'
|
|
|
+import RefuseOpportunityDialog from './RefuseOpportunityDialog.vue'
|
|
|
|
|
|
const props = defineProps({
|
|
|
opportunityId: {
|
|
|
@@ -247,6 +255,25 @@ const goToProposalFlow = async () => {
|
|
|
onDialogOK()
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+//Dialo de recusar opotunidade
|
|
|
+const openRefuseDialog = () => {
|
|
|
+
|
|
|
+ Dialog.create({
|
|
|
+ component: RefuseOpportunityDialog,
|
|
|
+
|
|
|
+ componentProps: {
|
|
|
+ opportunityId: details.value.schedule_id,
|
|
|
+ providerId: user.user.provider.id
|
|
|
+ }
|
|
|
+ }).onOk(() => {
|
|
|
+
|
|
|
+ window.location.reload()
|
|
|
+
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
onMounted(async () => {
|
|
|
try {
|
|
|
const response = await getOpportunityById(
|
|
|
@@ -456,4 +483,24 @@ onMounted(async () => {
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
+
|
|
|
+.refuse-btn {
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+ height: 52px;
|
|
|
+
|
|
|
+ border-radius: 28px;
|
|
|
+
|
|
|
+ margin-top: 12px;
|
|
|
+
|
|
|
+ border: 1px solid #ff4d67;
|
|
|
+
|
|
|
+ color: #ff4d67;
|
|
|
+
|
|
|
+ font-weight: 600;
|
|
|
+
|
|
|
+ font-size: 15px;
|
|
|
+
|
|
|
+ background: white;
|
|
|
+}
|
|
|
</style>
|