This commit is contained in:
mynah
2020-01-22 18:22:31 -06:00
parent f16d579996
commit 174f4b0756
38 changed files with 503 additions and 473 deletions

View File

@@ -84,6 +84,50 @@ sub intentConfirm{
return ;
}
sub notify{
my ($c,$d,$r) = @_;
my $t =shift @{ _read ($data_path->child("spay/qNotify.q")->slurp,$d->{'tid'})};
my @ra;
my %h=qw/0 na 1 ch 2 m 3 g/;
my $plazo= defined( $d->{'selected_plan'})?
$d->{'selected_plan'}->{'count'} : "0";
my $students = $d->{'students'};
my $basetxta = "$t->{'cnombre'}
clave de pago stripe: $d->{'payment_intent_id'}
plazo: $plazo meses
cantidad: $t->{'cantidad'}
";
my $basetxtu = $t->{'cnombre'}//""."
".$t->{'subnombre'}//""."
";
foreach(1 .. $d->{'mq'}) {
push (@ra, ["
$basetxtu
$$students[$_ -1][0]
$t->{'mmail'}
tu clave de pago es la sigiente. Tenla a la mano para cualquier aclaración
==========================
$d->{'payment_intent_id'}
===========================
", " Inscripción ", $$students[$_ -1][1]]);
$basetxta .= "
Nombre: $$students[$_ -1][0]
Correo: $$students[$_ -1][1]
Telefono:$$students[$_ -1][0]
Playera:$h{$$students[$_ -1][3]}
Comentario:$$students[$_ -1][2]
=====================
";
}
push (@ra, [$basetxta,"Inscripciones",'david@chaos.foundation']);
return @ra;
}
# Check payment user info ==============
# data:
# ===============
@@ -135,9 +179,9 @@ sub is_mail{
#==============================================================================
# admin evets
sub event_del { return _write("delete from evento where id = ?;",pop);}
sub event_del { return _write("delete from curso_tienda where id = ?;",pop);}
sub course_del{ return _write("delete from curso where id = ?;",pop); }
sub place_del { return _write("delete from lugar where id = ?;",pop); }
sub place_del { return _write("delete from curso_lugar where id = ?;",pop); }
sub event_up{
my ($self,@bind)=@_;
@@ -165,6 +209,22 @@ sub place_ch{
}
#==============================================================================
sub courses{ return _read("select nombre as name, id from curso;")}
sub course { return shift @{_read($data_path->child("/admin/event/json/qCourse.q")->slurp,pop)}}
sub places { return _read("select nombre as name, id from curso_lugar;")}
sub place { return shift @{_read($data_path->child("/admin/event/json/qPlace.q")->slurp,pop)}}
sub events { return _read($data_path->child("/admin/event/qEprev.q")->slurp)}
sub eventa { return shift @{_read($data_path->child("/admin/event/json/qEvent.q")->slurp,pop)}}
sub eimgList{
my $dp = path('public/proc/cal/img')->make_path;
return [ map{ $_->basename} grep{/(jpg|png)$/i}@{$dp->list} ];
}
# lower level read =====================================