|
@ -78,7 +78,7 @@ |
|
|
|
|
|
|
|
|
<div class="h-7 mt-4 flex"> |
|
|
<div class="h-7 mt-4 flex"> |
|
|
<input |
|
|
<input |
|
|
v-if="!givenToUser" |
|
|
v-if="projectId && !givenToUser" |
|
|
type="checkbox" |
|
|
type="checkbox" |
|
|
class="h-6 w-6 mr-2" |
|
|
class="h-6 w-6 mr-2" |
|
|
v-model="givenToProject" |
|
|
v-model="givenToProject" |
|
@ -87,11 +87,15 @@ |
|
|
v-else |
|
|
v-else |
|
|
icon="square" |
|
|
icon="square" |
|
|
class="bg-slate-500 text-slate-500 h-5 w-5 px-0.5 py-0.5 mr-2 rounded" |
|
|
class="bg-slate-500 text-slate-500 h-5 w-5 px-0.5 py-0.5 mr-2 rounded" |
|
|
@click=" |
|
|
@click="notifyUserOfProject()" |
|
|
notifyUser('Cannot be both given to you and also given to a project.') |
|
|
|
|
|
" |
|
|
|
|
|
/> |
|
|
/> |
|
|
<label class="text-sm mt-1">This was given to {{ projectName }}</label> |
|
|
<label class="text-sm mt-1"> |
|
|
|
|
|
{{ |
|
|
|
|
|
projectId |
|
|
|
|
|
? "This was given to " + projectName |
|
|
|
|
|
: "No project was chosen" |
|
|
|
|
|
}} |
|
|
|
|
|
</label> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="h-7 mt-4 flex"> |
|
|
<div class="h-7 mt-4 flex"> |
|
@ -106,7 +110,7 @@ |
|
|
icon="square" |
|
|
icon="square" |
|
|
class="bg-slate-500 text-slate-500 h-5 w-5 px-0.5 py-0.5 mr-2 rounded" |
|
|
class="bg-slate-500 text-slate-500 h-5 w-5 px-0.5 py-0.5 mr-2 rounded" |
|
|
@click=" |
|
|
@click=" |
|
|
notifyUser('Cannot be both given to a project and also given to you.') |
|
|
notifyUser('You cannot assign this both a project and also to you.') |
|
|
" |
|
|
" |
|
|
/> |
|
|
/> |
|
|
<label class="text-sm mt-1">This was given to you</label> |
|
|
<label class="text-sm mt-1">This was given to you</label> |
|
@ -114,7 +118,7 @@ |
|
|
|
|
|
|
|
|
<div class="mt-4 flex"> |
|
|
<div class="mt-4 flex"> |
|
|
<input type="checkbox" class="h-6 w-6 mr-2" v-model="isTrade" /> |
|
|
<input type="checkbox" class="h-6 w-6 mr-2" v-model="isTrade" /> |
|
|
<label class="text-sm mt-1">Trade (not a gift)</label> |
|
|
<label class="text-sm mt-1">This is a trade (not a gift)</label> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<p class="text-center mb-2 mt-6 italic"> |
|
|
<p class="text-center mb-2 mt-6 italic"> |
|
@ -450,6 +454,31 @@ export default class GiftedDetails extends Vue { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
notifyUserOfProject() { |
|
|
|
|
|
if (!this.projectId) { |
|
|
|
|
|
this.$notify( |
|
|
|
|
|
{ |
|
|
|
|
|
group: "alert", |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
title: "Error", |
|
|
|
|
|
text: "To assign to a project, you must open this dialog through a project.", |
|
|
|
|
|
}, |
|
|
|
|
|
3000, |
|
|
|
|
|
); |
|
|
|
|
|
} else { |
|
|
|
|
|
// must be because givenToUser is true |
|
|
|
|
|
this.$notify( |
|
|
|
|
|
{ |
|
|
|
|
|
group: "alert", |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
title: "Error", |
|
|
|
|
|
text: "You cannot assign both to a project and to yourself.", |
|
|
|
|
|
}, |
|
|
|
|
|
3000, |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* |
|
|
* |
|
|
* @param giverDid may be null |
|
|
* @param giverDid may be null |
|
|