Commit 58ecb387 by iqbal

Merge branch 'beta-4.2-training' of https://git.opensipkd.com/aa.gusti/opensipkd…

…-base into beta-4.2-training
2 parents 09473156 7a707856
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.20.5.final using JasperReports Library version 6.20.5-3efcf2e67f959db3888d79f73dde2dbd7acb4f8e -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c9229feb-3d65-40e8-93a8-96a3336d79f9">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="jbtnn.jrdax"/>
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<parameter name="logo" class="java.lang.String"/>
<parameter name="judul" class="java.lang.String"/>
<queryString>
<![CDATA[select * from jabatan]]>
</queryString>
<field name="jenis" class="java.lang.Integer">
<property name="com.jaspersoft.studio.field.name" value="jenis"/>
<property name="com.jaspersoft.studio.field.label" value="jenis"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<field name="nama_lain" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="nama_lain"/>
<property name="com.jaspersoft.studio.field.label" value="nama_lain"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<field name="nama_pendek" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="nama_pendek"/>
<property name="com.jaspersoft.studio.field.label" value="nama_pendek"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<field name="eselon_id" class="java.lang.Integer">
<property name="com.jaspersoft.studio.field.name" value="eselon_id"/>
<property name="com.jaspersoft.studio.field.label" value="eselon_id"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<field name="nama" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="nama"/>
<property name="com.jaspersoft.studio.field.label" value="nama"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<field name="kode" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="kode"/>
<property name="com.jaspersoft.studio.field.label" value="kode"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<field name="status" class="java.lang.Integer">
<property name="com.jaspersoft.studio.field.name" value="status"/>
<property name="com.jaspersoft.studio.field.label" value="status"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<field name="created" class="java.sql.Timestamp">
<property name="com.jaspersoft.studio.field.name" value="created"/>
<property name="com.jaspersoft.studio.field.label" value="created"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<field name="updated" class="java.sql.Timestamp">
<property name="com.jaspersoft.studio.field.name" value="updated"/>
<property name="com.jaspersoft.studio.field.label" value="updated"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<field name="create_uid" class="java.lang.Integer">
<property name="com.jaspersoft.studio.field.name" value="create_uid"/>
<property name="com.jaspersoft.studio.field.label" value="create_uid"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<field name="update_uid" class="java.lang.Integer">
<property name="com.jaspersoft.studio.field.name" value="update_uid"/>
<property name="com.jaspersoft.studio.field.label" value="update_uid"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<field name="id" class="java.lang.Integer">
<property name="com.jaspersoft.studio.field.name" value="id"/>
<property name="com.jaspersoft.studio.field.label" value="id"/>
<property name="com.jaspersoft.studio.field.tree.path" value="jabatan"/>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="80" splitType="Stretch">
<staticText>
<reportElement x="200" y="40" width="170" height="30" uuid="122a31d3-cbc0-4539-ba7a-bec462d685dd"/>
<textElement>
<font size="18" isBold="true"/>
</textElement>
<text><![CDATA[DAFTAR JABATAN]]></text>
</staticText>
<image>
<reportElement x="20" y="10" width="50" height="50" uuid="d4cf7e5c-80f0-4e1c-a1f2-7cc22c941d37"/>
<imageExpression><![CDATA[$P{logo}]]></imageExpression>
</image>
<textField>
<reportElement x="210" y="10" width="140" height="30" uuid="5283feae-c1f3-4759-89fe-396a7a90e201"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{judul}]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="4" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="24" splitType="Stretch">
<staticText>
<reportElement mode="Opaque" x="12" y="0" width="70" height="21" backcolor="#F8FC0F" uuid="5c6f74c4-4285-4237-8cca-27faf445f06d"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="16" isBold="false"/>
</textElement>
<text><![CDATA[Kode]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="82" y="0" width="390" height="21" backcolor="#F8FC0F" uuid="48006808-4261-4602-8561-8ec3bc02f181"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="16" isBold="false"/>
</textElement>
<text><![CDATA[Nama]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="472" y="0" width="70" height="21" backcolor="#F8FC0F" uuid="3af43b51-8d75-4d6c-b320-fc217f61bdd3"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="16" isBold="false"/>
</textElement>
<text><![CDATA[Jenis]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="19" splitType="Stretch">
<textField>
<reportElement x="12" y="-2" width="70" height="20" uuid="b12ca3b6-de8a-4d34-97c8-9f1866d6599e">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f8684de3-eb1d-4666-9d91-200b34130e04"/>
</reportElement>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{kode}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="82" y="-2" width="390" height="20" uuid="68de37cd-fa70-4448-955c-e52de45144d7">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="e64266da-7968-4bb9-a147-bea8396eb4ae"/>
</reportElement>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{nama}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="472" y="-2" width="70" height="20" uuid="47a05f09-7a9e-49a7-a260-fb0b8f8cf331">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f61318b9-ad1e-48c4-81a7-d4306bd5bdb6"/>
</reportElement>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{jenis}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="56" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.20.5.final using JasperReports Library version 6.20.5-3efcf2e67f959db3888d79f73dde2dbd7acb4f8e -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="kecamatan" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="fe154aba-b2d0-43b2-9c21-a3d98474dc8e">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="kecamatan.jrdax"/>
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<parameter name="logo" class="java.lang.String"/>
<parameter name="judul" class="java.lang.String"/>
<queryString>
<![CDATA[select res_kecamatan.kode, res_kecamatan.nama, res_dati2.nama from res_dati2 full outer join res_kecamatan on res_dati2.id = res_kecamatan.dati2_id;]]>
</queryString>
<field name="kode" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="kode"/>
<property name="com.jaspersoft.studio.field.label" value="kode"/>
<property name="com.jaspersoft.studio.field.tree.path" value="res_kecamatan"/>
</field>
<field name="nama" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="nama"/>
<property name="com.jaspersoft.studio.field.label" value="nama"/>
<property name="com.jaspersoft.studio.field.tree.path" value="res_kecamatan"/>
</field>
<field name="COLUMN_3" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="nama"/>
<property name="com.jaspersoft.studio.field.label" value="nama"/>
<property name="com.jaspersoft.studio.field.tree.path" value="res_dati2"/>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="82" splitType="Stretch">
<image>
<reportElement x="60" y="20" width="50" height="50" uuid="79e3cd6b-e20e-4a47-a571-2d804e9c42fa"/>
<imageExpression><![CDATA[$P{logo}]]></imageExpression>
</image>
<textField>
<reportElement x="180" y="10" width="200" height="30" uuid="546f581c-ed84-4eee-9cfb-45c715631819"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{judul}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="130" y="50" width="300" height="30" uuid="63811a35-0453-417e-ad3a-5459b974a1c0"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="16" isBold="true"/>
</textElement>
<text><![CDATA[Tabel Kecamatan]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="30" splitType="Stretch">
<staticText>
<reportElement mode="Opaque" x="60" y="0" width="100" height="30" backcolor="#EFF70A" uuid="0a58c378-b5a3-445a-a516-a22b95cad72a"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Kode]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="160" y="0" width="280" height="30" backcolor="#EFF70A" uuid="eacf9951-3169-43c0-8f5c-bd7d81f74527"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Nama]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="440" y="0" width="100" height="30" backcolor="#EFF70A" uuid="3d011ae4-1b96-4d81-a793-c2441646769f"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Kabupaten]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="30" splitType="Stretch">
<textField>
<reportElement x="160" y="0" width="280" height="30" uuid="7028174c-0be6-444c-88f6-02e5a911fac8">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="3f32c7c3-97bf-484e-a5a8-1ae260292beb"/>
</reportElement>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{nama}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="60" y="0" width="100" height="30" uuid="832bd6a6-99a3-4ec7-8e5f-88b93fd55475">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="77834b05-9f8a-4c60-a0ef-eb74dc6acd65"/>
</reportElement>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{kode}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="440" y="0" width="100" height="30" uuid="5bc83d1d-8d39-437d-a550-9bd002e038ff">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="ed1010e8-db4e-48c6-b2fb-dd50357cc7f4"/>
</reportElement>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{COLUMN_3}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.20.5.final using JasperReports Library version 6.20.5-3efcf2e67f959db3888d79f73dde2dbd7acb4f8e -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="parameter" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="e257144b-18a6-4587-9adc-2cb01eb04444">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="parameter.jrdax"/>
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<parameter name="logo" class="java.lang.String"/>
<parameter name="judul" class="java.lang.String"/>
<queryString>
<![CDATA[select * from parameters]]>
</queryString>
<field name="value" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="value"/>
<property name="com.jaspersoft.studio.field.label" value="value"/>
<property name="com.jaspersoft.studio.field.tree.path" value="parameters"/>
</field>
<field name="nama" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="nama"/>
<property name="com.jaspersoft.studio.field.label" value="nama"/>
<property name="com.jaspersoft.studio.field.tree.path" value="parameters"/>
</field>
<field name="kode" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="kode"/>
<property name="com.jaspersoft.studio.field.label" value="kode"/>
<property name="com.jaspersoft.studio.field.tree.path" value="parameters"/>
</field>
<field name="status" class="java.lang.Integer">
<property name="com.jaspersoft.studio.field.name" value="status"/>
<property name="com.jaspersoft.studio.field.label" value="status"/>
<property name="com.jaspersoft.studio.field.tree.path" value="parameters"/>
</field>
<field name="created" class="java.sql.Timestamp">
<property name="com.jaspersoft.studio.field.name" value="created"/>
<property name="com.jaspersoft.studio.field.label" value="created"/>
<property name="com.jaspersoft.studio.field.tree.path" value="parameters"/>
</field>
<field name="updated" class="java.sql.Timestamp">
<property name="com.jaspersoft.studio.field.name" value="updated"/>
<property name="com.jaspersoft.studio.field.label" value="updated"/>
<property name="com.jaspersoft.studio.field.tree.path" value="parameters"/>
</field>
<field name="create_uid" class="java.lang.Integer">
<property name="com.jaspersoft.studio.field.name" value="create_uid"/>
<property name="com.jaspersoft.studio.field.label" value="create_uid"/>
<property name="com.jaspersoft.studio.field.tree.path" value="parameters"/>
</field>
<field name="update_uid" class="java.lang.Integer">
<property name="com.jaspersoft.studio.field.name" value="update_uid"/>
<property name="com.jaspersoft.studio.field.label" value="update_uid"/>
<property name="com.jaspersoft.studio.field.tree.path" value="parameters"/>
</field>
<field name="id" class="java.lang.Integer">
<property name="com.jaspersoft.studio.field.name" value="id"/>
<property name="com.jaspersoft.studio.field.label" value="id"/>
<property name="com.jaspersoft.studio.field.tree.path" value="parameters"/>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="91" splitType="Stretch">
<staticText>
<reportElement x="150" y="60" width="260" height="30" uuid="8c61d274-434e-438e-bb77-c342d50f2bc7"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="16" isBold="true"/>
</textElement>
<text><![CDATA[Tabel Parameter]]></text>
</staticText>
<textField>
<reportElement x="200" y="30" width="160" height="30" uuid="9a1ca492-46e0-4296-85a1-4391f2779125"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{judul}]]></textFieldExpression>
</textField>
<image>
<reportElement x="62" y="36" width="50" height="50" uuid="448c8eaa-96be-4dee-9ec0-cc4ab95a8d65"/>
<imageExpression><![CDATA[$P{logo}]]></imageExpression>
</image>
</band>
</title>
<pageHeader>
<band height="2" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="28" splitType="Stretch">
<staticText>
<reportElement mode="Opaque" x="62" y="2" width="98" height="25" backcolor="#FAF214" uuid="833d6713-e517-4086-94de-af01a9040960"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Kode]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="160" y="2" width="270" height="25" backcolor="#FAF214" uuid="1b1e8fef-8a05-42bc-bc49-87bfc2531863"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Nama]]></text>
</staticText>
<staticText>
<reportElement mode="Opaque" x="430" y="2" width="110" height="25" backcolor="#FAF214" uuid="42efbcda-1ada-40a6-93cf-0242e733f424"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Nilai]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="30" splitType="Stretch">
<textField>
<reportElement x="62" y="0" width="98" height="30" uuid="7b445553-1287-47ea-9fd6-f443f557a248">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="d19d1640-713c-4589-b3f8-5fa65909a6ee"/>
</reportElement>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{kode}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="160" y="0" width="270" height="30" uuid="6dc993d5-78a6-4ead-b12b-d037d985c757">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="eac295c0-4583-470a-8b1e-c6fd25a16695"/>
</reportElement>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{nama}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="430" y="0" width="110" height="30" uuid="6b3477cc-f18c-4705-bb97-68be71e91ddb">
<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="864034cc-6560-47d8-9760-b465954d12c8"/>
</reportElement>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{value}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
<document>
<template pagesize="21cm, 29.7cm">
<pageTemplate id="page1">
<pageGraphics>
<setFont name="Helvetica-Bold" size="14"/>
<!-- <drawString x="2cm" y="27.4cm">PEMERINTAH {company}</drawString > -->
<drawCenteredString x="11.5cm" y="27.7cm">PEMERINTAH {company}</drawCenteredString >
<!-- <drawRightString x="19cm" y="27.7cm">PEMERINTAH {company}</drawRightString > -->
<setFont name="Helvetica-Bold" size="12"/>
<drawCenteredString x="11.5cm" y="27.2cm">{departement}</drawCenteredString>
<setFont name="Helvetica-Bold" size="8"/>
<drawCenteredString x="11.5cm" y="26.7cm">{address}</drawCenteredString >
<image file="{logo}" preserveAspectRatio="1" x="2cm" y="749" width="50" height="50"/>
<image file="{line}" preserveAspectRatio="0" x="2cm" y="740" width="17cm" height="10"/>
</pageGraphics>
<pageGraphics>
<setFont name="Helvetica" size="10"/>
<drawString x="2cm" y="1.5cm">{waktu}</drawString>
<drawRightString x="19cm" y="1.5cm">Halaman <pageNumber/> / <getName id="last-page" default="1"/></drawRightString>
</pageGraphics>
<frame id="content" x1="2cm" y1="2cm" width="17cm" height="24cm"/>
</pageTemplate>
<pageTemplate id="page2">
<pageGraphics>
<setFont name="Helvetica" size="10"/>
<drawString x="2cm" y="27.7cm">{waktu}</drawString>
<drawRightString x="19cm" y="27.7cm">Halaman <pageNumber/> / <getName id="last-page" default="1"/></drawRightString>
</pageGraphics>
<pageGraphics>
<setFont name="Helvetica" size="10"/>
<drawString x="2cm" y="1.5cm">{waktu}</drawString>
<drawRightString x="19cm" y="1.5cm">Halaman <pageNumber/> / <getName id="last-page" default="1"/></drawRightString>
</pageGraphics>
<frame id="content" x1="2cm" y1="2cm" width="17cm" height="26cm"/>
</pageTemplate>
</template>
<stylesheet>
<paraStyle name="title1"
fontName="Helvetica-Bold"
fontSize="16"
spaceAfter="16"
align="center"/>
<paraStyle name="title2"
fontName="Helvetica-Bold"
fontSize="14"
spaceAfter="10"/>
<paraStyle name="heading1"
fontName="Helvetica-Bold"
fontSize="12"
spaceAfter="12"/>
<paraStyle name="tableTitle"
fontName="Helvetica-Bold"
fontSize="10"
spaceAfter="10"/>
<paraStyle name="tableBody"
fontName="Helvetica"
fontSize="10"
spaceAfter="10"/>
<paraStyle name="body"
fontName="Helvetica"
fontSize="10"
spaceAfter="10"/>
<blockTableStyle id="table">
<blockValign start="0,0" stop="-1,-1" value="TOP"/>
<blockAlignment value="left" start="0,0" stop="0,-1"/>
<blockAlignment value="centre" start="2,0" stop="2,-1"/>
<blockFont name="Helvetica" size="10"/>
<blockFont name="Helvetica-Bold" size="10" start="2,0" stop="2,0"/>
<lineStyle kind="GRID" colorName="black"/>
<!-- <lineStyle kind="OUTLINE" colorName="black" thickness="2"/> -->
<!-- <blockBackground colorName="pink" start="0,0" stop="-1,0"/> -->
<blockBackground colorName="yellow" start="0,0" stop="-1,0"/>
</blockTableStyle>
<paraStyle name="h1" fontName="Helvetica-BoldOblique" fontSize="14" leading="36" spaceBefore="12"/>
<paraStyle name="normal" fontName="Helvetica" fontSize="10" leading="10" />
<paraStyle name="spaced" fontName="Helvetica" fontSize="10" leading="12" spaceBefore="12" spaceAfter="12"/>
<paraStyle name="intro" fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
</stylesheet>
<story>
<!-- <storyPlace x="4cm" y="700" width="500" height="73" origin="page"> -->
<!-- <para style="title1">PEMERINTAH {company}</para> -->
<!-- <hr color="white" thickness="8pt"/> -->
<!-- <para style="title2">{departement}</para> -->
<!-- <hr color="white" thickness="8pt"/> -->
<!-- <para style="heading1">{address}</para> -->
<!-- <illustration height="3" width="500" align="center"> -->
<!-- <fill color= "(0,0.5,0.5,0.0)" /> -->
<!-- <rect x="0" y = "-12" width="500" height="3" round="1" fill="1" stroke = "Yes" /> -->
<!-- </illustration> -->
<!-- </storyPlace> -->
<!-- <graphicsMode> -->
<!-- <drawCenteredString x="10.5cm" y="23cm">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx</drawCenteredString > -->
<!-- </graphicsMode> -->
<setNextTemplate name="page2"/>
<para style="heading1">DAFTAR USER APLIKASI</para>
<blockTable colWidths="4cm,10cm,3cm" style="table" repeatRows="1">
<tr>
<td><para style="tableTitle">User ID</para></td>
<td><para style="tableTitle">E-mail</para></td>
<td>Registrasi</td>
</tr>
{rows}
</blockTable>
<namedString id="last-page"><pageNumber/></namedString>
</story>
</document>
<tr>
<td style="tableBody">{user_name}</td>
<td style="tableBody"><para style="tableBody">{email}</para></td>
<td style="tableBody">{registered_date}</td>
</tr>
\ No newline at end of file
......@@ -7,11 +7,12 @@ from opensipkd.models import (
Jabatan,
Eselon, Departemen
)
from opensipkd.tools.report import csv_response, open_rml_pdf, open_rml_row, \
pdf_response
from opensipkd.tools.report import csv_response, open_rml_pdf, open_rml_row, pdf_response, file_response
from pyramid.i18n import TranslationStringFactory
from pyramid.view import (view_config, )
from . import BaseView, button_import
from pyramid.path import AssetResolver
from . import BaseView, button_import, get_params
from ..views import BaseView
......@@ -108,8 +109,11 @@ class ViewJabatan(BaseView):
self.edit_schema = EditSchema
self.table = Jabatan
self.list_schema = ListSchema
self.list_buttons = self.list_buttons + (button_import,)
# self.list_buttons = (btn_view, btn_add, btn_edit, btn_delete, btn_close)
self.list_buttons = self.list_buttons + self.list_report + (button_import,)
path = os.path.dirname(__file__)
path = os.path.dirname(path)
self.report_file = os.path.join(path, 'reports', 'jabatan.jrxml')
def get_bindings(self, row=None):
return dict(daftar_jenis=JENIS,
......@@ -120,6 +124,24 @@ class ViewJabatan(BaseView):
def view_list(self):
return super().view_list()
def get_module_path(self, module_name):
a = AssetResolver(module_name)
resolver = a.resolve('')
return resolver.abspath()
def pdf_response(self, **kwargs):
# print("PDF RESPONSE======================================")
from opensipkd.base.tools.report import jasper_export
logo = self.get_module_path('opensipkd.base')
logo = os.path.join(logo, 'static', 'img', 'logo.png')
parameters = {
"judul": get_params('company', "openSIPKD"),
"logo": logo
}
print(parameters)
filename = jasper_export(self.report_file, parameters=parameters)
return file_response(self.req, filename=filename[0])
@view_config(route_name='jabatan-act', renderer='json',
permission='read')
def view_act(self):
......
import colander
from deform import (widget, )
from opensipkd.base.views.provinsi import provinsi_widget
from opensipkd.models import DBSession, ResKecamatan, ResDati2, ResProvinsi
import os
from opensipkd.models import DBSession, ResKecamatan, ResDati2, ResProvinsi, ResDesa
from opensipkd.tools.buttons import btn_close, btn_add
from pyramid.i18n import TranslationStringFactory
from opensipkd.tools.report import csv_response, open_rml_pdf, open_rml_row, pdf_response, file_response
from pyramid.view import (view_config, )
from pyramid.httpexceptions import HTTPFound
from sqlalchemy.exc import IntegrityError
from pyramid.path import AssetResolver
from . import BaseView, button_import, get_params
from . import widget_os, button_import
from .dati2 import dati2_widget
......@@ -51,7 +57,6 @@ class AddSchema(colander.Schema):
oid="nama")
class EditSchema(AddSchema):
id = colander.SchemaNode(colander.String(), missing=colander.drop,
widget=widget.HiddenWidget(readonly=True))
......@@ -68,6 +73,7 @@ class ListSchema(colander.Schema):
class Views(BaseView):
def __init__(self, request):
super(Views, self).__init__(request)
self.request = request # Simpan request secara eksplisit sebagai atribut instance
self.form_params = dict(scripts="")
self.list_url = 'kecamatan'
self.list_route = 'kecamatan'
......@@ -75,7 +81,10 @@ class Views(BaseView):
self.edit_schema = EditSchema
self.table = ResKecamatan
self.list_schema = ListSchema
self.list_buttons = (btn_add, btn_close, button_import)
self.list_buttons = self.list_buttons + self.list_report + (button_import,)
path = os.path.dirname(__file__)
path = os.path.dirname(path)
self.report_file = os.path.join(path, 'reports', 'kecamatan.jrxml')
def form_validator(self, form, value):
def err_kode():
......@@ -113,7 +122,7 @@ class Views(BaseView):
@view_config(route_name='kecamatan-view',
renderer='templates/form.pt', permission='wilayah')
def view_view(self): # row = query_id(request).first()
def view_view(self):
return super().view_view()
@view_config(route_name='kecamatan',
......@@ -122,6 +131,24 @@ class Views(BaseView):
def view_list(self):
return super(Views, self).view_list()
def get_module_path(self, module_name):
a = AssetResolver(module_name)
resolver = a.resolve('')
return resolver.abspath()
def pdf_response(self, **kwargs):
# print("PDF RESPONSE======================================")
from opensipkd.base.tools.report import jasper_export
logo = self.get_module_path('opensipkd.base')
logo = os.path.join(logo, 'static', 'img', 'logo.png')
parameters = {
"judul": get_params('company', "openSIPKD"),
"logo": logo
}
print(parameters)
filename = jasper_export(self.report_file, parameters=parameters)
return file_response(self.req, filename=filename[0])
@view_config(route_name='kecamatan-act', renderer='json',
permission='view')
def view_act(self):
......@@ -131,7 +158,7 @@ class Views(BaseView):
return query.join(ResDati2, ResDati2.id == ResKecamatan.dati2_id)
def next_act(self):
request = self.req
request = self.request
url_dict = request.matchdict
if url_dict['act'] == 'select':
dati2_id = request.params["dati2_id"]
......@@ -169,7 +196,33 @@ class Views(BaseView):
@view_config(route_name='kecamatan-delete',
renderer='templates/form.pt', permission='wilayah')
def view_delete(self):
return super(Views, self).view_delete()
# Gunakan logika dari BaseView untuk menampilkan form konfirmasi
response = super(Views, self).view_delete()
# Jika form konfirmasi disubmit (POST request)
if isinstance(response, dict) and self.request.method == 'POST':
id_to_delete = self.request.matchdict.get('id')
q = DBSession.query(ResKecamatan).filter_by(id=id_to_delete).first()
if not q:
self.request.session.flash("Data kecamatan tidak ditemukan.", "error")
return HTTPFound(location=self.request.route_url('kecamatan'))
try:
# Hapus semua desa yang terkait dengan kecamatan ini
DBSession.query(ResDesa).filter_by(kecamatan_id=id_to_delete).delete()
DBSession.flush() # Pastikan penghapusan desa diterapkan
# Hapus data kecamatan
DBSession.delete(q)
DBSession.flush()
self.request.session.flash("Kecamatan dan desa terkait berhasil dihapus.", "success")
except IntegrityError as e:
DBSession.rollback()
self.request.session.flash(f"Gagal menghapus kecamatan: {str(e)}", "error")
return HTTPFound(location=self.request.route_url('kecamatan'))
# Jika belum disubmit, kembalikan tampilan konfirmasi dari BaseView
return response
@view_config(route_name='kecamatan-upload',
renderer='templates/form.pt', permission='wilayah')
......
from colander import Length
import os
import colander
from deform import (widget, )
from pyramid.view import (view_config, )
from . import BaseView, button_import
from opensipkd.tools.report import csv_response, open_rml_pdf, open_rml_row, pdf_response, file_response
from opensipkd.models import (
DBSession,
Parameter)
from . import BaseView
from pyramid.path import AssetResolver
from . import BaseView, button_import, get_params
......@@ -77,13 +81,34 @@ class Views(BaseView):
self.edit_schema = EditSchema
self.table = Parameter
self.list_schema = ListSchema
self.list_buttons = self.list_buttons + (button_import,)
self.list_buttons = self.list_buttons + self.list_report + (button_import,)
path = os.path.dirname(__file__)
path = os.path.dirname(path)
self.report_file = os.path.join(path, 'reports', 'parameter.jrxml')
@view_config(route_name='parameter', renderer='templates/table.pt',
permission='user-edit')
def view_list(self):
return super().view_list()
def get_module_path(self, module_name):
a = AssetResolver(module_name)
resolver = a.resolve('')
return resolver.abspath()
def pdf_response(self, **kwargs):
# print("PDF RESPONSE======================================")
from opensipkd.base.tools.report import jasper_export
logo = self.get_module_path('opensipkd.base')
logo = os.path.join(logo, 'static', 'img', 'logo.png')
parameters = {
"judul": get_params('company', "openSIPKD"),
"logo": logo
}
print(parameters)
filename = jasper_export(self.report_file, parameters=parameters)
return file_response(self.req, filename=filename[0])
@view_config(route_name='parameter-act', renderer='json',
permission='user-edit')
def view_act(self):
......
import colander
import os
import logging
from deform import widget
from pyramid.view import view_config
from . import BaseView, button_import
from ...models import User, DepartemenUser, Departemen, DBSession
from opensipkd.tools.report import open_rml_row, csv_response, open_rml_pdf, pdf_response, file_response
from .departemen import get_departemen_list
from .user import user_list
from pyramid.i18n import TranslationStringFactory
from pyramid.path import AssetResolver
from . import BaseView, button_import, get_params
_ = TranslationStringFactory('myapp')
log = logging.getLogger(__name__)
......@@ -37,6 +41,11 @@ def departemen_checkbox_widget(node, kw):
values = kw.get('departemen_list', [])
return widget.CheckboxChoiceWidget(values=values, multiple=True)
def validate_departemen_required(node, value):
"""Validator untuk memastikan setidaknya satu departemen dipilih"""
if not value or len(value) == 0:
raise colander.Invalid(node, "Departemen wajib diisi. Pilih setidaknya satu departemen.")
class AddSchema(colander.Schema):
user_id = colander.SchemaNode(
colander.Integer(),
......@@ -49,13 +58,22 @@ class AddSchema(colander.Schema):
widget=departemen_checkbox_widget,
oid="departemen_id",
title="Departemen",
validator=validate_departemen_required # Tambahkan validator wajib
)
class EditSchema(AddSchema):
id = colander.SchemaNode(
colander.String(),
missing=colander.drop,
widget=widget.HiddenWidget(readonly=True)
widget=widget.HiddenWidget()
)
# Override departemen_id agar tidak wajib saat edit
departemen_id = colander.SchemaNode(
colander.Set(),
widget=departemen_checkbox_widget,
oid="departemen_id",
title="Departemen",
validator=None # Tidak wajib saat edit
)
class Views(BaseView):
......@@ -67,7 +85,10 @@ class Views(BaseView):
self.edit_schema = EditSchema
self.list_route = 'user-departemen'
self.table = DepartemenUser
self.list_buttons = self.list_buttons + (button_import,)
self.list_buttons = self.list_buttons + self.list_report + (button_import,)
path = os.path.dirname(__file__)
path = os.path.dirname(path)
self.report_file = os.path.join(path, 'reports', 'userdep1.jrxml')
def list_join(self, query, **kwargs):
return query.outerjoin(Departemen, Departemen.id == self.table.departemen_id) \
......@@ -78,6 +99,24 @@ class Views(BaseView):
def view_list(self, **kwargs):
return super().view_list(**kwargs)
def get_module_path(self, module_name):
a = AssetResolver(module_name)
resolver = a.resolve('')
return resolver.abspath()
def pdf_response(self, **kwargs):
# print("PDF RESPONSE======================================")
from opensipkd.base.tools.report import jasper_export
logo = self.get_module_path('opensipkd.base')
logo = os.path.join(logo, 'static', 'img', 'logo.png')
parameters = {
"judul": get_params('company', "openSIPKD"),
"logo": logo
}
print(parameters)
filename = jasper_export(self.report_file, parameters=parameters)
return file_response(self.req, filename=filename[0])
@view_config(route_name='user-departemen-act', renderer='json',
permission='user-view')
def view_act(self):
......@@ -133,28 +172,47 @@ class Views(BaseView):
if departemen_id is not None and str(departemen_id) != "None"
)
# Batasi ke maksimal dua pilihan
selected_list = sorted(selected_departemen)[:2] # Ambil dua yang pertama
selected_list = sorted(selected_departemen)[:2]
dept1 = int(selected_list[0]) if selected_list else None
dept2 = int(selected_list[1]) if len(selected_list) > 1 else None
# Cari entri yang sudah ada untuk user_id
existing_row = DBSession.query(DepartemenUser).filter_by(user_id=user_id).first()
if row and row.user_id != user_id:
# Jika user_id berubah, hapus entri lama dan buat baru
DBSession.query(DepartemenUser).filter_by(user_id=row.user_id).delete()
if selected_list:
new_row = DepartemenUser(
user_id=user_id,
departemen_id=dept1,
sub_departemen=dept2
)
DBSession.add(new_row)
row = new_row
else:
row = None
else:
# Jika user_id sama atau ini adalah tambah baru
if existing_row:
# Update jika sudah ada
# Update entri yang sudah ada jika user_id sama
if selected_list:
existing_row.departemen_id = dept1
existing_row.sub_departemen = dept2
# Jika selected_list kosong, biarkan data lama tetap ada
row = existing_row
else:
# Tambah baru jika belum ada
# Buat entri baru jika belum ada
if selected_list: # Ini akan selalu ada saat tambah karena validator
new_row = DepartemenUser(
user_id=user_id,
departemen_id=dept1,
sub_departemen=dept2
)
DBSession.add(new_row)
row = new_row
else:
# Jika tidak ada pilihan, hapus row yang ada
if existing_row:
DBSession.delete(existing_row)
row = None
DBSession.flush()
return row
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!