code stringlengths 1 1.05M | repo_name stringlengths 6 83 | path stringlengths 3 242 | language stringclasses 222
values | license stringclasses 20
values | size int64 1 1.05M |
|---|---|---|---|---|---|
package com.example.roller.ui.theme
import androidx.compose.ui.graphics.Color
val Purple80 = Color(0xFFD0BCFF)
val PurpleGrey80 = Color(0xFFCCC2DC)
val Pink80 = Color(0xFFEFB8C8)
val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260) | 2301_82325581/exp4 | roller2/app/src/main/java/com/example/roller/ui/theme/Color.kt | Kotlin | unknown | 282 |
package com.example.roller.ui.theme
import android.app.Activity
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compo... | 2301_82325581/exp4 | roller2/app/src/main/java/com/example/roller/ui/theme/Theme.kt | Kotlin | unknown | 1,692 |
package com.example.roller.ui.theme
import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
// Set of Material typography styles to start with
val Typograph... | 2301_82325581/exp4 | roller2/app/src/main/java/com/example/roller/ui/theme/Type.kt | Kotlin | unknown | 987 |
package com.example.roller
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEq... | 2301_82325581/exp4 | roller2/app/src/test/java/com/example/roller/ExampleUnitTest.kt | Kotlin | unknown | 342 |
import requests
import json
def register():
url = "http://127.0.0.1:5000/api/users"
data = {
"username": "user",
"password": "123456",
"role": "user"
}
response = requests.post(url, json=data)
print(response.json())
'''
"username": "root"
"password": "cyz123"
'''
def log... | 2303_76403688/Flask-based_inventory_management_system | posttest.py | Python | unknown | 1,233 |
from app import create_app
app = create_app()
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True) | 2303_76403688/Flask-based_inventory_management_system | run.py | Python | unknown | 123 |
cjc main.cj api.cj values.cj -LC:\Windows\System32 -lgdi32 -o main.exe | 2302_81918214/Cangjie-Examples | CFFI-Windows/compile.bat | Batchfile | apache-2.0 | 70 |
<!DOCTYPE html>
<html lang="cn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div>Hello Cangjie!</div>
<p></p>
<script>
let xhr = new XMLHttpRequest()
xhr.open("POST", "/Hello", true)
... | 2302_81918214/Cangjie-Examples | HTTPServer/index.html | HTML | apache-2.0 | 687 |
/* 数据导出页面样式 */
/* 页面头部 */
.page-header {
background: white;
padding: 20px 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.header-left h1 {
font-size: 24px;
font-weight: 600;
color: #1f29... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/data-export.css | CSS | unknown | 4,180 |
/* 数据概览页面样式 */
/* 页面头部 */
.page-header {
background: white;
padding: 20px 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.header-left h1 {
font-size: 24px;
font-weight: 600;
color: #1f29... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/data-overview.css | CSS | unknown | 5,172 |
/* 数据报表页面样式 */
/* 页面头部 */
.page-header {
background: white;
padding: 20px 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.header-left h1 {
font-size: 24px;
font-weight: 600;
color: #1f29... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/data-report.css | CSS | unknown | 5,391 |
/* /* 智驭安行系统管理平台样式 */
/* 全局样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
background: #f5f7fa;
color: #333;
line-height: 1.6;
overflow-x: hidden;
}
/* 加载遮罩 */
.loading-overl... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/index.css | CSS | unknown | 22,884 |
/* 智驭安行登录页面样式 */
/* 全局样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-it... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/login.css | CSS | unknown | 9,457 |
/* 系统管理页面样式 */
/* 页面头部 */
.page-header {
background: white;
padding: 20px 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.header-left h1 {
font-size: 24px;
font-weight: 600;
color: #1f29... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/system-management.css | CSS | unknown | 5,351 |
/* 预警管理页面样式 */
/* 主布局样式 */
.admin-main {
display: flex;
min-height: calc(100vh - 64px);
}
/* 内容区样式 */
.alert-container {
flex: 1;
padding: 24px;
background: #f5f7fa;
overflow-y: auto;
}
/* 容器样式 */
.alert-container {
padding: 20px;
}
/* 预警概览卡片样式 */
.alert-overview {
margin-bottom: 24p... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/traffic-alert.css | CSS | unknown | 6,308 |
/* 交通数据分析页面样式 */
/* 继承全局样式 */
@import url('./index.css');
/* 顶部导航栏样式 */
.admin-header {
height: 64px;
background: white;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 24px;
position: relative;
z-index: 100;
... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/traffic-analysis.css | CSS | unknown | 8,899 |
/* 公共交通安全监控系统样式 */
/* 继承全局样式 */
@import url('./index.css');
/* 颜色变量 */
:root {
--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--primary-color: #667eea;
--primary-hover: #764ba2;
--success-color: #67C23A;
--warning-color: #E6A23C;
--danger-color: #F56C6C;
--info-color: #909399;
--text-p... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/traffic-monitor.css | CSS | unknown | 9,217 |
/* 车辆列表页面样式 */
/* 继承全局样式 */
@import url('./index.css');
/* 顶部导航栏样式 */
.admin-header {
height: 64px;
background: white;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 24px;
position: relative;
z-index: 100;
}
... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/vehicle-list.css | CSS | unknown | 8,337 |
/* 车辆维护记录页面样式 */
/* 页面头部 */
.page-header {
background: white;
padding: 20px 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.header-left h1 {
font-size: 24px;
font-weight: 600;
color: #1f... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/vehicle-maintenance.css | CSS | unknown | 4,957 |
/* 车辆追踪页面样式 */
/* 页面头部 */
.page-header {
background: white;
padding: 20px 24px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.header-left h1 {
font-size: 24px;
font-weight: 600;
color: #1f29... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | css/vehicle-tracking.css | CSS | unknown | 5,197 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>数据导出 - 智驭安行系统</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/data-export.css">
<l... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | data-export.html | HTML | unknown | 10,067 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>数据概览 - 智驭安行系统</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/data-overview.css">
... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | data-overview.html | HTML | unknown | 9,434 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>报表生成 - 智驭安行系统</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/data-report.css">
<l... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | data-report.html | HTML | unknown | 11,438 |
<!-- 111111-->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>公共交通异常检测系统 - 系统管理平台</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/i... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | index.html | HTML | unknown | 41,113 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>公共交通异常检测系统 - 用户登录</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/login.css">
<lin... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | login.html | HTML | unknown | 9,973 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>公共交通异常检测系统 - 系统管理</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/system-management.... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | system-management.html | HTML | unknown | 14,574 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
</body>
</html> | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | system.html | HTML | unknown | 107 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>公共交通异常检测系统 - 预警管理</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/index.css">
<link... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | traffic-alert.html | HTML | unknown | 24,276 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>交通数据分析 - 公共交通异常检测系统</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/traffi... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | traffic-analysis.html | HTML | unknown | 47,712 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>实时监控 - 公共交通异常检测系统</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/index.css">
<lin... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | traffic-monitor.html | HTML | unknown | 17,661 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>车辆列表 - 公共交通异常检测系统</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/index.css">
<link... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | vehicle-list.html | HTML | unknown | 31,494 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>维护记录 - 智驭安行系统</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/vehicle-maintenance.cs... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | vehicle-maintenance.html | HTML | unknown | 14,904 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>车辆追踪 - 智驭安行系统</title>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="./css/vehicle-tracking.css">... | 2301_77385112/C_R_A_I_C___zhi_yu_an_xing | vehicle-tracking.html | HTML | unknown | 11,949 |
#!/bin/bash
# 定义下载地址和文件名
DOWNLOAD_URL="https://cangjie-lang.cn/v1/files/auth/downLoad?nsId=142267&fileName=Cangjie-0.53.13-linux_x64.tar.gz&objectKey=6719f1eb3af6947e3c6af327"
FILE_NAME="Cangjie-0.53.13-linux_x64.tar.gz"
# 检查 cangjie 工具链是否已安装
echo "确保 cangjie 工具链已安装..."
if ! command -v cjc -v &> /de... | 2302_81918214/Cangjie-Examples_4105 | FTP/run-ftp.sh | Shell | apache-2.0 | 1,967 |
<!DOCTYPE html>
<html lang="cn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div>Hello Cangjie!</div>
<p></p>
<script>
let xhr = new XMLHttpRequest()
xhr.open("POST", "/Hello", true)
... | 2302_81918214/Cangjie-Examples_4105 | HTTPServer/index.html | HTML | apache-2.0 | 687 |
#include "head.h"
#define ARRAY_LEN(arr) (sizeof(arr) / sizeof((arr)[0])) // 计算数组长度的宏定义
// 模块1:演示基本数据类型和运算符
int demonstrate_basic_operations(int a, int b)
{
//printf("%d + %d = %d\n", a, b, a + b);
return a + b;
}
// 模块2:演示指针操作
int demonstrate_pointer_operations(int *ptr)
{
int a = 10;
ptr = &a;
//... | 2302_81918214/Cangjie-Examples_4105 | cjCLI/src/C/examples.c | C | apache-2.0 | 1,184 |
#ifndef HEAD_H
#define HEAD_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#endif | 2302_81918214/Cangjie-Examples_4105 | cjCLI/src/C/head.h | C | apache-2.0 | 97 |
#include "head.h"
// 全局变量定义
int STUNUM = 0;
int INDEX = 0;
// 结构体声明
typedef struct {
char name[50];
int age;
float score;
} Student;
Student* createStudent(){
Student* student = (Student*)malloc(sizeof(Student));
return student;
}
// 1.学生信息初始化
void initStudent(Student* s, const char* name, int ... | 2302_81918214/Cangjie-Examples_4105 | cjCLI/src/C/struct.c | C | apache-2.0 | 1,741 |
module.exports = {
parserPreset: "conventional-changelog-conventionalcommits",
rules: {
"subject-empty": [2, "never"],
"type-case": [2, "always", "lower-case"],
"type-empty": [2, "never"],
"type-enum": [
2,
"always",
[
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",... | 2302_79757062/hrms | commitlint.config.js | JavaScript | agpl-3.0 | 407 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover maximum-scale=1.0, user-scalable=no"
/>
<title>Frappe HR</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobi... | 2302_79757062/hrms | frontend/index.html | HTML | agpl-3.0 | 8,070 |
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
| 2302_79757062/hrms | frontend/postcss.config.js | JavaScript | agpl-3.0 | 76 |
import { initializeApp } from "firebase/app"
import {
getMessaging,
getToken,
isSupported,
deleteToken,
onMessage as onFCMMessage,
} from "firebase/messaging"
class FrappePushNotification {
static get relayServerBaseURL() {
return window.frappe?.boot.push_relay_server_url
}
// Type definitions
/**
* Web ... | 2302_79757062/hrms | frontend/public/frappe-push-notification.js | JavaScript | agpl-3.0 | 7,425 |
<template>
<ion-app>
<ion-router-outlet id="main-content" />
<Toasts />
<InstallPrompt />
</ion-app>
</template>
<script setup>
import { onMounted } from "vue"
import { IonApp, IonRouterOutlet } from "@ionic/vue"
import { Toasts } from "frappe-ui"
import InstallPrompt from "@/components/InstallPrompt.vue"
i... | 2302_79757062/hrms | frontend/src/App.vue | Vue | agpl-3.0 | 502 |
@font-face {
font-family: "Inter";
font-style: normal;
font-weight: 100;
font-display: swap;
src: url("Inter-Thin.woff2?v=3.12") format("woff2"),
url("Inter-Thin.woff?v=3.12") format("woff");
}
@font-face {
font-family: "Inter";
font-style: italic;
font-weight: 100;
font-display: swap;
src: url("Inter-ThinI... | 2302_79757062/hrms | frontend/src/assets/Inter/inter.css | CSS | agpl-3.0 | 3,808 |
<template>
<ion-page>
<ion-header class="ion-no-border">
<div class="w-full sm:w-96">
<div class="flex flex-col bg-white shadow-sm p-4">
<div class="flex flex-row justify-between items-center">
<div class="flex flex-row items-center gap-2">
<h2 class="text-xl font-bold text-gray-900">
... | 2302_79757062/hrms | frontend/src/components/BaseLayout.vue | Vue | agpl-3.0 | 1,786 |
<template>
<ion-tab-bar
slot="bottom"
class="bg-white shadow-md sm:w-96 py-2 pb-2 standalone:pb-safe-bottom"
>
<ion-tab-button
v-for="item in tabItems"
:key="item.title"
:tab="item.title"
:href="item.route"
:class="[
'bg-white text-xs space-y-1.5 !hover:border-gray-300 !hover:text-gray-700 tr... | 2302_79757062/hrms | frontend/src/components/BottomTabs.vue | Vue | agpl-3.0 | 1,317 |
<template>
<div class="flex flex-col bg-white rounded w-full py-6 px-4 border-none">
<h2 class="text-lg font-bold text-gray-900">Hey, {{ employee?.data?.first_name }} 👋</h2>
<template v-if="settings.data?.allow_employee_checkin_from_mobile_app">
<div class="font-medium text-sm text-gray-500 mt-1.5" v-if="last... | 2302_79757062/hrms | frontend/src/components/CheckInPanel.vue | Vue | agpl-3.0 | 5,706 |
<template>
<ion-modal
ref="modal"
:trigger="trigger"
:initial-breakpoint="1"
:breakpoints="[0, 1]"
:backdrop-breakpoint="1"
:is-open="isOpen"
@willPresent="showModalBackdrop = true"
@willDismiss="showModalBackdrop = false"
@didDismiss="() => emit('did-dismiss')"
>
<slot name="actionSheet"></slot>
... | 2302_79757062/hrms | frontend/src/components/CustomIonModal.vue | Vue | agpl-3.0 | 1,125 |
<template>
<div
class="flex flex-col bg-white rounded mt-5 overflow-auto"
v-if="props.items?.length"
>
<router-link
v-for="link in props.items"
:key="link.name"
:to="{ name: 'EmployeeAdvanceDetailView', params: { id: link.name } }"
class="flex flex-row p-3.5 items-center justify-between border-b cur... | 2302_79757062/hrms | frontend/src/components/EmployeeAdvanceBalance.vue | Vue | agpl-3.0 | 927 |
<template>
<div class="flex flex-col w-full justify-center gap-2.5">
<div class="flex flex-row items-center justify-between">
<div class="flex flex-row items-start gap-3 grow">
<EmployeeAdvanceIcon class="h-5 w-5 mt-[3px] text-gray-500" />
<div class="flex flex-col items-start gap-1">
<div
v-if... | 2302_79757062/hrms | frontend/src/components/EmployeeAdvanceItem.vue | Vue | agpl-3.0 | 2,460 |
<template>
<div v-if="showLabel" class="flex flex-row items-center gap-2">
<Avatar
v-if="employee"
:label="employee?.employee_name"
:image="employee?.image"
:size="props.size"
/>
<div class="text-base text-gray-800 grow">
{{ employee?.employee_name }}
</div>
</div>
<Avatar
v-else
:label="... | 2302_79757062/hrms | frontend/src/components/EmployeeAvatar.vue | Vue | agpl-3.0 | 996 |
<template>
<div
class="flex flex-col items-center rounded p-5 text-sm text-gray-600"
:class="[
props.isTableField ? 'border-2 border-dashed border-gray-300 mt-5' : '',
]"
>
{{ props.message }}
</div>
</template>
<script setup>
const props = defineProps({
message: { type: String },
isTableField: { type:... | 2302_79757062/hrms | frontend/src/components/EmptyState.vue | Vue | agpl-3.0 | 361 |
<template>
<div class="flex flex-row justify-between items-center">
<h2 class="text-base font-semibold text-gray-800">
Settle against Advances
</h2>
</div>
<div class="flex flex-col gap-2.5" v-if="expenseClaim.advances?.length">
<!-- Advance Card -->
<div
v-for="advance in expenseClaim.advances"
:k... | 2302_79757062/hrms | frontend/src/components/ExpenseAdvancesTable.vue | Vue | agpl-3.0 | 2,283 |
<template>
<div class="flex flex-col w-full justify-center gap-2.5">
<div class="flex flex-row items-center justify-between">
<div class="flex flex-row items-start gap-3 grow">
<ExpenseIcon class="h-5 w-5 text-gray-500" />
<div class="flex flex-col items-start gap-1.5">
<div class="text-base font-nor... | 2302_79757062/hrms | frontend/src/components/ExpenseClaimItem.vue | Vue | agpl-3.0 | 3,155 |
<template>
<div class="flex flex-col w-full gap-5" v-if="summary.data">
<div class="text-lg text-gray-800 font-bold">Expense Claim Summary</div>
<div
class="flex flex-col gap-4 bg-white py-3 px-3.5 rounded-lg border-none"
>
<div class="flex flex-col gap-1.5">
<span class="text-gray-600 text-base font-m... | 2302_79757062/hrms | frontend/src/components/ExpenseClaimSummary.vue | Vue | agpl-3.0 | 2,511 |
<template>
<!-- Table -->
<div
v-if="doc?.expenses"
class="flex flex-col bg-white mt-5 rounded border overflow-auto"
>
<div
class="flex flex-row p-3.5 items-center justify-between cursor-pointer"
v-for="(item, idx) in doc?.expenses"
:key="idx"
>
<div class="flex flex-col w-full justify-center gap... | 2302_79757062/hrms | frontend/src/components/ExpenseItems.vue | Vue | agpl-3.0 | 1,473 |
<template>
<template v-if="expenseClaim.expenses">
<div class="flex flex-row justify-between items-center pt-4">
<h2 class="text-base font-semibold text-gray-800">Taxes & Charges</h2>
<div class="flex flex-row gap-3 items-center">
<span class="text-base font-semibold text-gray-800">
{{ formatCurrency(... | 2302_79757062/hrms | frontend/src/components/ExpenseTaxesTable.vue | Vue | agpl-3.0 | 6,967 |
<template>
<!-- Header -->
<div class="flex flex-row justify-between items-center mt-2">
<h2 class="text-base font-semibold text-gray-800">Expenses</h2>
<div class="flex flex-row gap-3 items-center">
<span class="text-base font-semibold text-gray-800">
{{ formatCurrency(expenseClaim.total_claimed_amount, c... | 2302_79757062/hrms | frontend/src/components/ExpensesTable.vue | Vue | agpl-3.0 | 6,457 |
<template>
<ion-header>
<ion-toolbar>
<ion-title>{{ filename }} - File Preview</ion-title>
<ion-buttons slot="end">
<ion-button @click="modalController.dismiss()">Close</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content>
<div class="bg-white h-full w-full overflow-auto touch-pin... | 2302_79757062/hrms | frontend/src/components/FilePreviewModal.vue | Vue | agpl-3.0 | 1,219 |
<template>
<div class="flex flex-col gap-3 py-4">
<label class="file-select">
<h2 class="text-base font-semibold text-gray-800 pb-4">Attachments</h2>
<div class="select-button cursor-pointer">
<div
class="flex flex-col w-full border shadow-sm items-center rounded p-3 gap-2"
>
<FeatherIcon nam... | 2302_79757062/hrms | frontend/src/components/FileUploaderView.vue | Vue | agpl-3.0 | 3,046 |
<template>
<div v-if="showField" class="flex flex-col gap-1.5">
<!-- Label -->
<span
v-if="
!['Check', 'Section Break', 'Column Break'].includes(props.fieldtype)
"
:class="[
// mark field as mandatory
props.reqd ? `after:content-['_*'] after:text-red-600` : ``,
`block text-sm leading-5 tex... | 2302_79757062/hrms | frontend/src/components/FormField.vue | Vue | agpl-3.0 | 5,587 |
<template>
<div class="flex flex-col h-full w-full" v-if="isFormReady">
<div class="w-full h-full bg-white sm:w-96 flex flex-col">
<header
class="flex flex-row bg-white shadow-sm py-4 px-3 items-center sticky top-0 z-[1000]"
>
<Button
variant="ghost"
class="!pl-0 hover:bg-white"
@click="... | 2302_79757062/hrms | frontend/src/components/FormView.vue | Vue | agpl-3.0 | 18,459 |
<template>
<div v-if="!props.value" class="text-gray-600 text-base">-</div>
<Badge
v-else-if="props.fieldtype === 'Select'"
variant="outline"
:theme="colorMap[props.value]"
:label="props.value"
size="md"
/>
<div v-else-if="props.fieldtype === 'Date'" class="text-gray-900 text-base">
{{ dayjs(props.val... | 2302_79757062/hrms | frontend/src/components/FormattedField.vue | Vue | agpl-3.0 | 1,362 |
<template>
<div class="flex flex-col gap-5 w-full">
<div class="flex flex-row justify-between items-center">
<div class="text-lg text-gray-800 font-bold">Upcoming Holidays</div>
<div
v-if="holidays?.data?.length"
id="open-holiday-list"
class="text-sm text-gray-800 font-semibold cursor-pointer under... | 2302_79757062/hrms | frontend/src/components/Holidays.vue | Vue | agpl-3.0 | 2,962 |
<template>
<!-- Install PWA dialog -->
<Dialog v-model="showDialog">
<template #body-title>
<h2 class="text-lg font-bold">Install Frappe HR</h2>
</template>
<template #body-content>
<p>Get the app on your device for easy access & a better experience!</p>
</template>
<template #actions>
<Button vari... | 2302_79757062/hrms | frontend/src/components/InstallPrompt.vue | Vue | agpl-3.0 | 2,967 |
<template>
<div class="flex flex-col w-full">
<div class="flex flex-row justify-between items-center px-4">
<div class="text-lg text-gray-800 font-bold">Leave Balance</div>
<router-link
:to="{ name: 'LeaveApplicationListView' }"
v-slot="{ navigate }"
v-if="leaveBalance.data"
>
<div
@cli... | 2302_79757062/hrms | frontend/src/components/LeaveBalance.vue | Vue | agpl-3.0 | 1,689 |
<template>
<div class="flex flex-col w-full justify-center gap-2.5">
<div class="flex flex-row items-center justify-between">
<div class="flex flex-row items-start gap-3 grow">
<LeaveIcon class="h-5 w-5 text-gray-500" />
<div class="flex flex-col items-start gap-1.5">
<div class="text-base font-norma... | 2302_79757062/hrms | frontend/src/components/LeaveRequestItem.vue | Vue | agpl-3.0 | 1,871 |
<template>
<Autocomplete
ref="autocompleteRef"
size="sm"
v-model="value"
:placeholder="`Select ${doctype}`"
:options="options.data"
:class="disabled ? 'pointer-events-none' : ''"
:disabled="disabled"
@update:query="handleQueryUpdate"
/>
</template>
<script setup>
import { createResource, Autocomplete... | 2302_79757062/hrms | frontend/src/components/Link.vue | Vue | agpl-3.0 | 1,758 |
<template>
<!-- Filter Action Sheet -->
<div
class="bg-white w-full flex flex-col items-center justify-center pb-5 max-h-[calc(100vh-5rem)]"
>
<div class="w-full pt-8 pb-5 border-b text-center sticky top-0 z-[100]">
<span class="text-gray-900 font-bold text-lg">Filters</span>
</div>
<div class="w-full p-... | 2302_79757062/hrms | frontend/src/components/ListFiltersActionSheet.vue | Vue | agpl-3.0 | 3,347 |
<template>
<ion-header class="ion-no-border">
<div class="w-full sm:w-96">
<div
class="flex flex-row bg-white shadow-sm py-4 px-3 items-center justify-between border-b"
>
<div class="flex flex-row items-center">
<Button
variant="ghost"
class="!pl-0 hover:bg-white"
@click="router.... | 2302_79757062/hrms | frontend/src/components/ListView.vue | Vue | agpl-3.0 | 8,304 |
<template>
<div
class="bg-white w-full flex flex-col items-center justify-center pb-5 max-h-[calc(100vh-5rem)]"
>
<!-- Header -->
<div
class="w-full flex flex-row gap-2 pt-8 pb-5 border-b justify-center items-center sticky top-0 z-[100]"
>
<span class="text-gray-900 font-bold text-lg text-center">
{... | 2302_79757062/hrms | frontend/src/components/ProfileInfoModal.vue | Vue | agpl-3.0 | 1,027 |
<template>
<div class="flex flex-col gap-5 my-4 w-full">
<div class="text-lg font-medium text-gray-900">{{ title }}</div>
<div class="flex flex-col bg-white rounded">
<router-link
class="flex flex-row flex-start p-4 items-center justify-between border-b"
v-for="link in props.items"
:key="link.title"... | 2302_79757062/hrms | frontend/src/components/QuickLinks.vue | Vue | agpl-3.0 | 917 |
<template>
<div
v-if="document?.doc"
class="bg-white w-full flex flex-col items-center justify-center pb-5 max-h-[calc(100vh-5rem)]"
>
<!-- Header -->
<div
class="w-full flex flex-row gap-2 pt-8 pb-5 border-b justify-center items-center sticky top-0 z-[100]"
>
<span class="text-gray-900 font-bold text... | 2302_79757062/hrms | frontend/src/components/RequestActionSheet.vue | Vue | agpl-3.0 | 8,193 |
<template>
<div
class="flex flex-col bg-white rounded mt-5 overflow-auto"
v-if="props.items?.length"
>
<div
class="flex flex-row p-3.5 items-center justify-between border-b cursor-pointer"
v-for="link in props.items"
:key="link.name"
@click="openRequestModal(link)"
>
<component
:is="props.c... | 2302_79757062/hrms | frontend/src/components/RequestList.vue | Vue | agpl-3.0 | 1,989 |
<template>
<div class="w-full">
<TabButtons
:buttons="[{ label: 'My Requests' }, { label: 'Team Requests' }]"
v-model="activeTab"
/>
<RequestList v-if="activeTab == 'My Requests'" :items="myRequests" />
<RequestList
v-else-if="activeTab == 'Team Requests'"
:items="teamRequests"
:teamRequests="tr... | 2302_79757062/hrms | frontend/src/components/RequestPanel.vue | Vue | agpl-3.0 | 1,834 |
<template>
<!-- Header -->
<div class="flex flex-row justify-between items-center">
<h2 class="text-base font-semibold text-gray-800">{{ type }}</h2>
<span class="text-base font-semibold text-gray-800">
{{ total }}
</span>
</div>
<!-- Table -->
<div
v-if="items"
class="flex flex-col bg-white mt-5 rou... | 2302_79757062/hrms | frontend/src/components/SalaryDetailTable.vue | Vue | agpl-3.0 | 1,508 |
<template>
<div class="flex flex-col w-full justify-center gap-2.5">
<div class="flex flex-row items-center justify-between">
<div class="flex flex-row items-start gap-3 grow">
<SalaryIcon class="h-5 w-5 text-gray-500" />
<div class="flex flex-col items-start gap-1.5">
<div class="text-base font-norm... | 2302_79757062/hrms | frontend/src/components/SalarySlipItem.vue | Vue | agpl-3.0 | 1,563 |
<template>
<svg
viewBox="0 0 48 24"
preserveAspectRatio="xMidYMin slice"
class="h-[84px] w-[84px] -mt-10"
>
<circle cx="24" cy="24" r="9" fill="#fff"></circle>
<circle
class="stroke-current text-gray-200"
cx="24"
cy="24"
r="9"
fill="transparent"
stroke-width="4"
></circle>
<circle
c... | 2302_79757062/hrms | frontend/src/components/SemicircleChart.vue | Vue | agpl-3.0 | 1,113 |
<template>
<div class="flex p-1 bg-gray-200 rounded">
<button
v-for="button in buttons"
:key="button.label"
class="px-8 py-2.5 transition-all rounded-[7px] flex-auto font-medium text-base"
:class="
modelValue === button.label
? 'bg-white drop-shadow text-gray-900'
: 'text-gray-600'
"
... | 2302_79757062/hrms | frontend/src/components/TabButtons.vue | Vue | agpl-3.0 | 605 |
<template>
<div
v-if="actions.length > 0"
:class="[
props.view === 'form'
? 'px-4 pt-4 pb-4 standalone:pb-safe-bottom sm:w-96 bg-white sticky bottom-0 w-full drop-shadow-xl z-40 border-t rounded-t-lg'
: 'flex w-full flex-row items-center justify-between gap-3 sticky bottom-0 border-t z-[100] p-4',
]"
... | 2302_79757062/hrms | frontend/src/components/WorkflowActionSheet.vue | Vue | agpl-3.0 | 3,036 |
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="-0.855 -0.855 24 24"
height="24"
width="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.5"
>
<g id="wallet--money-payment-finance-wallet">
<path
id="Vector"
d="M19.1057142857... | 2302_79757062/hrms | frontend/src/components/icons/EmployeeAdvanceIcon.vue | Vue | agpl-3.0 | 1,816 |
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="-1 -1 28 28"
height="24"
width="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.5"
>
<g
id="dollar-coin--accounting-billing-payment-cash-coin-currency-money-finance"
>
<path
... | 2302_79757062/hrms | frontend/src/components/icons/ExpenseIcon.vue | Vue | agpl-3.0 | 1,836 |
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
width="117"
height="117"
viewBox="0 0 117 117"
fill="none"
>
<g clip-path="url(#clip0_0_45)">
<path
d="M93.4394 0H23.5606C10.5485 0 0 10.5485 0 23.5606V93.4394C0 106.452 10.5485 117 23.5606 117H93.4394C106.452 117 117 106.452 117 93.4394V23.5606C11... | 2302_79757062/hrms | frontend/src/components/icons/FrappeHRLogo.vue | Vue | agpl-3.0 | 1,258 |
<template>
<svg
width="116"
height="30"
viewBox="0 0 116 30"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect
width="30"
height="30"
rx="4"
fill="url(#paint0_linear_33093_155163)"
/>
<path d="M9.00478 6H22V9.37788H9.00478V6Z" fill="white" />
<path
d="M9 24V14.1041L21.0029 14.098... | 2302_79757062/hrms | frontend/src/components/icons/FrappeHRLogoType.vue | Vue | agpl-3.0 | 7,816 |
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-home"
>
<path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
<polyline p... | 2302_79757062/hrms | frontend/src/components/icons/HomeIcon.vue | Vue | agpl-3.0 | 373 |
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-calendar"
>
<rect width="18" height="18" x="3" y="4" rx="2" ry="2" />
<line x1=... | 2302_79757062/hrms | frontend/src/components/icons/LeaveIcon.vue | Vue | agpl-3.0 | 451 |
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="-1 -1 28 28"
height="24"
width="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.5"
>
<g id="bank--institution-saving-bank-payment-finance">
<path
id="Vector"
d="M23.975714285... | 2302_79757062/hrms | frontend/src/components/icons/SalaryIcon.vue | Vue | agpl-3.0 | 1,859 |
import { createResource, toast } from "frappe-ui"
function getFileReader() {
const fileReader = new FileReader()
const zoneOriginalInstance = fileReader["__zone_symbol__originalInstance"]
return zoneOriginalInstance || fileReader
}
export class FileAttachment {
constructor(fileObj) {
this.fileObj = fileObj
th... | 2302_79757062/hrms | frontend/src/composables/index.js | JavaScript | agpl-3.0 | 2,749 |
import { reactive } from "vue"
const subscribed = reactive({})
export function useListUpdate(socket, doctype, callback) {
subscribe(socket, doctype)
socket.on("list_update", (data) => {
if (data.doctype == doctype) {
callback(data.name)
}
})
}
function subscribe(socket, doctype) {
if (subscribed[doctype])... | 2302_79757062/hrms | frontend/src/composables/realtime.js | JavaScript | agpl-3.0 | 402 |
import { createResource, toast } from "frappe-ui"
import { computed } from "vue"
import { userResource } from "@/data/user"
export default function useWorkflow(doctype) {
const workflowDoc = createResource({
url: "hrms.api.get_workflow",
params: { doctype: doctype },
cache: ["hrms:workflow", doctype],
})
work... | 2302_79757062/hrms | frontend/src/composables/workflow.js | JavaScript | agpl-3.0 | 2,640 |
import { createResource } from "frappe-ui"
import { employeeResource } from "./employee"
const transformAdvanceData = (data) => {
return data.map((claim) => {
claim.doctype = "Employee Advance"
return claim
})
}
export const advanceBalance = createResource({
url: "hrms.api.get_employee_advance_balance",
param... | 2302_79757062/hrms | frontend/src/data/advances.js | JavaScript | agpl-3.0 | 485 |
import { createResource } from "frappe-ui"
import { employeeResource } from "./employee"
import { reactive } from "vue"
export const expenseClaimSummary = createResource({
url: "hrms.api.get_expense_claim_summary",
params: {
employee: employeeResource.data.name,
},
auto: true,
cache: "hrms:expense_claim_summary... | 2302_79757062/hrms | frontend/src/data/claims.js | JavaScript | agpl-3.0 | 1,319 |
// This config holds the fields that should be shown in the request summary action sheet
// TODO: This should be config-driven somehow
export const LEAVE_FIELDS = [
{
fieldname: "name",
label: "ID",
fieldtype: "Data",
},
{
fieldname: "leave_type",
label: "Leave Type",
fieldtype: "Link",
},
{
fieldna... | 2302_79757062/hrms | frontend/src/data/config/requestSummaryFields.js | JavaScript | agpl-3.0 | 1,992 |
import { createResource } from "frappe-ui"
const companyCurrency = createResource({
url: "hrms.api.get_company_currencies",
auto: true,
})
const currencySymbols = createResource({
url: "hrms.api.get_currency_symbols",
auto: true,
})
export function getCompanyCurrency(company) {
return companyCurrency?.data?.[co... | 2302_79757062/hrms | frontend/src/data/currencies.js | JavaScript | agpl-3.0 | 526 |
import router from "@/router"
import { createResource } from "frappe-ui"
export const employeeResource = createResource({
url: "hrms.api.get_current_employee_info",
cache: "hrms:employee",
onError(error) {
if (error && error.exc_type === "AuthenticationError") {
router.push("/login")
}
},
})
| 2302_79757062/hrms | frontend/src/data/employee.js | JavaScript | agpl-3.0 | 305 |
import { createResource } from "frappe-ui"
import { reactive } from "vue"
import { employeeResource } from "./employee"
let employeesByID = reactive({})
let employeesByUserID = reactive({})
export const employees = createResource({
url: "hrms.api.get_all_employees",
auto: true,
transform(data) {
return data.map(... | 2302_79757062/hrms | frontend/src/data/employees.js | JavaScript | agpl-3.0 | 861 |
import { createResource } from "frappe-ui"
import { employeeResource } from "./employee"
import dayjs from "@/utils/dayjs"
const transformLeaveData = (data) => {
return data.map((leave) => {
leave.leave_dates = getLeaveDates(leave)
leave.doctype = "Leave Application"
return leave
})
}
export const getLeaveDa... | 2302_79757062/hrms | frontend/src/data/leaves.js | JavaScript | agpl-3.0 | 1,657 |
import { createResource, createListResource } from "frappe-ui"
import { userResource } from "./user"
export const unreadNotificationsCount = createResource({
url: "hrms.api.get_unread_notifications_count",
cache: "hrms:unread_notifications_count",
initialData: 0,
auto: true,
})
export const notifications = create... | 2302_79757062/hrms | frontend/src/data/notifications.js | JavaScript | agpl-3.0 | 844 |
import { computed, reactive } from "vue"
import { createResource, call } from "frappe-ui"
import { userResource } from "./user"
import { employeeResource } from "./employee"
import router from "@/router"
export function sessionUser() {
let cookies = new URLSearchParams(document.cookie.split("; ").join("&"))
let _ses... | 2302_79757062/hrms | frontend/src/data/session.js | JavaScript | agpl-3.0 | 1,257 |
import router from "@/router"
import { createResource } from "frappe-ui"
export const userResource = createResource({
url: "hrms.api.get_current_user_info",
cache: "hrms:user",
onError(error) {
if (error && error.exc_type === "AuthenticationError") {
router.push({ name: "Login" })
}
},
})
| 2302_79757062/hrms | frontend/src/data/user.js | JavaScript | agpl-3.0 | 302 |