This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: networking.k8s.io/v1 | |
| kind: Ingress | |
| metadata: | |
| name: wid-ingress | |
| annotations: | |
| cert-manager.io/cluster-issuer: "letsencrypt-prod" | |
| spec: | |
| tls: | |
| - hosts: | |
| - anafeliu.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| . . . | |
| /** | |
| * Gulp Packages | |
| */ | |
| // General | |
| let {src, dest, watch, series} = require('gulp'); | |
| let del = require('del'); | |
| let flatmap = require('gulp-flatmap'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ((app, $, Cleave) => { | |
| // Builds the endpoint from the calculator's name. | |
| app.getEndpoint = calculator => { | |
| return calculator.replace(/ /g, '-').normalize("NFD") | |
| .replace(/[\u0300-\u036f]/g, "").toLowerCase(); | |
| }; | |
| // Gets the form data. | |
| app.getData = calculator => { | |
| let data = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="results" class="content columns is-centered"> | |
| <div class="results column is-narrow"> | |
| {% for field in results[page] %} | |
| {% if field.type == 'textField' %} | |
| {{ formFields['textField'](field.id, field.label, field.value, field.placeholder, field.cleave, field.attr) }} | |
| {% elif field.type == 'label' %} | |
| <div class="field-label"> | |
| <label id="{{ field.id }}" class="label result-field-label">{{ field.text }}</label> | |
| </div> | |
| {% elif field.type == 'hr' %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from .calculator import Calculator | |
| # noinspection PyTypeChecker | |
| class CreditCardCalculator(Calculator): | |
| def __init__(self, **kwargs): | |
| super(CreditCardCalculator, self).__init__(**kwargs) | |
| self.cc_debt = self.get_float(kwargs.get("cc_debt", 0)) | |
| self.add_c = self.get_float(kwargs.get("add_c", 0)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from math import ceil | |
| from typing import List, Tuple | |
| # noinspection PyTypeChecker | |
| # tag::calculator_class[] | |
| class Calculator: | |
| freq_items = [ | |
| (u"Año", 1, 10), | |
| ("Semestre", 2, 10), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @calculators.route("/tarjeta-pago-fijo", methods=["POST"]) | |
| @calculators.route("/tarjeta-pago-minimo", methods=["POST"]) | |
| def tarjeta_de_credito() -> FullResponseJSON: | |
| calculator = CreditCardCalculator(**request.get_json()) | |
| time_scale = calculator.time_scale | |
| first_p = calculator.get_payment_cc() | |
| periods = calculator.periods | |
| nper = periods[-1] | |
| num_of_years = nper / 12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: hr-rest | |
| spec: | |
| ports: | |
| - port: 80 | |
| targetPort: 5002 | |
| selector: | |
| app: hr-rest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| . . . | |
| @jwt_required() | |
| def post(self): | |
| parser = self.get_parser() | |
| data = parser.parse_args() | |
| if self.parsed_model['unique']: | |
| for constraint in self.parsed_model['unique']: | |
| _filter = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from db import db | |
| from models.mixin import ModelMixin | |
| from models.deduction_detail import DeductionDetailModel | |
| from models.payment_detail import PaymentDetailModel | |
| class PaymentModel(ModelMixin, db.Model): | |
| __tablename__ = 'payment' | |
| exclude_from_update = ('employee_id',) |