Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
bfaac79e
Commit
bfaac79e
authored
Jul 20, 2022
by
unknown
Browse files
Merge branch 'master' of
https://github.com/antonioDurval/submeta
parents
ee31cc0d
5977d52f
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
bfaac79e
...
@@ -987,10 +987,9 @@ class TrabalhoController extends Controller
...
@@ -987,10 +987,9 @@ class TrabalhoController extends Controller
}
}
}
}
DB
::
commit
();
DB
::
commit
();
if
(
!
$request
->
has
(
'rascunho'
))
{
if
(
!
$request
->
has
(
'rascunho'
))
{
// SubmissaoNotification.php
Notification
::
send
(
Auth
::
user
(),
new
SubmissaoNotification
(
$id
,
$trabalho
->
titulo
));
Notification
::
send
(
Auth
::
user
(),
new
SubmissaoNotification
(
$id
,
$trabalho
->
titulo
));
}
}
return
redirect
(
route
(
'proponente.projetos'
))
->
with
([
'mensagem'
=>
'Proposta atualizada!'
]);
return
redirect
(
route
(
'proponente.projetos'
))
->
with
([
'mensagem'
=>
'Proposta atualizada!'
]);
...
@@ -1135,6 +1134,7 @@ class TrabalhoController extends Controller
...
@@ -1135,6 +1134,7 @@ class TrabalhoController extends Controller
'tipo'
=>
1
,
'tipo'
=>
1
,
]);
]);
$notificacao
->
save
();
$notificacao
->
save
();
// SubmissaoRecebidaNotification.php
Notification
::
send
(
$userTemp
,
new
SubmissaoRecebidaNotification
(
$trabalho
->
id
,
$trabalho
->
titulo
,
$userTemp
));
Notification
::
send
(
$userTemp
,
new
SubmissaoRecebidaNotification
(
$trabalho
->
id
,
$trabalho
->
titulo
,
$userTemp
));
//Proponente
//Proponente
$notificacao
=
App\Notificacao
::
create
([
$notificacao
=
App\Notificacao
::
create
([
...
@@ -1145,7 +1145,8 @@ class TrabalhoController extends Controller
...
@@ -1145,7 +1145,8 @@ class TrabalhoController extends Controller
'tipo'
=>
1
,
'tipo'
=>
1
,
]);
]);
$notificacao
->
save
();
$notificacao
->
save
();
Notification
::
send
(
Auth
::
user
(),
new
SubmissaoNotification
(
$trabalho
->
id
,
$trabalho
->
titulo
));
// submissao e notificação.php $trabalho->id,$trabalho->titulo
Notification
::
send
(
Auth
::
user
(),
new
SubmissaoNotification
(
$trabalho
));
return
redirect
(
route
(
'proponente.projetos'
))
->
with
([
'mensagem'
=>
'Proposta submetida!'
]);
return
redirect
(
route
(
'proponente.projetos'
))
->
with
([
'mensagem'
=>
'Proposta submetida!'
]);
...
@@ -1476,6 +1477,8 @@ class TrabalhoController extends Controller
...
@@ -1476,6 +1477,8 @@ class TrabalhoController extends Controller
}
}
$subject
=
"Participante de Projeto"
;
$subject
=
"Participante de Projeto"
;
$time
=
Carbon
::
today
(
'America/Recife'
);
$time
=
$time
->
isoFormat
(
'às H:mm, dddd, D/M/YYYY'
);
Mail
::
to
(
$email
)
Mail
::
to
(
$email
)
->
send
(
new
SubmissaoTrabalho
(
$userParticipante
,
$subject
,
$edital
,
$projeto
));
->
send
(
new
SubmissaoTrabalho
(
$userParticipante
,
$subject
,
$edital
,
$projeto
));
...
...
app/Notifications/SubmissaoNotification.php
View file @
bfaac79e
...
@@ -14,17 +14,19 @@ class SubmissaoNotification extends Notification
...
@@ -14,17 +14,19 @@ class SubmissaoNotification extends Notification
public
$data
;
public
$data
;
public
$url
;
public
$url
;
public
$natureza_id
;
/**
/**
* Create a new notification instance.
* Create a new notification instance.
*
*
* @return void
* @return void
*/
*/
public
function
__construct
(
$
id
,
$titul
o
)
public
function
__construct
(
$
trabalh
o
)
{
{
$this
->
data
=
date
(
'd/m/Y \à\s H:i\h'
,
strtotime
(
now
()));
$this
->
data
=
date
(
'd/m/Y \à\s H:i\h'
,
strtotime
(
now
()));
$url
=
"/projeto/visualizar/"
.
$id
;
$url
=
"/projeto/visualizar/"
.
$
trabalho
->
id
;
$this
->
url
=
url
(
$url
);
$this
->
url
=
url
(
$url
);
$this
->
titulo
=
$titulo
;
$this
->
titulo
=
$trabalho
->
titulo
;
$this
->
natureza_id
=
$trabalho
->
evento
->
natureza_id
;
}
}
/**
/**
...
@@ -50,7 +52,8 @@ class SubmissaoNotification extends Notification
...
@@ -50,7 +52,8 @@ class SubmissaoNotification extends Notification
return
(
new
MailMessage
)
return
(
new
MailMessage
)
->
subject
(
'Sistema Submeta - Submissão de proposta / projeto'
)
->
subject
(
'Sistema Submeta - Submissão de proposta / projeto'
)
->
greeting
(
"Saudações!"
)
->
greeting
(
"Saudações!"
)
->
line
(
"O sistema Submeta recebeu o envio de sua proposta / projeto intitulada(o)
{
$this
->
titulo
}
."
)
->
line
(
"O sistema Submeta recebeu o envio de sua proposta / projeto intitulada(o)
{
$this
->
titulo
}
\n\n
."
)
->
line
(
"
{
$this
->
data
}
"
)
->
action
(
'Acessar Proposta'
,
$this
->
url
)
->
action
(
'Acessar Proposta'
,
$this
->
url
)
->
markdown
(
'vendor.notifications.email'
);
->
markdown
(
'vendor.notifications.email'
);
}
}
...
...
app/Notifications/SubmissaoRecebidaNotification.php
View file @
bfaac79e
...
@@ -51,6 +51,7 @@ class SubmissaoRecebidaNotification extends Notification
...
@@ -51,6 +51,7 @@ class SubmissaoRecebidaNotification extends Notification
->
subject
(
'Sistema Submeta - Submissão de proposta / projeto'
)
->
subject
(
'Sistema Submeta - Submissão de proposta / projeto'
)
->
greeting
(
"Saudações!"
)
->
greeting
(
"Saudações!"
)
->
line
(
"O sistema Submeta recebeu o envio de sua proposta / projeto intitulada(o)
{
$this
->
titulo
}
."
)
->
line
(
"O sistema Submeta recebeu o envio de sua proposta / projeto intitulada(o)
{
$this
->
titulo
}
."
)
->
line
(
"
{
$this
->
data
}
"
)
->
action
(
'Acessar Formulário'
,
$this
->
url
)
->
action
(
'Acessar Formulário'
,
$this
->
url
)
->
markdown
(
'vendor.notifications.email'
);
->
markdown
(
'vendor.notifications.email'
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment